From 93578d64d2852157b391ee00eb4c0b197e331e63 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 7 Jul 2021 17:56:34 -0400 Subject: [PATCH] Internals: Remove old needHeavy code. --- src/V3EmitC.cpp | 6 +----- src/V3EmitCInlines.cpp | 14 +------------- src/V3EmitCModel.cpp | 6 +----- src/V3EmitCSyms.cpp | 6 +----- src/V3Global.h | 3 --- 5 files changed, 4 insertions(+), 31 deletions(-) diff --git a/src/V3EmitC.cpp b/src/V3EmitC.cpp index b2f345698..fc8cb08fa 100644 --- a/src/V3EmitC.cpp +++ b/src/V3EmitC.cpp @@ -450,11 +450,7 @@ void EmitCImp::emitIntTop(const AstNodeModule* modp) { puts("\n"); ofp()->putsIntTopInclude(); - if (v3Global.needHeavy()) { - puts("#include \"verilated_heavy.h\"\n"); - } else { - puts("#include \"verilated.h\"\n"); - } + puts("#include \"verilated_heavy.h\"\n"); 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"); diff --git a/src/V3EmitCInlines.cpp b/src/V3EmitCInlines.cpp index 0fd7450d9..2b68ac16f 100644 --- a/src/V3EmitCInlines.cpp +++ b/src/V3EmitCInlines.cpp @@ -30,32 +30,20 @@ class EmitCInlines final : EmitCBaseVisitor { // STATE // METHODS - void checkHeavy(AstNode* nodep) { - if (nodep->isHeavy()) v3Global.needHeavy(true); - } // VISITORS - virtual void visit(AstClass* nodep) override { - checkHeavy(nodep); - iterateChildren(nodep); - } virtual void visit(AstCNew* nodep) override { - checkHeavy(nodep); if (v3Global.opt.savable()) v3warn(E_UNSUPPORTED, "Unsupported: --savable with dynamic new"); iterateChildren(nodep); } virtual void visit(AstDumpCtl* nodep) override { - checkHeavy(nodep); if (v3Global.opt.trace()) v3Global.needTraceDumper(true); iterateChildren(nodep); } //--------------------------------------- - virtual void visit(AstNode* nodep) override { - checkHeavy(nodep); - iterateChildren(nodep); - } + virtual void visit(AstNode* nodep) override { iterateChildren(nodep); } public: explicit EmitCInlines(AstNetlist* nodep) { iterate(nodep); } diff --git a/src/V3EmitCModel.cpp b/src/V3EmitCModel.cpp index cb1a0ba54..6b67f6fad 100644 --- a/src/V3EmitCModel.cpp +++ b/src/V3EmitCModel.cpp @@ -54,11 +54,7 @@ class EmitCModel final : public EmitCFunc { // Include files puts("\n"); ofp()->putsIntTopInclude(); - if (v3Global.needHeavy()) { - puts("#include \"verilated_heavy.h\"\n"); - } else { - puts("#include \"verilated.h\"\n"); - } + puts("#include \"verilated_heavy.h\"\n"); 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"); diff --git a/src/V3EmitCSyms.cpp b/src/V3EmitCSyms.cpp index bcc22b94a..412773feb 100644 --- a/src/V3EmitCSyms.cpp +++ b/src/V3EmitCSyms.cpp @@ -389,11 +389,7 @@ void EmitCSyms::emitSymHdr() { puts("\n"); ofp()->putsIntTopInclude(); - if (v3Global.needHeavy()) { - puts("#include \"verilated_heavy.h\"\n"); - } else { - puts("#include \"verilated.h\"\n"); - } + puts("#include \"verilated_heavy.h\"\n"); if (v3Global.needTraceDumper()) { puts("#include \"" + v3Global.opt.traceSourceLang() + ".h\"\n"); } diff --git a/src/V3Global.h b/src/V3Global.h index 8ec6ba819..b0a35f9e0 100644 --- a/src/V3Global.h +++ b/src/V3Global.h @@ -98,7 +98,6 @@ class V3Global final { bool m_assertScoped = false; // Tree is scoped bool m_constRemoveXs = false; // Const needs to strip any Xs // Experimenting with always requiring heavy, see (#2701) - bool m_needHeavy = true; // Need verilated_heavy.h include bool m_needTraceDumper = false; // Need __Vm_dumperp in symbols bool m_dpi = false; // Need __Dpi include files bool m_useParallelBuild = false; // Use parallel build for model @@ -142,8 +141,6 @@ public: void constRemoveXs(bool flag) { m_constRemoveXs = flag; } string debugFilename(const string& nameComment, int newNumber = 0); static string digitsFilename(int number); - bool needHeavy() const { return m_needHeavy; } - void needHeavy(bool flag) { m_needHeavy = flag; } bool needTraceDumper() const { return m_needTraceDumper; } void needTraceDumper(bool flag) { m_needTraceDumper = flag; } bool dpi() const { return m_dpi; }