Forum Discussion
Altera_Forum
Honored Contributor
14 years agoVHDL advice needed - multiplicating combinational logic.
I have a piece of code that I want implemented as combinational logic, but I want 16 identical modules of it. Currently I'm doing something like
for i in 0 to OUTPUTNO-1 loop
output...
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- Is there any more generic way of duplicating code in VHDL, that works outside of a process also? --- Quote End --- Yes, its called a generation loop. Your code just needed a label and a slight change in syntax:
g1: for i in 0 to OUTPUTNO-1 generate
outputs(i) <= outputsignal(i) and not outputban(i);
end generate;
Cheers, Dave