Internals: Remove old needHeavy code.

This commit is contained in:
Wilson Snyder 2021-07-07 17:56:34 -04:00
parent 8c705ee145
commit 93578d64d2
5 changed files with 4 additions and 31 deletions

View File

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

View File

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

View File

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

View File

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

View File

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