mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 08:25:32 +02:00
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.
33 lines
816 B
Verilog
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
|