Community
cancel
Showing results for 
Search instead for 
Did you mean: 
EEren
Beginner
493 Views

Shift Left

signal set_rx_stat : std_logic := '0'; shared variable mailbox_idx : integer range 0 to 255 := 0;   variable set_bits : std_logic_vector(31 downto 0) := X"00000000";   set_bits := std_logic_vector ( shift_left ( to_unsigned(set_rx_stat,1), mailbox_idx ) );

I get an error

Error (10476): VHDL error at reg_file.vhd(1178): type of identifier "set_rx_stat" does not agree with its usage as "natural" type

Why?

According to the function

function SHIFT_LEFT (ARG: UNSIGNED; COUNT: NATURAL) return UNSIGNED;

All types cast properly.

0 Kudos
1 Reply
GuaBin_N_Intel
Employee
24 Views

There's something not correlated in the error message. The variable "set_rx_stat" is supposed to be assigned to "ARG" in the function where it should be unsigned type. Do you have the cast function "to_unsigned" ?