Internals: Move --coverage and --savable check out of V3EmitC (#2976)

This commit is contained in:
Geza Lore 2021-05-22 12:27:32 +01:00 committed by GitHub
parent a43eba7011
commit 2dd5ef5e8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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");
}
}
//######################################################################