Internals: Remove old needHeavy code.
This commit is contained in:
parent
8c705ee145
commit
93578d64d2
|
|
@ -450,11 +450,7 @@ void EmitCImp::emitIntTop(const AstNodeModule* modp) {
|
||||||
puts("\n");
|
puts("\n");
|
||||||
|
|
||||||
ofp()->putsIntTopInclude();
|
ofp()->putsIntTopInclude();
|
||||||
if (v3Global.needHeavy()) {
|
puts("#include \"verilated_heavy.h\"\n");
|
||||||
puts("#include \"verilated_heavy.h\"\n");
|
|
||||||
} else {
|
|
||||||
puts("#include \"verilated.h\"\n");
|
|
||||||
}
|
|
||||||
if (v3Global.opt.mtasks()) puts("#include \"verilated_threads.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.savable()) puts("#include \"verilated_save.h\"\n");
|
||||||
if (v3Global.opt.coverage()) puts("#include \"verilated_cov.h\"\n");
|
if (v3Global.opt.coverage()) puts("#include \"verilated_cov.h\"\n");
|
||||||
|
|
|
||||||
|
|
@ -30,32 +30,20 @@ class EmitCInlines final : EmitCBaseVisitor {
|
||||||
// STATE
|
// STATE
|
||||||
|
|
||||||
// METHODS
|
// METHODS
|
||||||
void checkHeavy(AstNode* nodep) {
|
|
||||||
if (nodep->isHeavy()) v3Global.needHeavy(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// VISITORS
|
// VISITORS
|
||||||
virtual void visit(AstClass* nodep) override {
|
|
||||||
checkHeavy(nodep);
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
virtual void visit(AstCNew* nodep) override {
|
virtual void visit(AstCNew* nodep) override {
|
||||||
checkHeavy(nodep);
|
|
||||||
if (v3Global.opt.savable())
|
if (v3Global.opt.savable())
|
||||||
v3warn(E_UNSUPPORTED, "Unsupported: --savable with dynamic new");
|
v3warn(E_UNSUPPORTED, "Unsupported: --savable with dynamic new");
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
virtual void visit(AstDumpCtl* nodep) override {
|
virtual void visit(AstDumpCtl* nodep) override {
|
||||||
checkHeavy(nodep);
|
|
||||||
if (v3Global.opt.trace()) v3Global.needTraceDumper(true);
|
if (v3Global.opt.trace()) v3Global.needTraceDumper(true);
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
virtual void visit(AstNode* nodep) override {
|
virtual void visit(AstNode* nodep) override { iterateChildren(nodep); }
|
||||||
checkHeavy(nodep);
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit EmitCInlines(AstNetlist* nodep) { iterate(nodep); }
|
explicit EmitCInlines(AstNetlist* nodep) { iterate(nodep); }
|
||||||
|
|
|
||||||
|
|
@ -54,11 +54,7 @@ class EmitCModel final : public EmitCFunc {
|
||||||
// Include files
|
// Include files
|
||||||
puts("\n");
|
puts("\n");
|
||||||
ofp()->putsIntTopInclude();
|
ofp()->putsIntTopInclude();
|
||||||
if (v3Global.needHeavy()) {
|
puts("#include \"verilated_heavy.h\"\n");
|
||||||
puts("#include \"verilated_heavy.h\"\n");
|
|
||||||
} else {
|
|
||||||
puts("#include \"verilated.h\"\n");
|
|
||||||
}
|
|
||||||
if (v3Global.opt.mtasks()) puts("#include \"verilated_threads.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.savable()) puts("#include \"verilated_save.h\"\n");
|
||||||
if (v3Global.opt.coverage()) puts("#include \"verilated_cov.h\"\n");
|
if (v3Global.opt.coverage()) puts("#include \"verilated_cov.h\"\n");
|
||||||
|
|
|
||||||
|
|
@ -389,11 +389,7 @@ void EmitCSyms::emitSymHdr() {
|
||||||
|
|
||||||
puts("\n");
|
puts("\n");
|
||||||
ofp()->putsIntTopInclude();
|
ofp()->putsIntTopInclude();
|
||||||
if (v3Global.needHeavy()) {
|
puts("#include \"verilated_heavy.h\"\n");
|
||||||
puts("#include \"verilated_heavy.h\"\n");
|
|
||||||
} else {
|
|
||||||
puts("#include \"verilated.h\"\n");
|
|
||||||
}
|
|
||||||
if (v3Global.needTraceDumper()) {
|
if (v3Global.needTraceDumper()) {
|
||||||
puts("#include \"" + v3Global.opt.traceSourceLang() + ".h\"\n");
|
puts("#include \"" + v3Global.opt.traceSourceLang() + ".h\"\n");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,6 @@ class V3Global final {
|
||||||
bool m_assertScoped = false; // Tree is scoped
|
bool m_assertScoped = false; // Tree is scoped
|
||||||
bool m_constRemoveXs = false; // Const needs to strip any Xs
|
bool m_constRemoveXs = false; // Const needs to strip any Xs
|
||||||
// Experimenting with always requiring heavy, see (#2701)
|
// 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_needTraceDumper = false; // Need __Vm_dumperp in symbols
|
||||||
bool m_dpi = false; // Need __Dpi include files
|
bool m_dpi = false; // Need __Dpi include files
|
||||||
bool m_useParallelBuild = false; // Use parallel build for model
|
bool m_useParallelBuild = false; // Use parallel build for model
|
||||||
|
|
@ -142,8 +141,6 @@ public:
|
||||||
void constRemoveXs(bool flag) { m_constRemoveXs = flag; }
|
void constRemoveXs(bool flag) { m_constRemoveXs = flag; }
|
||||||
string debugFilename(const string& nameComment, int newNumber = 0);
|
string debugFilename(const string& nameComment, int newNumber = 0);
|
||||||
static string digitsFilename(int number);
|
static string digitsFilename(int number);
|
||||||
bool needHeavy() const { return m_needHeavy; }
|
|
||||||
void needHeavy(bool flag) { m_needHeavy = flag; }
|
|
||||||
bool needTraceDumper() const { return m_needTraceDumper; }
|
bool needTraceDumper() const { return m_needTraceDumper; }
|
||||||
void needTraceDumper(bool flag) { m_needTraceDumper = flag; }
|
void needTraceDumper(bool flag) { m_needTraceDumper = flag; }
|
||||||
bool dpi() const { return m_dpi; }
|
bool dpi() const { return m_dpi; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue