From fb2cb3c49d4b31d696d6c4ebe682d099ab7045d7 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 23 Aug 2007 13:21:58 +0000 Subject: [PATCH] Don't exit early if many warnings but no errors are found. [Stan Mayer] git-svn-id: file://localhost/svn/verilator/trunk/verilator@953 77ca24e4-aefa-0310-84f0-b9a241c72d87 --- Changes | 4 ++++ TODO | 1 + bin/verilator | 11 +++++++++++ src/V3Error.cpp | 6 ++---- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index 34df69a1e..6eef19531 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,10 @@ 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*** + +**** Don't exit early if many warnings but no errors are found. [Stan Mayer] + * Verilator 3.653 8/1/2007 **** Support SystemVerilog ==? and !=? operators. diff --git a/TODO b/TODO index f4e0d6324..db801773a 100644 --- a/TODO +++ b/TODO @@ -25,6 +25,7 @@ Features: Coverage Points should be per-scope like everything else rather then per-module Expression coverage (see notes) + Constant functions for widths, etc, IE "input [log2(PARAM):0] xx;" More Verilog 2001 Support (* *) Attributes (just ignore -- preprocessor?) Real numbers (NEVER) diff --git a/bin/verilator b/bin/verilator index e11fd8f4e..6952c81b4 100755 --- a/bin/verilator +++ b/bin/verilator @@ -2001,6 +2001,17 @@ the "verilator" define for you, so just wrap the code in a ifndef region: Something_Verilator_Dislikes; `endif +=item Why do I get "unexpected `do'" or "unexpected `bit'" errors? + +Do, bit, ref, and other words are now SystemVerilog keywords. You should +change your code to not use them to insure it works with newer tools. +Alternatively, surround them by the Verilog 2005/SystemVerilog +begin_keywords pragma to indicate Verilog 2001 code. + + `begin_keywords "1364-2001" + integer bit; initial bit = 1; + `end_keywords + =item How do I prevent my assertions from firing during reset? Call Verilated::assertOn(false) before you first call the model, then turn diff --git a/src/V3Error.cpp b/src/V3Error.cpp index 70f7e3742..e13bf5d67 100644 --- a/src/V3Error.cpp +++ b/src/V3Error.cpp @@ -190,14 +190,12 @@ string V3Error::lineStr (const char* filename, int lineno) { void V3Error::incWarnings() { s_warnCount++; - if (errorOrWarnCount() == MAX_ERRORS) { // Not >= as would otherwise recurse - v3fatal ("Exiting due to too many errors encountered\n"); - } + // We don't exit on a lot of warnings. } void V3Error::incErrors() { s_errCount++; - if (errorOrWarnCount() == MAX_ERRORS) { // Not >= as would otherwise recurse + if (errorCount() == MAX_ERRORS) { // Not >= as would otherwise recurse v3fatal ("Exiting due to too many errors encountered\n"); } }