Commit Graph

5 Commits

Author SHA1 Message Date
Matthew Ballance a5f10c9abf V3Covergroup: fix coverpoint cleanup for unsupported covergroups
Two bugs fixed:
1. AstCReset: mark as ineligible for coverage expressions via
   isExprCoverageEligible() override, preventing verilogForTree
   from being called on CReset nodes (which has no V3EmitV handler).

2. generateCrossCode: when a cross references an unknown coverpoint,
   don't delete the cross node early. The caller's cleanup loop
   (in visit(AstClass*)) is responsible for deleting all coverpoints
   and crosses. Early deletion left a dangling pointer in m_coverCrosses
   causing a use-after-free segfault.

3. hasUnsupportedEvent path: added coverpoint/cross cleanup before
   returning so AST nodes don't reach downstream passes (V3EmitCFunc,
   V3MergeCond) which no longer have stub visitors for them.

All 60 covergroup tests now pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 20:34:14 +00:00
Matthew Ballance 14c67621ac Refactoring node locations and enums ; Delete coverpoints after V3Covergroup so they don't accidentally hit the generators
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-02-28 20:10:20 +00:00
github action 4f725a54ec Apply 'make format' 2026-02-25 23:44:47 +00:00
Matthew Ballance 0a05813149 Adopt use of MemberMap
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-02-25 23:15:08 +00:00
Matthew Ballance cb3172707f Refactoring before renaming tests
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2026-02-25 01:16:55 +00:00