3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 00:55:32 +00:00

verilog: check for module scope identifiers during width detection

The recent fix for case expression width detection causes the width of
the expressions to be queried before they are simplified. Because the
logic supporting module scope identifiers only existed in simplify,
looking them up would fail during width detection. This moves the logic
to a common helper used in both simplify() and detectSignWidthWorker().
This commit is contained in:
Zachary Snow 2021-06-05 16:21:09 -04:00 committed by Zachary Snow
parent c79fbfe0a1
commit 2e697f5655
4 changed files with 41 additions and 13 deletions

View file

@ -0,0 +1,11 @@
module top(
input wire x,
output reg y
);
always @* begin
case (top.x)
1: top.y = 0;
0: top.y = 1;
endcase
end
endmodule