Forum Discussion
Altera_Forum
Honored Contributor
10 years agoYou realise there is a big difference between HDL and procedural languages right?
Loops make little sense in hardware - it doesn't run as a loop, the synthesizer breaks it all up into hardware - so if you did a loop that added 1 four times, it would probably make a chain of four adders each adding 1. In your case, how does the synthesizer know when to stop? If ctrl_align was say 10, it would require 10 copies of the hardware. If it was 20, it would require 20 copies of the hardware. So how does it know how many to put?