Forum Discussion
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- The idea is 'recursive programing'. This topic is usually covered in computer programming classes. Most of the time the teacher / professor will then continue to explain that you have to 'unroll' it using a for-loop construct to avoid stack-overflow and to minimize running-time, but in VHDL the compiler makes the nicest logic from it. Just take a look at the schematic in the RTL Viewer, then double up the number of entries, re-compile and look again at the RTL Viewer. You will appreciate what the 'recursive' action does. --- Quote End --- I would never recommend recursion in VHDL to a beginner. A recent example (http://alteraforum.com/forum/showthread.php?t=27911&highlight=recursion) showed someone trying to use recursion like they were writing software, and they caused a stack overflow in Quartus during synthesis. I agree it can be used when you know what's coming, but uncontrolled and misunderstood uses of it can lead to problems.