mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Fix FSM coverage hierarchy being emitted as an absolute path (#8421)
AstNodeCoverDecl::hier() is relative to the scope the declaration is emitted from, as V3EmitCImp builds the reported path as 'vlNamep + hierp', and that is how V3Coverage uses it. V3FsmDetect instead set it to the absolute scope name, so the instance path was counted twice. This was masked whenever the owning module was inlined, as the declaration then ended up in the top scope. With inlining disabled, an FSM in an instance reported 'top.t.forced_wide_u.t.forced_wide_u'. In the inlined case it reported 'top.TOP', leaking the internal top wrapper name into user visible coverage output, rather than plain 'top'.
This commit is contained in:
@@ -2194,7 +2194,6 @@ class FsmLowerVisitor final {
|
||||
graph.stateVarName(),
|
||||
"",
|
||||
statep->label()};
|
||||
declp->hier(scopep->prettyName());
|
||||
modp->addStmtsp(declp);
|
||||
AstNodeExpr* const guardp
|
||||
= andExpr(flp,
|
||||
@@ -2231,7 +2230,6 @@ class FsmLowerVisitor final {
|
||||
fromVertexp->label(),
|
||||
toStatep->label(),
|
||||
fsmTag};
|
||||
declp->hier(scopep->prettyName());
|
||||
modp->addStmtsp(declp);
|
||||
AstNodeExpr* guardp = nullptr;
|
||||
if (fromVertexp->isResetAny()) {
|
||||
|
||||
Reference in New Issue
Block a user