Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > N e one willing to help with :No feasible entries for infix operation "*"

Reply
Thread Tools

N e one willing to help with :No feasible entries for infix operation "*"

 
 
Unity Unity is offline
Junior Member
Join Date: Apr 2007
Posts: 4
 
      07-24-2008
I have the following code and been having trouble with a couple of lines which seem to be causing lots of errors.

No feasible entries for infix operator "*".

Original Code.............................................. ..................................

LIBRARY IEEE;
LIBRARY WORK;
USE IEEE.NUMERIC_STD.ALL;
USE WORK.NUMERIC_UNSIGNED.ALL;
USE IEEE.STD_LOGIC_1164.ALL;

ENTITY Bit_Destuff IS PORT (
Clk : IN STD_LOGIC;
G_Rst : IN STD_LOGIC;
Arbtr_Sts : IN STD_LOGIC;
Bit_Destf_Intl : IN STD_LOGIC;
Sampled_Bit : IN STD_LOGIC;
Tx_Success : IN STD_LOGIC;
Rx_Success : IN STD_LOGIC;
Act_Err_Frm_Tx : IN STD_LOGIC;
Psv_Err_Frm_Tx : IN STD_LOGIC;
Ovld_Frm_Tx : IN STD_LOGIC;
Serial_In : OUT STD_LOGIC;
Rx_Crc_Frm : IN STD_LOGIC_VECTOR(14 DOWNTO 0);
Rcvd_Bt_Cnt : OUT STD_LOGIC_VECTOR(6 DOWNTO 0);
De_Stuff : OUT STD_LOGIC;
One_Count : OUT STD_LOGIC_VECTOR(2 DOWNTO 0);
Zero_Count : OUT STD_LOGIC_VECTOR(2 DOWNTO 0);
Rcvd_Eof_Flg : OUT STD_LOGIC;
Rcvd_Msg_ID : OUT STD_LOGIC_VECTOR(10 DOWNTO 0);
Rcvd_Rtr : OUT STD_LOGIC;
Rcvd_Dlc : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
Rcvd_Crc : OUT STD_LOGIC_VECTOR(14 DOWNTO 0);
Rx_Crc_Intl : OUT STD_LOGIC;
Rx_Crc_Enable : OUT STD_LOGIC;
Rcvd_Data_Len : OUT STD_LOGIC_VECTOR(6 DOWNTO 0);
Rcvd_Data_Frm : OUT STD_LOGIC_VECTOR(63 DOWNTO );
Rcvd_Lst_Bit_Ifs : OUT STD_LOGIC;
Rcvd_Crc_Flg : OUT STD_LOGIC;
Rcvd_Lst_Bit_EOF : OUT STD_LOGIC);
END ENTITY Bit_Destuff;

------------------------------------------------------------------
SIGNAL Destf_Out : UNSIGNED (63 DOWNTO 0);
SIGNAL Rcvd_Data_Frm_Pad : UNSIGNED (6 DOWNTO 0);
SIGNAL Rcvd_Frm_Len : UNSIGNED(6 DOWNTO 0);
SIGNAL Rcvd_Data_Len_Xhdl7 : UNSIGNED (6 DOWNTO 0);
----------------------------------------------------------------------
Destf_Out_3 <= ("0001000" * Destf_Out(3));
----------------------------------------------------------------------
-- BLOCK TO CALCULATE THE RECEIVED FRAME LENGTH AND RECEIVED DATA LENGTH

PROCESS (Clk, G_Rst)
BEGIN
IF (G_Rst = '1') THEN
Rcvd_Frm_Len <= "0000000";
Rcvd_Data_Len_Int <= "0000000";
Rcvd_Data_Frm_Pad <= "1000000";

