mirror of
https://github.com/verilator/verilator.git
synced 2026-09-01 18:36:28 +02:00
Add error on solve before of randc variable.
This commit is contained in:
@@ -401,6 +401,15 @@ class RandomizeMarkVisitor final : public VNVisitor {
|
||||
}
|
||||
}
|
||||
}
|
||||
void visit(AstConstraintBefore* nodep) override {
|
||||
nodep->foreach([&](AstVarRef* const refp) {
|
||||
if (refp->varp() && refp->varp()->isRandC()) {
|
||||
nodep->v3error(
|
||||
"Randc variables not allowed in 'solve before' (IEEE 1800-2023 18.5.9)");
|
||||
}
|
||||
});
|
||||
iterateChildrenConst(nodep);
|
||||
}
|
||||
void visit(AstConstraintExpr* nodep) override {
|
||||
VL_RESTORER(m_constraintExprp);
|
||||
m_constraintExprp = nodep;
|
||||
|
||||
Reference in New Issue
Block a user