mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Support procedural concurrent assertions with inferred clock (#7581)
This commit is contained in:
+8
-10
@@ -415,24 +415,22 @@ class AssertVisitor final : public VNVisitor {
|
||||
nodep->v3fatalSrc("Unhandled assert type");
|
||||
}
|
||||
iterateAndNextNull(nodep->passsp());
|
||||
AstSenTree* const sentreep = nodep->sentreep();
|
||||
AstSenTree* sentreep = nodep->sentreep();
|
||||
if (nodep->immediate()) {
|
||||
UASSERT_OBJ(!sentreep, nodep, "Immediate assertions don't have sensitivity");
|
||||
} else {
|
||||
UASSERT_OBJ(sentreep, nodep, "Concurrent assertions must have sensitivity");
|
||||
if (m_procedurep) {
|
||||
if (!nodep->senFromAlways()) {
|
||||
// To support this need queue of asserts to activate
|
||||
nodep->v3warn(E_UNSUPPORTED,
|
||||
"Unsupported: Procedural concurrent assertion with"
|
||||
" clocking event inside always (IEEE 1800-2023 16.14.6)");
|
||||
}
|
||||
// Change type to concurrent and relink after process
|
||||
nodep->immediate(false);
|
||||
// Explicit inline clock differs from the enclosing always: hoist
|
||||
// and warn. To support this need queue of asserts to activate.
|
||||
if (m_procedurep && !nodep->senFromAlways()) {
|
||||
nodep->v3warn(E_UNSUPPORTED,
|
||||
"Unsupported: Procedural concurrent assertion with"
|
||||
" clocking event inside always (IEEE 1800-2023 16.14.6)");
|
||||
static_cast<AstNode*>(m_procedurep)->addNext(nodep->unlinkFrBack());
|
||||
return; // Later iterate will pick up
|
||||
}
|
||||
sentreep->unlinkFrBack();
|
||||
if (m_procedurep) { VL_DO_DANGLING(pushDeletep(sentreep), sentreep); }
|
||||
}
|
||||
//
|
||||
const string& message = nodep->name();
|
||||
|
||||
Reference in New Issue
Block a user