From 7da45b31ccfdfa7574d2f84087e00a262119606f Mon Sep 17 00:00:00 2001 From: Ryszard Rozak Date: Mon, 13 Nov 2023 13:32:36 +0100 Subject: [PATCH] Move the 2nd V3LinkLValue pass after V3Width Signed-off-by: Ryszard Rozak --- src/Verilator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Verilator.cpp b/src/Verilator.cpp index 32f1108cba..ea83a2cae7 100644 --- a/src/Verilator.cpp +++ b/src/Verilator.cpp @@ -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. @@ -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