EEren
Occasional Contributor
6 years agoShift 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.