Fix tristate lowering for interface inout ports (#7134 repair) (#7708) (#7710)

Fixes #7708.
This commit is contained in:
Nick Brereton
2026-06-03 19:51:49 -04:00
committed by GitHub
parent 7bd41bfbb9
commit 4d5393c191
3 changed files with 83 additions and 2 deletions
+2 -2
View File
@@ -739,7 +739,7 @@ class TristateVisitor final : public TristateBaseVisitor {
// Check if the var is owned by a different module (cross-module reference).
// For interface vars this is expected; for regular modules it's unsupported.
AstNodeModule* const ownerModp = findParentModule(invarp);
const bool isCrossModule = ownerModp && ownerModp != nodep && !invarp->isIO();
const bool isCrossModule = ownerModp && ownerModp != nodep;
const bool isIfaceTri = isCrossModule && VN_IS(ownerModp, Iface);
if (isCrossModule && !isIfaceTri) {
@@ -778,7 +778,7 @@ class TristateVisitor final : public TristateBaseVisitor {
kv.second.inlinedDots,
findModportForDotted(nodep, kv.first));
}
} else if (VN_IS(nodep, Iface)) {
} else if (VN_IS(nodep, Iface) && !invarp->isIO()) {
// Local driver in an interface module - use contribution mechanism
// so it can be combined with any external drivers later
insertTristatesSignal(nodep, invarp, refsp, true, "", "", nullptr);