mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Add --converge-limit option.
This commit is contained in:
parent
1b439703ff
commit
a82cdcfe48
2
Changes
2
Changes
@ -19,6 +19,8 @@ indicates the contributor was also the author of the fix; Thanks!
|
||||
|
||||
*** Add PINMISSING and PINNOCONNECT lint checks.
|
||||
|
||||
*** Add --converge-limit option. [Holger Waechtler]
|
||||
|
||||
*** Fix generate operators not short circuiting, bug413. [by Jeremy Bennett]
|
||||
|
||||
*** Fix parameters not supported in constant functions, bug474. [Alex Solomatnikov]
|
||||
|
@ -250,6 +250,7 @@ descriptions in the next sections for more information.
|
||||
--cc Create C++ output
|
||||
--cdc Clock domain crossing analysis
|
||||
--compiler <compiler-name> Tune for specified C++ compiler
|
||||
--converge-limit <loops> Tune convergence settle time
|
||||
--coverage Enable all coverage
|
||||
--coverage-line Enable line coverage
|
||||
--coverage-toggle Enable toggle coverage
|
||||
@ -427,6 +428,11 @@ functions to avoid error C1061.
|
||||
|
||||
=back
|
||||
|
||||
=item --converge-limit <loops>
|
||||
|
||||
Rarely needed. Specifies the maximum number of runtime iterations before
|
||||
creating a model failed to converge error. Defaults to 100.
|
||||
|
||||
=item --coverage
|
||||
|
||||
Enables all forms of coverage, alias for "--coverage-line --coverage-toggle
|
||||
|
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user