From 1d5f3fe5064146955dafdabafe7180ff79c95d08 Mon Sep 17 00:00:00 2001 From: Zachary Snow Date: Sat, 6 Feb 2021 23:54:17 -0500 Subject: verlog: allow shadowing module ports within generate blocks This is a somewhat obscure edge case I encountered while working on test cases for earlier changes. Declarations in generate blocks should not be checked against the list of ports. This change also adds a check forbidding declarations within generate blocks being tagged as inputs or outputs. --- tests/simple/genblk_port_shadow.v | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/simple/genblk_port_shadow.v (limited to 'tests/simple') diff --git a/tests/simple/genblk_port_shadow.v b/tests/simple/genblk_port_shadow.v new file mode 100644 index 000000000..a04631a20 --- /dev/null +++ b/tests/simple/genblk_port_shadow.v @@ -0,0 +1,10 @@ +module top(x); + generate + if (1) begin : blk + wire x; + assign x = 0; + end + endgenerate + output wire x; + assign x = blk.x; +endmodule -- cgit v1.2.3