Fix error on non-existent interface ports (#8393)

Signed-off-by: Andrii Andrieiev <[email protected]>
This commit is contained in:
Andrii Andrieiev
2026-09-18 08:26:56 -04:00
committed by GitHub
parent c25f287779
commit 064ecbcb82
6 changed files with 98 additions and 15 deletions
+1 -3
View File
@@ -642,15 +642,13 @@ public:
UINFO(9, " insAllIface se" << cvtToHex(varSymp) << " " << varp);
AstIfaceRefDType* const ifacerefp = ifaceRefFromArray(varp->subDTypep());
UASSERT_OBJ(ifacerefp, varp, "Non-ifacerefs on list!");
const bool varGotPort = varp && varp->user4();
if (ifacerefp->isPortDecl() && !varGotPort) {
if (!ifacerefp->cellp() && !ifacerefp->isVirtual() && (varp->pinNum() == 0)) {
varp->v3error("Interface port declaration "
<< varp->prettyNameQ() << " doesn't have corresponding port\n"
<< varp->warnMore()
+ "... Perhaps intended an interface instantiation but "
"are missing parenthesis (IEEE 1800-2023 25.3)?");
}
ifacerefp->isPortDecl(false); // Only needed for this warning; soon removing AstPort
if (!ifacerefp->ifaceViaCellp()) {
if (!ifacerefp->cellp()) { // Probably a NotFoundModule, or a normal module if
// made mistake