mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Fix events in observed region (#7546)
This commit is contained in:
@@ -486,6 +486,18 @@ class ActiveVisitor final : public VNVisitor {
|
||||
}
|
||||
}
|
||||
|
||||
static void markEventEdges(AstSenTree* sentreep) {
|
||||
for (AstSenItem* senip = sentreep->sensesp(); senip;
|
||||
senip = VN_AS(senip->nextp(), SenItem)) {
|
||||
if (!senip->sensp()) continue;
|
||||
if (const AstNodeDType* const dtypep = senip->sensp()->dtypep()) {
|
||||
if (const AstBasicDType* const basicp = dtypep->basicp()) {
|
||||
if (basicp->isEvent()) senip->edgeType(VEdgeType::ET_EVENT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// VISITORS
|
||||
void visit(AstScope* nodep) override {
|
||||
m_namer.main(nodep); // Clear last scope's names, and collect this scope's existing names
|
||||
@@ -528,6 +540,7 @@ class ActiveVisitor final : public VNVisitor {
|
||||
}
|
||||
void visit(AstAlwaysObserved* nodep) override {
|
||||
UASSERT_OBJ(nodep->sentreep(), nodep, "Should have a sentree");
|
||||
markEventEdges(nodep->sentreep());
|
||||
AstSenTree* const sentreep = nodep->sentreep();
|
||||
sentreep->unlinkFrBack();
|
||||
// Make a new active for it, needs to be the only item under the active for V3Sched
|
||||
@@ -536,6 +549,7 @@ class ActiveVisitor final : public VNVisitor {
|
||||
}
|
||||
void visit(AstAlwaysReactive* nodep) override {
|
||||
UASSERT_OBJ(nodep->sentreep(), nodep, "Should have a sentree");
|
||||
markEventEdges(nodep->sentreep());
|
||||
AstSenTree* const sentreep = nodep->sentreep();
|
||||
sentreep->unlinkFrBack();
|
||||
// Make a new active for it, needs to be the only item under the active for V3Sched
|
||||
|
||||
Reference in New Issue
Block a user