Forum Discussion
Altera_Forum
Honored Contributor
13 years agoThe issue I have is I am wondering if there is anyway to do this other then some for while loop.
EDIT: I am trying to do it now but I am having issues figuring out how to do the insert_value value. I am probably making it a std_logic_vector so that I can easily concatenate it however I don't know how to do it so that std_logic_vector can have a dynamic size. I guess I will have to do a more complicated concatenation operation to make it work. On the other hand a massive for loop may work... EDIT 2 : I got it to compile! Here is the code I did:
for i in 31 to 0 loop
if i >= msbd + 1 OR i <= lsb - 1 then
output(i) <= destination_register(i);
else
output(i) <= destination_register(i + to_integer(lsb));
end if;
end loop;
EDIT 3: RTL viewer seems to improperly display the circuit. I am sure it is different then this... https://www.alteraforum.com/forum/attachment.php?attachmentid=6543 I am connecting the circuit externally so I am wondering what is wrong... I know one issue that may be causing it EDIT 4: Nope its not that issue... I am confused...