mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 12:17:35 +00:00
Internals: Link 'std' in LinkFind
This commit is contained in:
parent
3c686d0eb2
commit
46a5f04840
@ -1018,8 +1018,12 @@ class LinkDotFindVisitor final : public VNVisitor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
void visit(AstClassOrPackageRef* nodep) override {
|
void visit(AstClassOrPackageRef* nodep) override {
|
||||||
if (!nodep->classOrPackageNodep() && nodep->name() == "$unit") {
|
if (!nodep->classOrPackageNodep()) {
|
||||||
nodep->classOrPackageNodep(v3Global.rootp()->dollarUnitPkgAddp());
|
if (nodep->name() == "$unit") {
|
||||||
|
nodep->classOrPackageNodep(v3Global.rootp()->dollarUnitPkgAddp());
|
||||||
|
} else if (nodep->name() == "std") {
|
||||||
|
nodep->classOrPackageNodep(v3Global.rootp()->stdPackagep());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
@ -2202,7 +2206,6 @@ class LinkDotResolveVisitor final : public VNVisitor {
|
|||||||
sstr << "ds=" << names[m_dotPos];
|
sstr << "ds=" << names[m_dotPos];
|
||||||
sstr << " dse" << cvtToHex(m_dotSymp);
|
sstr << " dse" << cvtToHex(m_dotSymp);
|
||||||
sstr << "(" << m_dotSymp->nodep()->typeName() << ")";
|
sstr << "(" << m_dotSymp->nodep()->typeName() << ")";
|
||||||
|
|
||||||
if (m_dotErr) sstr << " [dotErr]";
|
if (m_dotErr) sstr << " [dotErr]";
|
||||||
if (m_super) sstr << " [super]";
|
if (m_super) sstr << " [super]";
|
||||||
if (m_unresolvedCell) sstr << " [unrCell]";
|
if (m_unresolvedCell) sstr << " [unrCell]";
|
||||||
@ -2698,6 +2701,7 @@ class LinkDotResolveVisitor final : public VNVisitor {
|
|||||||
// DOT(DOT(x,*here*),real-rhs) which we consider a RHS
|
// DOT(DOT(x,*here*),real-rhs) which we consider a RHS
|
||||||
if (start && m_ds.m_dotPos == DP_SCOPE) m_ds.m_dotPos = DP_FINAL;
|
if (start && m_ds.m_dotPos == DP_SCOPE) m_ds.m_dotPos = DP_FINAL;
|
||||||
UINFO(8, indent() << "iter.rhs " << m_ds.ascii() << " " << nodep << endl);
|
UINFO(8, indent() << "iter.rhs " << m_ds.ascii() << " " << nodep << endl);
|
||||||
|
// m_ds.m_dotSymp points at lhsp()'s symbol table, so resolve RHS under that
|
||||||
iterateAndNextNull(nodep->rhsp());
|
iterateAndNextNull(nodep->rhsp());
|
||||||
UINFO(8, indent() << "iter.rdone " << m_ds.ascii() << " " << nodep << endl);
|
UINFO(8, indent() << "iter.rdone " << m_ds.ascii() << " " << nodep << endl);
|
||||||
// if (debug() >= 9) nodep->dumpTree("- dot-rho: ");
|
// if (debug() >= 9) nodep->dumpTree("- dot-rho: ");
|
||||||
@ -3178,9 +3182,6 @@ class LinkDotResolveVisitor final : public VNVisitor {
|
|||||||
VL_RESTORER(m_ds);
|
VL_RESTORER(m_ds);
|
||||||
VL_RESTORER(m_pinSymp);
|
VL_RESTORER(m_pinSymp);
|
||||||
|
|
||||||
if (nodep->name() == "std" && !nodep->classOrPackagep()) {
|
|
||||||
nodep->classOrPackagep(v3Global.rootp()->stdPackagep());
|
|
||||||
}
|
|
||||||
// ClassRef's have pins, so track
|
// ClassRef's have pins, so track
|
||||||
if (nodep->classOrPackagep()) {
|
if (nodep->classOrPackagep()) {
|
||||||
m_pinSymp = m_statep->getNodeSym(nodep->classOrPackagep());
|
m_pinSymp = m_statep->getNodeSym(nodep->classOrPackagep());
|
||||||
|
Loading…
Reference in New Issue
Block a user