Add regression test for issue #1122.

This commit is contained in:
Martin Whitaker 2024-05-06 21:47:18 +01:00
parent 3b61c0088d
commit 94d9d19519
3 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,49 @@
module tranif_or(a, b, y);
input a, b;
inout y;
supply1 vdd;
supply0 vss;
wire w1, w2;
// NOR
tranif0(w1, vdd, a);
tranif0(w2, w1, b);
tranif1(w2, vss, a);
tranif1(w2, vss, b);
// OR
tranif0(y, vdd, w2);
tranif1(y, vss, w2);
endmodule
module test;
reg a, b;
wire y;
tranif_or dut(a, b, y);
reg failed = 0;
initial begin
$monitor("%t a=%b b=%b Y=%b", $time, a, b, y);
#10 a = 0; b = 0;
#0 if (y !== 0) failed = 1;
#10 a = 0; b = 1;
#0 if (y !== 1) failed = 1;
#10 a = 1; b = 0;
#0 if (y !== 1) failed = 1;
#10 a = 1; b = 1;
#0 if (y !== 1) failed = 1;
#1;
if (failed)
$display("FAILED");
else
$display("PASSED");
end
endmodule

View File

@ -49,6 +49,7 @@ br_gh1099a vvp_tests/br_gh1099a.json
br_gh1099b vvp_tests/br_gh1099b.json
br_gh1099c vvp_tests/br_gh1099c.json
br_gh1104 vvp_tests/br_gh1104.json
br_gh1122 vvp_tests/br_gh1122.json
ca_time_real` vvp_tests/ca_time_real.json
case1 vvp_tests/case1.json
case2 vvp_tests/case2.json

View File

@ -0,0 +1,4 @@
{
"type" : "normal",
"source" : "br_gh1122.v"
}