mirror of
https://github.com/zachjs/sv2v.git
synced 2026-08-30 01:18:10 +02:00
- support for additional assignment statements in loop initializations - greatly improved error messaging in these contexts - decl parser takes in the ending token; significant related refactoring - pass through elaboration system tasks - removed non-blocking assignment operator precedence hack - preliminary nosim test suite for features unsupported by iverilog
21 lines
393 B
Verilog
21 lines
393 B
Verilog
module top;
|
|
`define LOOP(ID, START) \
|
|
x = 0; \
|
|
for (x = START; x < 3; x = x + 1) \
|
|
$display(`"ID x = %0d`", x);
|
|
|
|
initial begin : blk
|
|
integer x;
|
|
`LOOP(A, 1)
|
|
`LOOP(B, 1)
|
|
`LOOP(C, 1)
|
|
`LOOP(D, 0)
|
|
`LOOP(E, 0)
|
|
`LOOP(F, 1)
|
|
`LOOP(G, 1)
|
|
`LOOP(H, -1)
|
|
`LOOP(I, -1)
|
|
`LOOP(J, -1)
|
|
end
|
|
endmodule
|