diff --git a/src/V3Inst.cpp b/src/V3Inst.cpp index a7ea77af9..9fe61bea3 100644 --- a/src/V3Inst.cpp +++ b/src/V3Inst.cpp @@ -172,7 +172,7 @@ private: m_cellRangep = nodep->rangep(); UINFO(4," CELL "<nextp()->castVar(); + AstVar* ifaceVarp = nodep->nextp()->castVar(); bool isIface = ifaceVarp && ifaceVarp->dtypep()->castUnpackArrayDType() && ifaceVarp->dtypep()->castUnpackArrayDType()->subDTypep()->castIfaceRefDType(); @@ -193,9 +193,9 @@ private: // If this AstCell is actually an interface instantiation, let's ensure we also clone // the IfaceRef. if (isIface) { - AstUnpackArrayDType *arrdtype = ifaceVarp->dtypep()->castUnpackArrayDType(); + AstUnpackArrayDType* arrdtype = ifaceVarp->dtypep()->castUnpackArrayDType(); AstVar* varNewp = ifaceVarp->cloneTree(false); - AstIfaceRefDType *ifaceRefp = arrdtype->subDTypep()->castIfaceRefDType()->cloneTree(false); + AstIfaceRefDType* ifaceRefp = arrdtype->subDTypep()->castIfaceRefDType()->cloneTree(false); arrdtype->addNextHere(ifaceRefp); ifaceRefp->cellp(newp); ifaceRefp->cellName(newp->name()); @@ -246,21 +246,21 @@ private: } else { nodep->v3fatalSrc("Width mismatch; V3Width should have errored out."); } - } else if(AstArraySel *arrselp = nodep->exprp()->castArraySel()) { - if (AstUnpackArrayDType *arrp = arrselp->lhsp()->dtypep()->castUnpackArrayDType()) { + } else if(AstArraySel* arrselp = nodep->exprp()->castArraySel()) { + if (AstUnpackArrayDType* arrp = arrselp->lhsp()->dtypep()->castUnpackArrayDType()) { if (!arrp->subDTypep()->castIfaceRefDType()) return; V3Const::constifyParamsEdit(arrselp->rhsp()); - AstConst *constp = arrselp->rhsp()->castConst(); + AstConst* constp = arrselp->rhsp()->castConst(); if (!constp) { nodep->v3error("Unsupported: Non-constant index when passing interface to module"); return; } string index = AstNode::encodeNumber(constp->toSInt()); - AstVarRef *varrefp = arrselp->lhsp()->castVarRef(); - AstVarXRef *newp = new AstVarXRef(nodep->fileline(),varrefp->name () + "__BRA__" + index + "__KET__", "", true); - AstVar *varp = varrefp->varp()->cloneTree(true); + AstVarRef* varrefp = arrselp->lhsp()->castVarRef(); + AstVarXRef* newp = new AstVarXRef(nodep->fileline(),varrefp->name () + "__BRA__" + index + "__KET__", "", true); + AstVar* varp = varrefp->varp()->cloneTree(true); varp->name(varp->name() + "__TMP__" + "__BRA__" + index + "__KET__"); if (!nodep->modVarp()->dtypep()) nodep->v3fatalSrc("No dtype for AstPin"); varp->dtypep(nodep->modVarp()->dtypep()); diff --git a/src/V3LinkCells.cpp b/src/V3LinkCells.cpp index dcec8f38f..d9a7d0fe5 100644 --- a/src/V3LinkCells.cpp +++ b/src/V3LinkCells.cpp @@ -349,12 +349,12 @@ private: // may remap interfaces to be more like a class. if (!nodep->hasIfaceVar()) { string varName = nodep->name() + "__Viftop"; // V3LinkDot looks for this naming - AstIfaceRefDType *idtypep = new AstIfaceRefDType(nodep->fileline(), nodep->name(), + AstIfaceRefDType* idtypep = new AstIfaceRefDType(nodep->fileline(), nodep->name(), nodep->modp()->name()); idtypep->ifacep(NULL); // cellp overrides - AstVar *varp; + AstVar* varp; if (nodep->rangep()) { - AstNodeArrayDType *arrp = new AstUnpackArrayDType(nodep->fileline(),VFlagChildDType(), idtypep, nodep->rangep()->cloneTree(true)); + AstNodeArrayDType* arrp = new AstUnpackArrayDType(nodep->fileline(),VFlagChildDType(), idtypep, nodep->rangep()->cloneTree(true)); varp = new AstVar(nodep->fileline(), AstVarType::IFACEREF, varName, VFlagChildDType(), arrp); } else { diff --git a/src/V3Param.cpp b/src/V3Param.cpp index b7a900831..440c890ea 100644 --- a/src/V3Param.cpp +++ b/src/V3Param.cpp @@ -496,7 +496,7 @@ void ParamVisitor::visitCell(AstCell* nodep) { if (modvarp->isIfaceRef()) { AstIfaceRefDType* portIrefp = modvarp->subDTypep()->castIfaceRefDType(); AstIfaceRefDType* pinIrefp = NULL; - AstNode *exprp = pinp->exprp(); + AstNode* exprp = pinp->exprp(); if (exprp && exprp->castVarRef() && exprp->castVarRef()->varp()