concatenation operator in case statement

Status
Not open for further replies.

rameshrai

Full Member level 3
Joined
Aug 16, 2010
Messages
158
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,298
appliedelectronicsengineering.blogspot.com
Activity points
2,272
hi,

can i use the following in case statement?

with s1 & s0 select

where s1 and s0 are std_logic

I get error with this:

Select expression must be of a locally static subtype. Use -relax to allow expressions of a nonstatic subtype.

thanks for help
 

Yes,
you can do something like this:
Code:
process(b0,b1,b2,b3)
   variable bcat : std_logic_vector(0 to 3);
begin
   bcat := b0 & b1 & b2 & b3;
   case bcat is
      when "0000" => x <= 1;
      when others => x <= 2;
   end case;
end process;

I got the example from some site
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…