Skip to content

Commit

Permalink
Include variable to map if it uses rand mode
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Dec 6, 2024
1 parent ee69b65 commit 89fb5a2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/V3Randomize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1163,10 +1163,8 @@ class RandomizeVisitor final : public VNVisitor {
}
void fillConstrainedMapRecurse(AstNode* const nodep, AstClass* const classp) {
if (AstVarRef* const varRefp = VN_CAST(nodep, VarRef)) {
if (varRefp->user1()) {
AstVar* const varp = varRefp->varp();
m_constrainedVars[classp].insert(varp);
}
AstVar* const varp = varRefp->varp();
if (varRefp->user1() || varp->user1()) m_constrainedVars[classp].insert(varp);
return;
}
if (nodep->op1p()) fillConstrainedMapRecurse(nodep->op1p(), classp);
Expand Down

0 comments on commit 89fb5a2

Please sign in to comment.