diff options
author | Jannis Harder <me@jix.one> | 2023-02-15 13:04:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-15 13:04:43 +0100 |
commit | 68480dfa19a775c834eec45a04a2a4472127625b (patch) | |
tree | ce4c9285e6bcb2f8a6e07aebae65b4b1223bd2d9 /tests | |
parent | 53bda9de542e2e39763520e7291f26f85e57b67b (diff) | |
parent | 26a6c604788f947df5142088224b1989320ba467 (diff) | |
download | yosys-68480dfa19a775c834eec45a04a2a4472127625b.tar.gz yosys-68480dfa19a775c834eec45a04a2a4472127625b.tar.bz2 yosys-68480dfa19a775c834eec45a04a2a4472127625b.zip |
Merge pull request #3671 from zachjs/master
Add test for typenames using constants shadowed later on
Diffstat (limited to 'tests')
-rw-r--r-- | tests/verilog/typedef_const_shadow.sv | 12 | ||||
-rw-r--r-- | tests/verilog/typedef_const_shadow.ys | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/verilog/typedef_const_shadow.sv b/tests/verilog/typedef_const_shadow.sv new file mode 100644 index 000000000..e2c331be1 --- /dev/null +++ b/tests/verilog/typedef_const_shadow.sv @@ -0,0 +1,12 @@ +module top; + localparam W = 5; + typedef logic [W-1:0] T; + T x; // width 5 + if (1) begin : blk + localparam W = 10; + typedef T U; + typedef logic [W-1:0] V; + U y; // width 5 + V z; // width 10 + end +endmodule diff --git a/tests/verilog/typedef_const_shadow.ys b/tests/verilog/typedef_const_shadow.ys new file mode 100644 index 000000000..ecf47181d --- /dev/null +++ b/tests/verilog/typedef_const_shadow.ys @@ -0,0 +1,4 @@ +read_verilog -sv typedef_const_shadow.sv +select -assert-count 1 w:x s:5 %i +select -assert-count 1 w:blk.y s:5 %i +select -assert-count 1 w:blk.z s:10 %i |