Jan 4, 2011 #1 S 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}}}
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}}}
Jan 4, 2011 #2 T TrickyDicky Advanced Member level 7 Joined Jun 7, 2010 Messages 7,110 Helped 2,081 Reputation 4,181 Reaction score 2,048 Trophy points 1,393 Activity points 39,769 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".
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".