aboutsummaryrefslogtreecommitdiffstats
path: root/tests/simple/genblk_dive.v
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2021-02-04 09:57:28 +0000
committerGitHub <noreply@github.com>2021-02-04 09:57:28 +0000
commitbaf1875307f1608762169d3037ba005da88b201e (patch)
tree44b84ab2ef42251cdc916a417e105c3f172c2a19 /tests/simple/genblk_dive.v
parentafcc31ceba35d33fc11f9e1592956bb4112ca0e3 (diff)
parentfe74b0cd95267bc78953236311382653a6db7f60 (diff)
downloadyosys-baf1875307f1608762169d3037ba005da88b201e.tar.gz
yosys-baf1875307f1608762169d3037ba005da88b201e.tar.bz2
yosys-baf1875307f1608762169d3037ba005da88b201e.zip
Merge pull request #2529 from zachjs/unnamed-genblk
verilog: significant block scoping improvements
Diffstat (limited to 'tests/simple/genblk_dive.v')
-rw-r--r--tests/simple/genblk_dive.v21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/simple/genblk_dive.v b/tests/simple/genblk_dive.v
new file mode 100644
index 000000000..98d0e1f4b
--- /dev/null
+++ b/tests/simple/genblk_dive.v
@@ -0,0 +1,21 @@
+`default_nettype none
+module top(output wire x);
+ generate
+ if (1) begin : Z
+ if (1) begin : A
+ wire x;
+ if (1) begin : B
+ wire x;
+ if (1) begin : C
+ wire x;
+ assign B.x = 0;
+ wire z = A.B.C.x;
+ end
+ assign A.x = A.B.C.x;
+ end
+ assign B.C.x = B.x;
+ end
+ end
+ endgenerate
+ assign x = Z.A.x;
+endmodule