Fix toggle coverage dataDeclp error on multi-edge driven signals.

This commit is contained in:
Wilson Snyder
2024-02-08 19:21:44 -05:00
parent be471e9ccc
commit a23cf1ceea
7 changed files with 56 additions and 3 deletions
+1 -1
View File
@@ -2653,7 +2653,7 @@ public:
const char* broken() const override {
if (m_dataDeclp
&& (m_dataDeclp == this || m_dataDeclp->m_dataDeclp)) { // Avoid O(n^2) accessing
v3fatalSrc("dataDeclp should point to real data, not be a list");
v3fatalSrc("dataDeclp should point to real data, not be a list: " << cvtToHex(this));
}
return nullptr;
}
+4 -1
View File
@@ -48,6 +48,8 @@ class CoverageJoinVisitor final : public VNVisitor {
V3DupFinder dupFinder; // Duplicate code detection
// Hash all of the original signals we toggle cover
for (AstCoverToggle* nodep : m_toggleps) dupFinder.insert(nodep->origp());
if (dumpLevel() || debug() >= 9)
dupFinder.dumpFile(v3Global.debugFilename("coveragejoin") + ".hash", false);
// Find if there are any duplicates
for (AstCoverToggle* nodep : m_toggleps) {
// nodep->backp() is null if we already detected it's a duplicate and unlinked earlier
@@ -85,7 +87,8 @@ class CoverageJoinVisitor final : public VNVisitor {
}
// VISITORS
void visit(AstNetlist* nodep) override {
void visit(AstActive* nodep) override {
m_toggleps.clear();
// Find all Coverage's
iterateChildren(nodep);
// Simplify
+1
View File
@@ -53,6 +53,7 @@ V3DupFinder::iterator V3DupFinder::findDuplicate(AstNode* nodep, V3DupFinderUser
}
void V3DupFinder::dumpFile(const string& filename, bool tree) {
UINFO(2, "Dumping " << filename << endl);
const std::unique_ptr<std::ofstream> logp{V3File::new_ofstream(filename)};
if (logp->fail()) v3fatal("Can't write " << filename);