FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

Shift Left

EEren
Beginner
556 Views
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
87 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" ?

Reply