Forum Discussion
Altera_Forum
Honored Contributor
8 years agoSystem Verilog 2009 Generate Loop
How can I get this piece of code to compile? This works fine in other synthesis tools, simulation etc. Just trying to map it to an FPGA. In Quartus 17.1 and 18.0 I get this error:
Err...
Altera_Forum
Honored Contributor
8 years agoUsually when you get an unexplainable syntax error, there is a problem with the code just before it.
SystemVerilog added the ability to put the genvar inside the for loop. Verilog-2005 made the generate/endgenerate keywords optional. The compiler should be able to tell from the context whether the for-loop is a generate-for or a procedural-for. I would try removing them and seeing if you get a different error message.