Review change
Signed-off-by: Igor Zaworski <izaworski@internships.antmicro.com>
This commit is contained in:
parent
a631f4308c
commit
d520fb4e98
|
|
@ -42,6 +42,7 @@ class VirtIfaceVisitor final : public VNVisitor {
|
|||
private:
|
||||
// NODE STATE
|
||||
// AstIface::user1() -> AstVarScope*. Trigger var for this interface
|
||||
// AstVar::user1() -> AstIface*. Interface under which variable is
|
||||
const VNUser1InUse m_user1InUse;
|
||||
|
||||
// TYPES
|
||||
|
|
@ -149,10 +150,7 @@ private:
|
|||
memberVarp = nodep->varp();
|
||||
} else if (VN_IS(nodep->backp(), AssignW)) {
|
||||
memberVarp = nodep->varScopep()->varp();
|
||||
AstNode* backp = memberVarp;
|
||||
while ((backp = backp->backp())) {
|
||||
if ((ifacep = VN_CAST(backp, Iface))) break;
|
||||
}
|
||||
ifacep = VN_CAST(memberVarp->backp(), Iface);
|
||||
}
|
||||
|
||||
if (ifacep && memberVarp) {
|
||||
|
|
@ -168,6 +166,11 @@ public:
|
|||
// CONSTRUCTORS
|
||||
explicit VirtIfaceVisitor(AstNetlist* nodep)
|
||||
: m_netlistp{nodep} {
|
||||
nodep->foreach([](AstIface* const ifacep) {
|
||||
for (AstNode* nodep = ifacep->stmtsp(); nodep; nodep = nodep->nextp()) {
|
||||
if (AstVar* const varp = VN_CAST(nodep, Var)) varp->user1p(ifacep);
|
||||
}
|
||||
});
|
||||
iterate(nodep);
|
||||
}
|
||||
~VirtIfaceVisitor() override = default;
|
||||
|
|
|
|||
Loading…
Reference in New Issue