inc.sv 321 Bytes
Newer Older
1 2 3 4 5 6
module top;
    integer x = 0;
    initial begin
        x++;
        $display(x);
    end
7 8 9 10 11 12 13 14 15 16 17 18 19 20
    initial begin
        ++x;
        $display(x);
    end
    initial begin
        repeat (0);
        x++;
        $display(x);
    end
    initial begin
        repeat (0);
        ++x;
        $display(x);
    end
21
endmodule