diff --git a/ivtest/ivltests/br_gh1181.v b/ivtest/ivltests/br_gh1181.v new file mode 100644 index 000000000..e916d75c1 --- /dev/null +++ b/ivtest/ivltests/br_gh1181.v @@ -0,0 +1,42 @@ +module top_module(); + wire data_bus; // Bidirectional data bus + + module_a u_module_a ( + .data(data_bus) + ); + + module_b u_module_b ( + .data(data_bus) + ); +endmodule + +module module_a ( + inout wire data +); + // Drive the data bus with 1 when module_a is active + assign data = 1'b1; +endmodule + +module module_b ( + inout wire data +); + // Read data from the bus + wire data_in = data; + + // Set data to high impedance to allow other modules to drive the bus + assign data = 1'bz; +endmodule + +module tb(); + +top_module dut(); + +initial begin + #0; + if (dut.data_bus === 1'b1) + $display("PASSED"); + else + $display("FAILED"); +end + +endmodule diff --git a/ivtest/regress-vvp.list b/ivtest/regress-vvp.list index c6bbeb508..88045d59e 100644 --- a/ivtest/regress-vvp.list +++ b/ivtest/regress-vvp.list @@ -60,6 +60,7 @@ br_gh1143g vvp_tests/br_gh1143g.json br_gh1143h vvp_tests/br_gh1143h.json br_gh1155 vvp_tests/br_gh1155.json br_gh1163 vvp_tests/br_gh1163.json +br_gh1181 vvp_tests/br_gh1181.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_gh1181.json b/ivtest/vvp_tests/br_gh1181.json new file mode 100644 index 000000000..b01ce4807 --- /dev/null +++ b/ivtest/vvp_tests/br_gh1181.json @@ -0,0 +1,4 @@ +{ + "type" : "normal-vlog95", + "source" : "br_gh1181.v" +}