Files
iverilog/ivtest/vhdl_tests/blocking.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

39 lines
623 B
Verilog

module testbench();
reg [3:0] a, b;
initial begin
a = 1;
b = 2;
#1;
a = a + b;
b = a + b;
if (a !== 3)
begin
$display("FAILED -- a !== 3");
$finish;
end
if (b !== 5)
begin
$display("FAILED -- b !== 5");
$finish;
end
#2;
$display("PASSED");
end // initial begin
initial begin
#2;
if (a !== 3)
begin
$display("FAILED -- a (signal) !== 3");
$finish;
end
if (b !== 5)
begin
$display("FAILED -- b (signal) !== 5");
$finish;
end
end
endmodule // testbench