diff --git a/ivtest/ivltests/br_gh1122.v b/ivtest/ivltests/br_gh1122.v new file mode 100644 index 000000000..b5c7b2338 --- /dev/null +++ b/ivtest/ivltests/br_gh1122.v @@ -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 + + diff --git a/ivtest/regress-vvp.list b/ivtest/regress-vvp.list index cb56e7b66..37df52a39 100644 --- a/ivtest/regress-vvp.list +++ b/ivtest/regress-vvp.list @@ -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 diff --git a/ivtest/vvp_tests/br_gh1122.json b/ivtest/vvp_tests/br_gh1122.json new file mode 100644 index 000000000..4835fd3f4 --- /dev/null +++ b/ivtest/vvp_tests/br_gh1122.json @@ -0,0 +1,4 @@ +{ + "type" : "normal", + "source" : "br_gh1122.v" +}