Support constexpr cycle delay in sequences (#6691)

This commit is contained in:
Ryszard Rozak
2025-11-14 13:48:46 +01:00
committed by GitHub
parent 0dce8feead
commit f32095dd17
7 changed files with 57 additions and 18 deletions
+4 -1
View File
@@ -331,7 +331,10 @@ private:
FileLine* const flp = nodep->fileline();
AstNodeExpr* valuep = V3Const::constifyEdit(nodep->lhsp()->unlinkFrBack());
const AstConst* const constp = VN_CAST(valuep, Const);
if (constp->isZero()) {
if (!constp) {
nodep->v3error(
"Delay value is not an elaboration-time constant (IEEE 1800-2023 16.7)");
} else if (constp->isZero()) {
nodep->v3warn(E_UNSUPPORTED, "Unsupported: ##0 delays");
VL_DO_DANGLING(nodep->unlinkFrBack()->deleteTree(), nodep);
VL_DO_DANGLING(valuep->deleteTree(), valuep);