mirror of
https://github.com/verilator/verilator.git
synced 2026-09-07 01:52:17 +02:00
Add --converge-limit option.
This commit is contained in:
+4
-2
@@ -1556,7 +1556,8 @@ void EmitCImp::emitWrapEval(AstNodeModule* modp) {
|
||||
puts( "_eval(vlSymsp);\n");
|
||||
#ifndef NEW_ORDERING
|
||||
puts( "__Vchange = _change_request(vlSymsp);\n");
|
||||
puts( "if (++__VclockLoop > 100) vl_fatal(__FILE__,__LINE__,__FILE__,\"Verilated model didn't converge\");\n");
|
||||
puts( "if (++__VclockLoop > "+cvtToStr(v3Global.opt.convergeLimit())
|
||||
+") vl_fatal(__FILE__,__LINE__,__FILE__,\"Verilated model didn't converge\");\n");
|
||||
puts("}\n");
|
||||
#endif
|
||||
puts("}\n");
|
||||
@@ -1575,7 +1576,8 @@ void EmitCImp::emitWrapEval(AstNodeModule* modp) {
|
||||
puts( "_eval(vlSymsp);\n");
|
||||
#ifndef NEW_ORDERING
|
||||
puts( "__Vchange = _change_request(vlSymsp);\n");
|
||||
puts( "if (++__VclockLoop > 100) vl_fatal(__FILE__,__LINE__,__FILE__,\"Verilated model didn't DC converge\");\n");
|
||||
puts( "if (++__VclockLoop > "+cvtToStr(v3Global.opt.convergeLimit())
|
||||
+") vl_fatal(__FILE__,__LINE__,__FILE__,\"Verilated model didn't DC converge\");\n");
|
||||
puts( "}\n");
|
||||
#endif
|
||||
puts("}\n");
|
||||
|
||||
@@ -782,6 +782,10 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char
|
||||
shift;
|
||||
addCFlags(argv[i]);
|
||||
}
|
||||
else if ( !strcmp (sw, "-converge-limit") && (i+1)<argc ) {
|
||||
shift;
|
||||
m_convergeLimit = atoi(argv[i]);
|
||||
}
|
||||
else if ( !strncmp (sw, "-D", 2)) {
|
||||
addDefine (string (sw+strlen("-D")));
|
||||
}
|
||||
@@ -1187,6 +1191,7 @@ V3Options::V3Options() {
|
||||
m_underlineZero = false;
|
||||
m_xmlOnly = false;
|
||||
|
||||
m_convergeLimit = 100;
|
||||
m_dumpTree = 0;
|
||||
m_errorLimit = 50;
|
||||
m_ifDepth = 0;
|
||||
|
||||
@@ -125,6 +125,7 @@ class V3Options {
|
||||
bool m_underlineZero;// main switch: --underline-zero; undocumented old Verilator 2
|
||||
bool m_xmlOnly; // main switch: --xml-netlist
|
||||
|
||||
int m_convergeLimit;// main switch: --converge-limit
|
||||
int m_dumpTree; // main switch: --dump-tree
|
||||
int m_errorLimit; // main switch: --error-limit
|
||||
int m_ifDepth; // main switch: --if-depth
|
||||
@@ -252,6 +253,7 @@ class V3Options {
|
||||
bool inhibitSim() const { return m_inhibitSim; }
|
||||
bool xmlOnly() const { return m_xmlOnly; }
|
||||
|
||||
int convergeLimit() const { return m_convergeLimit; }
|
||||
int dumpTree() const { return m_dumpTree; }
|
||||
int errorLimit() const { return m_errorLimit; }
|
||||
int ifDepth() const { return m_ifDepth; }
|
||||
|
||||
Reference in New Issue
Block a user