verilog: check for module scope identifiers during width detection
authorZachary Snow <zach@zachjs.com>
Sat, 5 Jun 2021 20:21:09 +0000 (16:21 -0400)
committerZachary Snow <zachary.j.snow@gmail.com>
Tue, 8 Jun 2021 19:03:16 +0000 (15:03 -0400)
commit2e697f5655455fd8ce5fec40b94683a11ade24e8
treec52389aa8feb3328e1a4c97bd5e3db303b187a96
parentc79fbfe0a130f1a2979413174c3e5688433bafe3
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().
frontends/ast/ast.h
frontends/ast/genrtlil.cc
frontends/ast/simplify.cc
tests/simple/module_scope_case.v [new file with mode: 0644]