From 6283df7491b635e850d90a5ba1014bbc64ede716 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 30 Dec 2010 06:58:02 -0500 Subject: [PATCH] Vlt lint off now has optional msgname --- bin/verilator | 7 +++-- src/V3Error.cpp | 49 ++++++++++++++++++----------------- src/V3Error.h | 3 ++- src/verilog.y | 1 + test_regress/t/t_vlt_warn.v | 1 + test_regress/t/t_vlt_warn.vlt | 2 ++ 6 files changed, 36 insertions(+), 27 deletions(-) diff --git a/bin/verilator b/bin/verilator index 6140a856a..f59a011f9 100755 --- a/bin/verilator +++ b/bin/verilator @@ -1553,12 +1553,15 @@ or all files if omitted) and range of line numbers (or all lines if omitted). Often used to ignore an entire module for coverage analysis purposes. -=item lint_off -msg [-file "" [-lines [ - ]]] +=item lint_off [-msg ] [-file "" [-lines [ - ]]] -Disables the specified lint warning in the specified filename (or wildcard +Disables the specified lint warning, in the specified filename (or wildcard with '*' or '?', or all files if omitted) and range of line numbers (or all lines if omitted). +If the -msg is omitted, all lint warnings are disabled. This will override +all later lint warning enables for the specified region. + =item tracing_off [-file "" [-lines [ - ]]] Disable waveform tracing for all future signals declared in the specified diff --git a/src/V3Error.cpp b/src/V3Error.cpp index 52d64117a..d07faed09 100644 --- a/src/V3Error.cpp +++ b/src/V3Error.cpp @@ -117,30 +117,6 @@ void FileLine::lineDirective(const char* textp, int& enterExitRef) { //printf ("PPLINE %d '%s'\n", s_lineno, s_filename.c_str()); } -bool FileLine::warnOff(const string& msg, bool flag) { - V3ErrorCode code (msg.c_str()); - if (code < V3ErrorCode::EC_FIRST_WARN) { - return false; - } else { - warnOff(code, flag); - return true; - } -} - -void FileLine::warnLintOff(bool flag) { - for (int codei=V3ErrorCode::EC_FIRST_WARN; codei: yVLT_COVERAGE_OFF { $$ = V3ErrorCode::I_COVERAGE; } | yVLT_TRACING_OFF { $$ = V3ErrorCode::I_TRACING; } + | yVLT_LINT_OFF { $$ = V3ErrorCode::I_LINT; } | yVLT_LINT_OFF yVLT_D_MSG yaID__ETC { $$ = V3ErrorCode((*$3).c_str()); if ($$ == V3ErrorCode::EC_ERROR) { $1->v3error("Unknown Error Code: "<<*$3<