From 39753da458772db9628e9c2eadf492ccdbfa2886 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 28 Jan 2024 22:47:46 +0000 Subject: [PATCH] Add regression test for disabling binary NAND and NOR operators. --- ivtest/gold/br_gh552-iverilog-stderr.gold | 2 ++ ivtest/ivltests/br_gh552.v | 12 ++++++++++++ ivtest/regress-vvp.list | 1 + ivtest/vvp_tests/br_gh552.json | 6 ++++++ 4 files changed, 21 insertions(+) create mode 100644 ivtest/gold/br_gh552-iverilog-stderr.gold create mode 100644 ivtest/ivltests/br_gh552.v create mode 100644 ivtest/vvp_tests/br_gh552.json diff --git a/ivtest/gold/br_gh552-iverilog-stderr.gold b/ivtest/gold/br_gh552-iverilog-stderr.gold new file mode 100644 index 000000000..65d38b2cf --- /dev/null +++ b/ivtest/gold/br_gh552-iverilog-stderr.gold @@ -0,0 +1,2 @@ +ivltests/br_gh552.v:8: error: The binary NAND operator is an Icarus Verilog extension. Use -gicarus-misc to enable it. +ivltests/br_gh552.v:9: error: The binary NOR operator is an Icarus Verilog extension. Use -gicarus-misc to enable it. diff --git a/ivtest/ivltests/br_gh552.v b/ivtest/ivltests/br_gh552.v new file mode 100644 index 000000000..2ed4800e5 --- /dev/null +++ b/ivtest/ivltests/br_gh552.v @@ -0,0 +1,12 @@ +module test; + +reg [7:0] a; +reg [7:0] b; +reg [7:0] c; + +initial begin + c = a ~& b; + c = a ~| b; +end + +endmodule diff --git a/ivtest/regress-vvp.list b/ivtest/regress-vvp.list index a37079745..ba46e170f 100644 --- a/ivtest/regress-vvp.list +++ b/ivtest/regress-vvp.list @@ -25,6 +25,7 @@ br_gh383b vvp_tests/br_gh383b.json br_gh383c vvp_tests/br_gh383c.json br_gh383d vvp_tests/br_gh383d.json br_gh440 vvp_tests/br_gh440.json +br_gh552 vvp_tests/br_gh552.json br_gh687 vvp_tests/br_gh687.json br_gh710a vvp_tests/br_gh710a.json br_gh710b vvp_tests/br_gh710b.json diff --git a/ivtest/vvp_tests/br_gh552.json b/ivtest/vvp_tests/br_gh552.json new file mode 100644 index 000000000..7df76ede2 --- /dev/null +++ b/ivtest/vvp_tests/br_gh552.json @@ -0,0 +1,6 @@ +{ + "type" : "CE", + "source" : "br_gh552.v", + "gold" : "br_gh552", + "iverilog-args" : [ "-gno-icarus-misc" ] +}