diff --git a/Changes b/Changes index 76d93f963..5a47d8f3b 100644 --- a/Changes +++ b/Changes @@ -3,7 +3,7 @@ Revision history for Verilator The contributors that suggested a given feature are shown in []. [by ...] indicates the contributor was also the author of the fix; Thanks! -* Verilator 3.65**** +* Verilator 3.66**** *** Add support for hard-coding VERILATOR_ROOT etc in the executables, to enable easier use of Verilator RPMs. [Gunter Dannoritzer] @@ -12,6 +12,8 @@ indicates the contributor was also the author of the fix; Thanks! *** Convert re-defining macro error to warning. [Stefan Thiede] +*** Add --error-limit option. [Stefan Thiede] + **** Fix genvar to be signed, so "< 0" works properly. [Niranjan Prabhu] **** Fix assignments to inputs inside functions/tasks. [Patricio Kaplan] diff --git a/bin/verilator b/bin/verilator index 6565278f7..4a99ca9a8 100755 --- a/bin/verilator +++ b/bin/verilator @@ -190,6 +190,7 @@ descriptions in the next sections for more information. --debug-check Enable debugging assertions --dump-tree Enable dumping .tree files -E Preprocess, but do not compile + --error-limit Abort after this number of errors --exe Link to create executable -f Parse options from a file --help Display this help. @@ -348,6 +349,11 @@ Preprocess the source code, but do not compile, as with 'gcc -E'. Output is written to standard out. Beware of enabling debugging messages, as they will also go to standard out. +=item --error-limit + +After this number of errors or warnings are encountered, exit. Defaults to +50. + =item --exe Generate a executable. You will also need to pass additional .cpp files on diff --git a/src/V3Error.cpp b/src/V3Error.cpp index 334224550..d3476320e 100644 --- a/src/V3Error.cpp +++ b/src/V3Error.cpp @@ -243,8 +243,8 @@ void V3Error::incWarnings() { void V3Error::incErrors() { s_errCount++; - if (errorCount() == MAX_ERRORS) { // Not >= as would otherwise recurse - v3fatal ("Exiting due to too many errors encountered\n"); + if (errorCount() == v3Global.opt.errorLimit()) { // Not >= as would otherwise recurse + v3fatal ("Exiting due to too many errors encountered; --error-limit="<