Fix internal error with UNSUPPORTED of procedural clocked assertions

This commit is contained in:
Wilson Snyder
2023-02-28 00:35:58 -05:00
parent a3ff375ce7
commit a0997d0b98
4 changed files with 71 additions and 0 deletions
+11
View File
@@ -43,6 +43,7 @@ private:
AstVar* m_monitorOffVarp = nullptr; // $monitoroff variable
unsigned m_modPastNum = 0; // Module past numbering
unsigned m_modStrobeNum = 0; // Module $strobe numbering
const AstNodeProcedure* m_procedurep = nullptr; // Current procedure
VDouble0 m_statCover; // Statistic tracking
VDouble0 m_statAsNotImm; // Statistic tracking
VDouble0 m_statAsImm; // Statistic tracking
@@ -145,6 +146,11 @@ private:
} else {
UASSERT_OBJ(sentreep, nodep, "Concurrent assertions must have sensitivity");
sentreep->unlinkFrBack();
if (m_procedurep) {
// To support this need queue of asserts to activate
nodep->v3error("Unsupported: Procedural concurent assertion with"
" clocking event inside always (IEEE 1800-2917 16.14.6)");
}
}
//
AstNode* bodysp = nullptr;
@@ -495,6 +501,11 @@ private:
iterateChildren(nodep);
}
}
void visit(AstNodeProcedure* nodep) override {
VL_RESTORER(m_procedurep);
m_procedurep = nodep;
iterateChildren(nodep);
}
void visit(AstBegin* nodep) override {
// This code is needed rather than a visitor in V3Begin,
// because V3Assert is called before V3Begin