diff --git a/ivtest/ivltests/br_gh1074a.v b/ivtest/ivltests/br_gh1074a.v new file mode 100644 index 000000000..0db40daa9 --- /dev/null +++ b/ivtest/ivltests/br_gh1074a.v @@ -0,0 +1,24 @@ +module test(); + +bit [7:0] a; +bit [7:0] b; +bit [7:0] c; +bit [7:0] d; + +assign a[7:4] = 4'b0010; +assign b[7:6] = 2'b01; +assign b[5:4] = 2'b10; + +assign c = 8'bx; + +assign d = c + b - a; + +initial begin + #0 $display("%b %b %b %b", a, b, c, d); + if (d === 8'b01000000) + $display("PASSED"); + else + $display("FAILED"); +end + +endmodule diff --git a/ivtest/ivltests/br_gh1074b.v b/ivtest/ivltests/br_gh1074b.v new file mode 100644 index 000000000..5f6759219 --- /dev/null +++ b/ivtest/ivltests/br_gh1074b.v @@ -0,0 +1,24 @@ +module test(); + +bit [7:0] a; +bit [7:0] b; +bit [7:0] c; +bit [7:0] d; + +assign a[7:4] = 4'b0010; +assign b[7:6] = 2'b01; +assign b[5:4] = a[5:4]; + +assign c = 8'bz; + +assign d = c + b - a; + +initial begin + #0 $display("%b %b %b %b", a, b, c, d); + if (d === 8'b01000000) + $display("PASSED"); + else + $display("FAILED"); +end + +endmodule diff --git a/ivtest/regress-vvp.list b/ivtest/regress-vvp.list index 9a8e97fc7..17f7c63f0 100644 --- a/ivtest/regress-vvp.list +++ b/ivtest/regress-vvp.list @@ -32,6 +32,8 @@ br_gh710c vvp_tests/br_gh710c.json br_gh939 vvp_tests/br_gh939.json br_gh1018 vvp_tests/br_gh1018.json br_gh1029 vvp_tests/br_gh1029.json +br_gh1075a vvp_tests/br_gh1074a.json +br_gh1075b vvp_tests/br_gh1074b.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_gh1074a.json b/ivtest/vvp_tests/br_gh1074a.json new file mode 100644 index 000000000..667d5cc28 --- /dev/null +++ b/ivtest/vvp_tests/br_gh1074a.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "br_gh1074a.v", + "iverilog-args" : [ "-g2009" ] +} diff --git a/ivtest/vvp_tests/br_gh1074b.json b/ivtest/vvp_tests/br_gh1074b.json new file mode 100644 index 000000000..c2c9ab4c8 --- /dev/null +++ b/ivtest/vvp_tests/br_gh1074b.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "br_gh1074b.v", + "iverilog-args" : [ "-g2009" ] +}