mirror of
https://github.com/verilator/verilator.git
synced 2026-10-08 02:53:12 +02:00
Internals: Create VAccess class. No functional change intended.
This commit is contained in:
+3
-3
@@ -306,7 +306,7 @@ private:
|
||||
iterate(nodep->rhsp());
|
||||
AstVarRef* varrefp = VN_CAST(nodep->lhsp(), VarRef);
|
||||
AstConst* constp = VN_CAST(nodep->rhsp(), Const);
|
||||
if (varrefp && isSubstVar(varrefp->varp()) && !varrefp->lvalue() && constp) {
|
||||
if (varrefp && isSubstVar(varrefp->varp()) && !varrefp->access().isWrite() && constp) {
|
||||
// Nicely formed lvalues handled in NodeAssign
|
||||
// Other lvalues handled as unknown mess in AstVarRef
|
||||
int word = constp->toUInt();
|
||||
@@ -329,14 +329,14 @@ private:
|
||||
}
|
||||
virtual void visit(AstVarRef* nodep) override {
|
||||
// Any variable
|
||||
if (nodep->lvalue()) {
|
||||
if (nodep->access().isWrite()) {
|
||||
m_assignStep++;
|
||||
nodep->varp()->user2(m_assignStep);
|
||||
UINFO(9, " ASSIGNstep u2=" << nodep->varp()->user2() << " " << nodep << endl);
|
||||
}
|
||||
if (isSubstVar(nodep->varp())) {
|
||||
SubstVarEntry* entryp = getEntryp(nodep);
|
||||
if (nodep->lvalue()) {
|
||||
if (nodep->access().isWrite()) {
|
||||
UINFO(8, " ASSIGNcpx " << nodep << endl);
|
||||
entryp->assignComplex();
|
||||
} else if (AstNode* substp = entryp->substWhole(nodep)) {
|
||||
|
||||
Reference in New Issue
Block a user