Files
iverilog/ivtest/ivltests/always_star_array_lval.v
T
Stephen Williams cea237b407 Add ivtest to the iverilog source tree
By adding ivtest to the iverilog source tree, it is easier to keep
the regression test synchronized with the source that is being tested.
This should be especially helpful for PRs that add a new feature, and
have a matching ivtest PR with the regression test for that feature.
2022-01-15 10:18:50 -08:00

33 lines
816 B
Verilog

// This test was written to catch spurious "internal error" messages generated
// by the compiler, so uses a gold file for checking.
module test();
reg [7:0] Reg[0:3];
reg [7:0] Val0 = 255;
reg [7:0] Val1 = 1;
reg [7:0] Val2 = 2;
reg [7:0] Val3 = 3;
always @* begin
Reg[0] = Val0;
Reg[1] = Val1;
Reg[2] = Val2;
Reg[3] = Val3;
end
initial begin
Val0 <= 0; // To make sure this triggers at T0 for SystemVerilog
#1 $display("%0d %0d %0d %0d", Reg[0], Reg[1], Reg[2], Reg[3]);
Val0 = 4;
#1 $display("%0d %0d %0d %0d", Reg[0], Reg[1], Reg[2], Reg[3]);
Val1 = 5;
#1 $display("%0d %0d %0d %0d", Reg[0], Reg[1], Reg[2], Reg[3]);
Val2 = 6;
#1 $display("%0d %0d %0d %0d", Reg[0], Reg[1], Reg[2], Reg[3]);
Val3 = 7;
#1 $display("%0d %0d %0d %0d", Reg[0], Reg[1], Reg[2], Reg[3]);
end
endmodule