How to Writing this statment in VHDL

Status
Not open for further replies.

cysco

Newbie level 5
Joined
Jul 27, 2009
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,325
In verilog,
I can write like this:

assign next_lookup = lookup[15:0] & {16{lookup_en}} // lookup_en is 1 bit.

How to have the same statement in VHDL??
 

one way:
FOR i IN 0 TO 15 GENERATE
BEGIN
next_lookup <= lookup AND lookup_en;
END GENERATE;

---------- Post added at 10:57 ---------- Previous post was at 10:54 ----------

an other way:
SIGNAL vect_lookup_en : STD_LOGIC_VECTOR(15 DOWNTO 0);

vect_lookup_en <= (OTHERS=>lookup_en);
next_lookup <= lookup AND vect_lookup_en;
 

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