Hello Everyone, I'm very new to VHDL and to this forum so If my question doesn't belong here or already answered I apologize, here's my question, when we concatenate bits to a vector will it be any faster than a for loop to do it?
Here's an example, imagine we have a sign extension in our system(let say 4 bit to 8 bit)
which of the following code would be faster and safer to use?
OR,
Thank you for your help,
Here's an example, imagine we have a sign extension in our system(let say 4 bit to 8 bit)
which of the following code would be faster and safer to use?
Code:
bit8(3 downto 0)<=bit4(3 downto 0);
bit8(7 downto 4)<=bit4(3)&bit4(3)&bit4(3)&bit4(3);
Code:
bit8(3 downto 0)<=bit4(3 downto 0);
for i in 7 downto 4 loop
bit8(i)<=bit4(3);
end loop;