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

84 lines
1.5 KiB
Verilog

module main;
reg a, b;
triand net;
assign net = a;
assign net = b;
initial begin
a = 'b0;
b = 'b0;
#1 if (net !== 1'b0) begin
$display("FAILED -- a=%b, b=%b, net=%b", a, b, net);
$finish;
end
a = 'b0;
b = 'b1;
#1 if (net !== 1'b0) begin
$display("FAILED -- a=%b, b=%b, net=%b", a, b, net);
$finish;
end
a = 'b0;
b = 'bx;
#1 if (net !== 1'b0) begin
$display("FAILED -- a=%b, b=%b, net=%b", a, b, net);
$finish;
end
a = 'b0;
b = 'bz;
#1 if (net !== 1'b0) begin
$display("FAILED -- a=%b, b=%b, net=%b", a, b, net);
$finish;
end
a = 'b1;
b = 'b1;
#1 if (net !== 1'b1) begin
$display("FAILED -- a=%b, b=%b, net=%b", a, b, net);
$finish;
end
a = 'b1;
b = 'bx;
#1 if (net !== 1'bx) begin
$display("FAILED -- a=%b, b=%b, net=%b", a, b, net);
$finish;
end
a = 'b1;
b = 'bz;
#1 if (net !== 1'b1) begin
$display("FAILED -- a=%b, b=%b, net=%b", a, b, net);
$finish;
end
a = 'bx;
b = 'bx;
#1 if (net !== 1'bx) begin
$display("FAILED -- a=%b, b=%b, net=%b", a, b, net);
$finish;
end
a = 'bx;
b = 'bz;
#1 if (net !== 1'bx) begin
$display("FAILED -- a=%b, b=%b, net=%b", a, b, net);
$finish;
end
a = 'bz;
b = 'bz;
#1 if (net !== 1'bz) begin
$display("FAILED -- a=%b, b=%b, net=%b", a, b, net);
$finish;
end
$display("PASSED");
end
endmodule // main