Add --hierarchical-threads (#6037)

This commit is contained in:
Bartłomiej Chmiel
2025-05-26 09:37:35 -04:00
committed by GitHub
parent c9fa54536e
commit 9cc4cc0efd
12 changed files with 331 additions and 16 deletions
+4 -1
View File
@@ -503,8 +503,11 @@ class EmitCModel final : public EmitCFunc {
+ "::hierName() const { return vlSymsp->name(); }\n");
putns(modp, "const char* " + topClassName() + "::modelName() const { return \""
+ topClassName() + "\"; }\n");
const int threads = v3Global.opt.hierChild()
? v3Global.opt.threads()
: std::max(v3Global.opt.threads(), v3Global.opt.hierThreads());
putns(modp, "unsigned " + topClassName() + "::threads() const { return "
+ cvtToStr(v3Global.opt.threads()) + "; }\n");
+ cvtToStr(threads) + "; }\n");
putns(modp, "void " + topClassName()
+ "::prepareClone() const { contextp()->prepareClone(); }\n");
putns(modp, "void " + topClassName() + "::atClone() const {\n");