Fix queue poping wrong value when otherwise unused (#2512).

This commit is contained in:
Wilson Snyder
2020-11-07 10:37:55 -05:00
parent 7c4259bc0a
commit 2a24bb4759
29 changed files with 164 additions and 86 deletions
+3 -2
View File
@@ -154,10 +154,11 @@ public:
// Called by TableSimulateVisitor on each unique varref encountered
UINFO(9, " SimVARREF " << nodep << endl);
AstVarScope* vscp = nodep->varScopep();
if (nodep->access().isWrite()) {
if (nodep->access().isWriteOrRW()) {
m_outWidth += nodep->varp()->dtypeSkipRefp()->widthTotalBytes();
m_outVarps.push_back(vscp);
} else {
}
if (nodep->access().isReadOrRW()) {
// We'll make the table with a separate natural alignment for each
// output var, so always have char, 16 or 32 bit widths, so use widthTotalBytes
m_inWidth += nodep->varp()->width(); // Space for var