Forum Discussion
Altera_Forum
Honored Contributor
13 years agoYou still need the genvar index; statement in either situation.
Verilog 2005 made the generate/endgenerate keywords optional. Since the for loop appears outside of a procedural context, the extra keywords are unnecessary. The compiler is able to figure out that a for/if/case statement in a module context outside a procedural context is a generate block. Verilog is a language full of implicit defaults. But sometimes it is better to document your intent by putting the extra keywords in there.