Files
iverilog/ivtest/ivltests/two_state_display.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

36 lines
834 B
Verilog

module top;
bit [2:-1] vec = 4'b1001;
bit btvar = 0;
byte bvar = 0;
shortint svar = 0;
int ivar = 0;
longint lvar = 0;
initial begin
if ((vec[-1] != 1) && (vec[0] != 0) &&
(vec[1] != 0) && (vec[2] != 1)) begin
$display("Failed to select vector bits correctly");
$finish;
end
$display("Vec: ", vec);
$display("Bit: ", btvar);
$display("Byte: ", bvar);
$display("Short: ", svar);
$display("Int: ", ivar);
$display("Long: ", lvar);
$display("Monitor results:");
$monitor("Time: ", $stime,
"\n Bit: ", btvar,
"\n Byte: ", bvar,
"\n Short: ", svar,
"\n Int: ", ivar,
"\n Long: ", lvar);
#1 btvar = 1;
#1 bvar = 1;
#1 svar = 1;
#1 ivar = 1;
#1 lvar = 1;
end
endmodule