Fix interface exposure with --public-depth or --trace-depth (#5758).

This commit is contained in:
Wilson Snyder
2025-09-23 22:05:51 -04:00
parent d972b7465a
commit fd12ab3413
17 changed files with 225 additions and 14 deletions
+2 -2
View File
@@ -354,7 +354,7 @@ class LinkParseVisitor final : public VNVisitor {
} else if (v3Global.opt.publicParams() && nodep->isParam()) {
nodep->sigUserRWPublic(true);
} else if (m_modp && v3Global.opt.publicDepth()) {
if ((m_modp->level() - 1) <= v3Global.opt.publicDepth()) {
if ((m_modp->depth() - 1) <= v3Global.opt.publicDepth()) {
nodep->sigUserRWPublic(true);
} else if (VN_IS(m_modp, Package) && nodep->isParam()) {
nodep->sigUserRWPublic(true);
@@ -365,7 +365,7 @@ class LinkParseVisitor final : public VNVisitor {
// We used modTrace before leveling, and we may now
// want to turn it off now that we know the levelizations
if (v3Global.opt.traceDepth() && m_modp
&& (m_modp->level() - 1) > v3Global.opt.traceDepth()) {
&& (m_modp->depth() - 1) > v3Global.opt.traceDepth()) {
m_modp->modTrace(false);
nodep->trace(false);
}