Skip to content

Commit

Permalink
Internals: Move --coverage and --savable check out of V3EmitC (verila…
Browse files Browse the repository at this point in the history
  • Loading branch information
gezalore committed May 22, 2021
1 parent a43eba7 commit 2dd5ef5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/V3EmitC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3120,10 +3120,7 @@ void EmitCImp::emitIntTop(AstNodeModule*) {
}
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.savable()) v3error("--coverage and --savable not supported together");
}
if (v3Global.opt.coverage()) puts("#include \"verilated_cov.h\"\n");
if (v3Global.dpi()) {
// do this before including our main .h file so that any references to
// types defined in svdpi.h are available
Expand Down
4 changes: 4 additions & 0 deletions src/V3Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,10 @@ void V3Options::notify() {
cmdfl->v3warn(E_UNSUPPORTED,
"--main not usable with SystemC. Suggest see examples for sc_main().");
}

if (coverage() && savable()) {
cmdfl->v3error("--coverage and --savable not supported together");
}
}

//######################################################################
Expand Down

0 comments on commit 2dd5ef5

Please sign in to comment.