From 0679d7c8cf1a58bd7deec3ec85b6733646f65757 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 24 Feb 2024 11:49:46 +0000 Subject: [PATCH] Add regression test for issue #1099 --- ivtest/ivltests/br_gh1099.v | 24 ++++++++++++++++++++++++ ivtest/regress-vvp.list | 1 + ivtest/vvp_tests/br_gh1099.json | 4 ++++ 3 files changed, 29 insertions(+) create mode 100644 ivtest/ivltests/br_gh1099.v create mode 100644 ivtest/vvp_tests/br_gh1099.json diff --git a/ivtest/ivltests/br_gh1099.v b/ivtest/ivltests/br_gh1099.v new file mode 100644 index 000000000..14e33fbaf --- /dev/null +++ b/ivtest/ivltests/br_gh1099.v @@ -0,0 +1,24 @@ +module top; + reg [3:0] inp1; + reg signed [3:0] inp2; + wire [4:0] out1, out2; + initial begin + $monitor("%b %b %b %b", inp1, inp2, out1, out2); + #1 inp1 = 4'b1111; + #1 inp2 = 4'b1111; + #1; + if ((out1 === 5'b01111) && (out2 === 5'b01111)) + $display("PASSED"); + else + $display("FAILED"); + end + mod m1({inp1}, out1); + mod m2({inp2}, out2); +endmodule + +module mod( + input [4:0] inp, + output [4:0] out +); + assign out = inp; +endmodule diff --git a/ivtest/regress-vvp.list b/ivtest/regress-vvp.list index eada3433a..f13bf9f74 100644 --- a/ivtest/regress-vvp.list +++ b/ivtest/regress-vvp.list @@ -42,6 +42,7 @@ br_gh1087a2 vvp_tests/br_gh1087a2.json br_gh1087a3 vvp_tests/br_gh1087a3.json br_gh1087b vvp_tests/br_gh1087b.json br_gh1087c vvp_tests/br_gh1087c.json +br_gh1099 vvp_tests/br_gh1099.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_gh1099.json b/ivtest/vvp_tests/br_gh1099.json new file mode 100644 index 000000000..5f4d411e8 --- /dev/null +++ b/ivtest/vvp_tests/br_gh1099.json @@ -0,0 +1,4 @@ +{ + "type" : "normal", + "source" : "br_gh1099.v" +}