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:
parent
c79fbfe0a1
commit
2e697f5655
4 changed files with 41 additions and 13 deletions
11
tests/simple/module_scope_case.v
Normal file
11
tests/simple/module_scope_case.v
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue