From db1a839ccd495f727195fa4401a444c8403d56e0 Mon Sep 17 00:00:00 2001 From: Ryszard Rozak Date: Fri, 10 Jan 2025 14:32:17 +0100 Subject: [PATCH] Add coverpoint declaration to global scope Signed-off-by: Ryszard Rozak --- src/V3Coverage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/V3Coverage.cpp b/src/V3Coverage.cpp index afb674551a..aadd1a97d1 100644 --- a/src/V3Coverage.cpp +++ b/src/V3Coverage.cpp @@ -117,7 +117,7 @@ class CoverageVisitor final : public VNVisitor { AstCoverDecl* const declp = new AstCoverDecl{fl, page, comment, linescov, offset}; declp->hier(hier); - m_modp->addStmtsp(declp); + v3Global.rootp()->dollarUnitPkgAddp()->addStmtsp(declp); UINFO(9, "new " << declp << endl); AstCoverInc* const incp = new AstCoverInc{fl, declp};