On Wednesday, November 7, 2012 4:32:42 AM UTC-6, hssig wrote:
> Hi Alan, replacing the process with a generate works! Fascinating ...
What is the difference between a for loop in a process and a generate loopregarding k being static? Cheers, hssig
For loops are sequential statements, and the index is a variable (non-static).
For-generates are concurrent statements, and the index is globally static, similar to a generic. The value is set after compile (analysis), during elaboration (usually the very beginning of most simulators, but some tools have separate elaboration commands.)
The statements in a for-loop execute in sequential order in each iteration.
The concurrent statements in a for-generate execute concurrently. The for-generate is just instantiating the concurrent statements N times.