virtual void visit(AstVarRef* nodep, AstNUser*) { // Any variable UndrivenVarEntry* entryp = getEntryp (nodep->varp()); bool fdrv = nodep->lvalue() && nodep->varp()->attrFileDescr(); // FD's are also being read from if (m_markBoth || nodep->lvalue()) entryp->drivenWhole(); if (m_markBoth || !nodep->lvalue() || fdrv) entryp->usedWhole(); }
virtual void visit(AstVarRef* nodep, AstNUser*) { // Any variable for (int usr=1; usr<(m_alwaysp?3:2); ++usr) { UndrivenVarEntry* entryp = getEntryp (nodep->varp(), usr); bool fdrv = nodep->lvalue() && nodep->varp()->attrFileDescr(); // FD's are also being read from if (m_markBoth || nodep->lvalue()) { if (usr==2 && m_alwaysp && entryp->isUsedNotDrivenAny()) { UINFO(9," Full bus. Entryp="<<(void*)entryp<<endl); warnAlwCombOrder(nodep); } entryp->drivenWhole(); } if (m_markBoth || !nodep->lvalue() || fdrv) entryp->usedWhole(); } }
// VISITORS virtual void visit(AstVar* nodep, AstNUser*) { UndrivenVarEntry* entryp = getEntryp (nodep); if (nodep->isInput() || nodep->isSigPublic() || nodep->isSigUserRWPublic() || (m_taskp && (m_taskp->dpiImport() || m_taskp->dpiExport()))) { entryp->drivenWhole(); } if (nodep->isOutput() || nodep->isSigPublic() || nodep->isSigUserRWPublic() || nodep->isSigUserRdPublic() || (m_taskp && (m_taskp->dpiImport() || m_taskp->dpiExport()))) { entryp->usedWhole(); } // Discover variables used in bit definitions, etc nodep->iterateChildren(*this); }
virtual void visit(AstVarRef* nodep, AstNUser*) { // Any variable UndrivenVarEntry* entryp = getEntryp (nodep->varp()); if (m_markBoth || nodep->lvalue()) entryp->drivenWhole(); if (m_markBoth || !nodep->lvalue()) entryp->usedWhole(); }