Support parameter resolution of 1D unpacked array slices (#6257) (#6268)

This commit is contained in:
Michael Bedford Taylor
2025-08-06 17:29:40 -04:00
committed by GitHub
parent 6c1cfc68cf
commit 218659f4e8
6 changed files with 170 additions and 0 deletions
+8
View File
@@ -732,6 +732,14 @@ class ParamProcessor final {
AstNode* const exprp = pinp->exprp();
longnamer += "_" + paramSmallName(srcModp, modvarp) + paramValueNumber(exprp);
any_overridesr = true;
} else if (VN_IS(pinp->exprp(), InitArray)) {
// Array assigned to scalar parameter. Treat the InitArray as a constant
// integer array and include it in the module name. Constantify nested
// expressions before mangling the value number.
V3Const::constifyParamsEdit(pinp->exprp());
longnamer += "_" + paramSmallName(srcModp, modvarp)
+ paramValueNumber(pinp->exprp());
any_overridesr = true;
} else {
V3Const::constifyParamsEdit(pinp->exprp());
// String constants are parsed as logic arrays and converted to strings in V3Const.