vhdl syntax help needed

Status
Not open for further replies.

sarah23

Newbie level 6
Joined
Oct 14, 2010
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
USA
Activity points
1,362
vhdl:
Add_next:hybadd port map(PC_out,(2 => '1',others => '0'),add_next_out);

verilog converted:
hybadd Add_next (PC_out, {2 : 1'b1, {a{1'b0}}}, add_next_out);

i don't understand wat does this means

(2 => '1',others => '0') <==> {2 : 1'b1, {a{1'b0}}}
 

it sets bit 2 to '1' and all other bits to '0'.
so if it is a bus declared (7 downto 0), it would set the value to "00000100".
 
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…