- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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