S
Systemv User
Guest
Quartus-II 7.2 has improved upon Quartus's Systemverilog preprocessor:
`define SET_REG( x, y ) reg_``y <= x
`define CONCAT( x, y, z ) x``_``y``_``z
assign `CONCAT( bus0, func1, endpoint0 ) = 1'b0;
and named 'end' blocks:
module x;
...
always_comb begin : my_junk
end : my_junk
endmodule : x
But 7.2 still doesn't like inline (automatic) variable declarations:
for ( int i = 0; i < 32; ++i ) // <-- 'int i' causes ERROR
`define SET_REG( x, y ) reg_``y <= x
`define CONCAT( x, y, z ) x``_``y``_``z
assign `CONCAT( bus0, func1, endpoint0 ) = 1'b0;
and named 'end' blocks:
module x;
...
always_comb begin : my_junk
end : my_junk
endmodule : x
But 7.2 still doesn't like inline (automatic) variable declarations:
for ( int i = 0; i < 32; ++i ) // <-- 'int i' causes ERROR