Support #1step delay as statement (#6671)

This commit is contained in:
Pawel Kojma
2025-11-10 09:39:33 -05:00
committed by GitHub
parent 19bbeb24a6
commit 0062a422a4
5 changed files with 47 additions and 5 deletions
+4
View File
@@ -891,6 +891,10 @@ class TimingControlVisitor final : public VNVisitor {
new AstConst{flp, AstConst::Unsized64{},
static_cast<uint64_t>(timescaleFactor)}};
}
} else if (constp->num().is1Step()) {
VL_DO_DANGLING(valuep->deleteTree(), valuep);
valuep = new AstConst{flp, AstConst::Unsized64{}, 1};
valuep->dtypeSetBitSized(64, VSigning::UNSIGNED);
}
// Replace self with a 'co_await dlySched.delay(<valuep>)'
AstCMethodHard* const delayMethodp = new AstCMethodHard{