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

21 lines
774 B
Verilog

// This just tests the compiler accepts the syntax. It needs to be improved
// when deferred assertions are supported.
module test();
integer i = 1;
initial begin
assert #0 (i == 1);
assert #0 (i == 0);
assert #0 (i == 1) else $display("Check 3 : this shouldn't be displayed");
assert #0 (i == 0) else $display("Check 4 : this should be displayed");
assert #0 (i == 1) $display("Check 5 : this should be displayed");
assert #0 (i == 0) $display("Check 6 : this shouldn't be displayed");
assert #0 (i == 1) $display("Check 7 : this should be displayed");
else $display("Check 7 : this shouldn't be displayed");
assert #0 (i == 0) $display("Check 8 : this shouldn't be displayed");
else $display("Check 8 : this should be displayed");
end
endmodule