mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Fix toggle coverage dataDeclp error on multi-edge driven signals.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user