Fix always processes ignoring $finish (#5971).

This commit is contained in:
Wilson Snyder
2025-05-02 07:36:42 -04:00
parent 3b8d10cae5
commit 15ebbd309f
10 changed files with 68 additions and 15 deletions
+8 -2
View File
@@ -435,8 +435,14 @@ void orderSequentially(AstCFunc* funcp, const LogicByScope& lbs) {
if (VN_IS(procp, Always)) {
subFuncp->slow(false);
FileLine* const flp = procp->fileline();
bodyp
= new AstWhile{flp, new AstConst{flp, AstConst::BitTrue{}}, bodyp};
bodyp = new AstWhile{
flp,
// If we change to use exceptions to handle finish/stop,
// this can get removed
new AstCExpr{flp,
"VL_LIKELY(!vlSymsp->_vm_contextp__->gotFinish())", 1,
true},
bodyp};
}
}
subFuncp->addStmtsp(bodyp);