Fix covergroups without --coverage (#7848) (#7849)

Fixes #7848.
This commit is contained in:
Joshua Leahy
2026-06-29 10:56:59 -04:00
committed by GitHub
parent 276f2f344d
commit cf7e3f791a
7 changed files with 54 additions and 5 deletions
+2 -1
View File
@@ -70,7 +70,8 @@ class EmitCModel final : public EmitCFunc {
if (v3Global.opt.mtasks()) puts("#include \"verilated_threads.h\"\n");
if (v3Global.opt.savable()) puts("#include \"verilated_save.h\"\n");
if (v3Global.opt.coverage()) puts("#include \"verilated_cov.h\"\n");
if (v3Global.opt.coverage()) puts("#include \"verilated_covergroup.h\"\n");
if (v3Global.opt.coverage() || v3Global.useCovergroup())
puts("#include \"verilated_covergroup.h\"\n");
if (v3Global.dpi()) puts("#include \"svdpi.h\"\n");
// Declare foreign instances up front to make C++ happy