- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi;
I am getting error using sla and ** operators. My code is as under : Rx_Buff_i : in STD_LOGIC_VECTOR (7 downto 0); . . . signal Chksum : std_logic_vector(7 downto 0) := (others => '0'); signal Shft_buff : std_logic_vector(1607 downto 0) :=(others => '0'); . . . . Shft_buff<= Shft_buff sla 8; Chksum <= Chksum ** Rx_Buff_i; I am including the following libraries: use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_unsigned.ALL; use IEEE.std_logic_arith.all; use IEEE.numeric_std.ALL; The following errors I am getting 1)found '0' definitions of operator "sla", cannot determine exact overloaded matching definition for "sla" 2) found '0' definitions of operator "**", cannot determine exact overloaded matching definition for "**" plz helpLink Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi; I am getting error using sla and ** operators. I am including the following libraries: use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_unsigned.ALL; use IEEE.std_logic_arith.all; use IEEE.numeric_std.ALL; --- Quote End --- Please, don't use numeric_std and std_logic_arith/unsigned at the same time! That makes for a lot of type confusion. Use numeric_std only. --- Quote Start --- Shft_buff<= Shft_buff sla 8; Chksum <= Chksum ** Rx_Buff_i; The following errors I am getting 1)found '0' definitions of operator "sla", cannot determine exact overloaded matching definition for "sla" --- Quote End --- Regarding the sla operator, it is not defined for std_logic_vector. It is defined (in numeric_std) for unsigned and signed, but they're problematic and nobody uses them (and they may not synthesize). Instead, just use the usual shift left:
ShiftLeft : process (clk) is
begin
if rising_edge(clk) then
foo <= foo(foo'left - 1 downto 0) & '0';
end if;
end process ShiftLeft;
--- Quote Start --- 2) found '0' definitions of operator "**", cannot determine exact overloaded matching definition for "**" plz help --- Quote End --- The exponent has to be: a) a constant (compile-time) integer. It cannot be a variable and it certainly cannot be a std_logic_vector. b) a power-of-two, which means it is implemented as a shift left. So just use the shift left.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page