Skip to content

Commit

Permalink
Move the 2nd V3LinkLValue pass after V3Width
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Nov 13, 2023
1 parent c8063e5 commit 7da45b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Verilator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ static void process() {
// This requires some width calculations and constant propagation
V3Param::param(v3Global.rootp());
V3LinkDot::linkDotParamed(v3Global.rootp()); // Cleanup as made new modules
V3LinkLValue::linkLValue(v3Global.rootp()); // Resolve new VarRefs
V3Error::abortIfErrors();

// Remove any modules that were parameterized and are no longer referenced.
Expand All @@ -187,6 +186,8 @@ static void process() {
// Calculate and check widths, edit tree to TRUNC/EXTRACT any width mismatches
V3Width::width(v3Global.rootp());

V3LinkLValue::linkLValue(v3Global.rootp()); // Resolve new VarRefs

V3Error::abortIfErrors();

// Commit to the widths we've chosen; Make widthMin==width
Expand Down

0 comments on commit 7da45b3

Please sign in to comment.