Skip to content

Commit

Permalink
Rewrite the handling of AstIfaceRefDType in V3LinkDot
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
  • Loading branch information
RRozak committed Dec 4, 2023
1 parent cdff123 commit 9de0c55
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/V3LinkDot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3755,17 +3755,17 @@ class LinkDotResolveVisitor final : public VNVisitor {
}

void visit(AstIfaceRefDType* nodep) override {
if (!nodep->ifacep()) {
// If nodep has cellp() set, parameters are children of that AstCell node
UASSERT_OBJ(!nodep->paramsp(), nodep, "Port parameters of AstIfaceRefDType without ifacep()");
return;
if (nodep->paramsp()) {
// If there is no parameters, there is no need to visit this node.
AstIface* const ifacep = nodep->ifacep();
UASSERT_OBJ(ifacep, nodep, "Port parameters of AstIfaceRefDType without ifacep()");
if (ifacep->dead()) return;
checkNoDot(nodep);
m_usedPins.clear();
VL_RESTORER(m_pinSymp);
m_pinSymp = m_statep->getNodeSym(ifacep);
iterate(nodep->paramsp());
}
if(nodep->ifacep()->dead()) return;
checkNoDot(nodep);
m_usedPins.clear();
VL_RESTORER(m_pinSymp);
m_pinSymp = m_statep->getNodeSym(nodep->ifacep());
iterateChildren(nodep);
}

void visit(AstAttrOf* nodep) override { iterateChildren(nodep); }
Expand Down

0 comments on commit 9de0c55

Please sign in to comment.