From 7e204eee00dda6714d7e2b7ff2e18b812aae20fd Mon Sep 17 00:00:00 2001 From: Ryszard Rozak Date: Tue, 3 Dec 2024 14:19:43 +0100 Subject: [PATCH] Fill setup task body Signed-off-by: Ryszard Rozak --- src/V3Randomize.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/V3Randomize.cpp b/src/V3Randomize.cpp index 939d1ab783..ea242ca841 100644 --- a/src/V3Randomize.cpp +++ b/src/V3Randomize.cpp @@ -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()); + } } };