Forum Discussion
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- Agree. Worth trying once and see what the RTL looks like. --- Quote End --- I believe it unrolls the loop. I will try it now Edit: I have this so far but I get an error that bit_location is not a natural type:
output <= (others => '0');
for i in 0 to 31 loop
bit_location <= i - unsigned(lsb);
if (i >= unsigned(lsb)) AND (i <= unsigned(msbd)) then
output(bit_location) <= bit_field(i);
end if;
end loop; Edit2: I also tried this but its the same error:
for i in 0 to 31 loop
bit_location <= i + unsigned(lsb);
if (bit_location >= unsigned(lsb)) AND (bit_location <= unsigned(msbd)) then
output(i) <= bit_field(bit_location);
end if;
end loop;