mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Fix conditionals on obsolete --threads 0
Since we removed --threads 0 support, the 'threads()' option always returns a value >= 1. Remove corresponding dead code. Some of the coverage counters appear to use atomics even if the model is single threaded. I'm under the impression this was a bug originally so those ones I changed to use threads() > 1 instead.
This commit is contained in:
@@ -420,7 +420,7 @@ class EmitCModel final : public EmitCFunc {
|
||||
if (v3Global.opt.threads() == 1) {
|
||||
puts("Verilated::endOfThreadMTask(vlSymsp->__Vm_evalMsgQp);\n");
|
||||
}
|
||||
if (v3Global.opt.threads()) puts("Verilated::endOfEval(vlSymsp->__Vm_evalMsgQp);\n");
|
||||
puts("Verilated::endOfEval(vlSymsp->__Vm_evalMsgQp);\n");
|
||||
|
||||
if (v3Global.opt.profExec()) puts("VL_EXEC_TRACE_ADD_RECORD(vlSymsp).evalEnd();\n");
|
||||
puts("}\n");
|
||||
@@ -482,7 +482,7 @@ class EmitCModel final : public EmitCFunc {
|
||||
puts("const char* " + topClassName() + "::modelName() const { return \"" + topClassName()
|
||||
+ "\"; }\n");
|
||||
puts("unsigned " + topClassName() + "::threads() const { return "
|
||||
+ cvtToStr(std::max(1, v3Global.opt.threads())) + "; }\n");
|
||||
+ cvtToStr(v3Global.opt.threads()) + "; }\n");
|
||||
puts("void " + topClassName()
|
||||
+ "::prepareClone() const { contextp()->prepareClone(); }\n");
|
||||
puts("void " + topClassName() + "::atClone() const {\n");
|
||||
|
||||
Reference in New Issue
Block a user