Skip to content

Commit

Permalink
Fill setup task body
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Dec 3, 2024
1 parent 0b53f4e commit 7e204ee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/V3Randomize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,11 @@ class ConstraintExprVisitor final : public VNVisitor {
m_taskp = new AstTask{nodep->fileline(), name + "_setup_constraint", m_genp};
nodep->user2p(m_taskp);
iterateChildren(nodep);
if (AstConstraint* constrp = VN_CAST(nodep, Constraint)) {
m_taskp->addStmtsp(constrp->itemsp()->unlinkFrBackWithNext());
} else if (AstWith* withp = VN_CAST(nodep, With)) {
m_taskp->addStmtsp(withp->exprp()->unlinkFrBackWithNext());
}
}
};

Expand Down

0 comments on commit 7e204ee

Please sign in to comment.