ELSIF (Clk'EVENT AND Clk = '1') THEN
IF ((Rx_Success OR Tx_Success) = '1') THEN
Rcvd_Frm_Len <= "0000000";
Rcvd_Data_Len_Int <= "0000000";
Rcvd_Data_Frm_Pad<= "1000000";
ELSE
IF (Rcvd_Rtr_Int10 = '1') THEN
Rcvd_Data_Len_Int7 <= "0000000";
Rcvd_Data_Frm_Pad <= "1000000";
Rcvd_Frm_Len <= "0100010";
ELSE
IF ((Rcvd_Rtr_Int10 = '0') AND (Rcvd_Bt_Cnt_Int2 = "0010101")) THEN
Rcvd_Data_Len_Int7 <= "0001000" * ("0001000" * Destf_Out(3) + "0000100" * Destf_Out(2) + "0000010" * Destf_Out(1) + "0000001" * Destf_Out(0));
Rcvd_Data_Frm_Pad <= "1000000" - ("0001000" * ("0001000" * Destf_Out(3) + "0000100" * Destf_Out(2) + "0000010" * Destf_Out(1) + "0000001" * Destf_Out(0)));
Rcvd_Frm_Len <= "0010011" + ("0001000" * ("0001000" * Destf_Out (3) + "0000100" * Destf_Out (2) + "0000010" * Destf_Out(1) + "0000001" * Destf_Out(0))) + "0001111";
ELSE
Rcvd_Frm_Len <= Rcvd_Frm_Len;
END IF;
END IF;
END IF;
END IF;
END PROCESS;



Sorry!!! The code is very long!!! This is just a small part of it. Any help will be appreciated.

I have another example in the reply thread below. It has the same problem eventhough it uses the Unsigned Function to do the conversion first before multiplying.
 

Last edited by Unity; 07-25-2008 at 04:39 PM..
Reply With Quote
 
 
 
 
guarana5 guarana5 is offline
Junior Member
Join Date: Jul 2008
Posts: 3
 
      07-25-2008
you'll have to cast the values. you can't multiply bit-vectors.
 
Reply With Quote
 
 
 
 
Unity Unity is offline
Junior Member
Join Date: Apr 2007
Posts: 4
 
      07-25-2008
guarana5,

Thanks for the reply. Here is another simpler example which should be straight forward. In this example I tried using the multipication function with first converting them to unsigned and then multiplying them. It should work but once again it doesn't. I'm going crazy

library ieee;
use ieee.numeric_std.all;
use ieee.std_logic_1164.all;

entity testmultun is
port (
q : out std_logic_vector(63 downto 0);
d1 : in std_logic_vector(31 downto 0);
d2 : in std_logic_vector(15 downto 0));
end entity testmultun;

architecture rtl of testmultun is
signal d1_32un : unsigned(31 downto 0);
signal d2_16un : unsigned(15 downto 0);
Signal d3_test : unsigned (15 downto 0);
signal mult_63un : unsigned(47 downto 0);
begin -- architecture rtl
d1_32un <= unsigned(d1);
d2_16un <= unsigned(d2);
d3_test <= unsigned (d1(3)* d2); -------->>> Error: No feasible entries for infix operator "*"

mult_63un <= d1_32un * d2_16un * d3_test;
q <= std_logic_vector(mult_63un);

end architecture rtl;
 
Reply With Quote
 
guarana5 guarana5 is offline
Junior Member
Join Date: Jul 2008
Posts: 3
 
      07-28-2008
hej unity!
Quote:
Originally Posted by Unity
Code:
d3_test <= unsigned (d1(3)* d2); -------->>> Error: No feasible entries for infix operator "*"
in this line you are multiplying std_logic_vectors and trying to cast the result of the multiplication to unsigned - that doesn't work! you have to cast the operands, not the result, as you did here:
Quote:
Originally Posted by Unity
Code:
mult_63un <= d1_32un * d2_16un * d3_test;
but be careful in regard to size of operands and target!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Picking X random entries from linked list of Y entries Don Bruder C Programming 3 08-03-2010 09:10 AM
Willing to pay for some expert help integrating TinyMCE davehansen22@gmail.com Java 3 07-19-2006 09:51 PM
Simulating testbench waveform error: "No feasible entries for subprogram write" Taras_96 VHDL 2 08-03-2005 02:55 AM
Tying up Port Login table entries with Port Table Entries in CISCO SNMP John Ramsden Cisco 0 07-24-2004 04:03 PM
Willing to pay for help! Jenny Perl 2 11-29-2003 04:44 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57