Internals: Move interface error to later phase, prep for later commit. No functional change intended.

This commit is contained in:
Wilson Snyder 2024-09-28 17:37:44 -04:00
parent 5b56c80830
commit 1dc6fd3d93
2 changed files with 9 additions and 9 deletions

View File

@ -489,6 +489,15 @@ public:
}
} else if (ifacerefp->ifaceViaCellp()->dead()) {
if (varp->isIfaceRef()) {
if (forPrimary() && !varp->isIfaceParent()
&& !v3Global.opt.topIfacesSupported()) {
// Only AstIfaceRefDType's at this point correspond to ports;
// haven't made additional ones for interconnect yet, so assert is simple
// What breaks later is we don't have a Scope/Cell representing
// the interface to attach to
varp->v3warn(E_UNSUPPORTED,
"Unsupported: Interfaced port on top level module");
}
ifacerefp->v3error("Parent instance's interface is not found: "
<< AstNode::prettyNameQ(ifacerefp->ifaceName()));
} else {

View File

@ -398,15 +398,6 @@ class LinkParseVisitor final : public VNVisitor {
VN_AS(nodep->valuep()->unlinkFrBack(), NodeExpr)});
}
}
if (nodep->isIfaceRef() && !nodep->isIfaceParent() && !v3Global.opt.topIfacesSupported()) {
// Only AstIfaceRefDType's at this point correspond to ports;
// haven't made additional ones for interconnect yet, so assert is simple
// What breaks later is we don't have a Scope/Cell representing
// the interface to attach to
if (m_modp->level() <= 2) {
nodep->v3warn(E_UNSUPPORTED, "Unsupported: Interfaced port on top level module");
}
}
}
void visit(AstConst* nodep) override {
if (nodep->num().autoExtend() && nodep->fileline()->language() < V3LangCode::L1800_2005) {