mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
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'.