mirror of
https://github.com/verilator/verilator.git
synced 2025-04-21 12:06:55 +00:00
Fix elaboration-time display warnings, bug1032.
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
This commit is contained in:
parent
be74806044
commit
65be2448dc
2
Changes
2
Changes
@ -17,6 +17,8 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
**** Fix read-after-free error, bug1031. [Johan Bjork]
|
**** Fix read-after-free error, bug1031. [Johan Bjork]
|
||||||
|
|
||||||
|
**** Fix elaboration-time display warnings, bug1032. [Johan Bjork]
|
||||||
|
|
||||||
|
|
||||||
* Verilator 3.880 2015-12-19
|
* Verilator 3.880 2015-12-19
|
||||||
|
|
||||||
|
@ -111,6 +111,7 @@ void V3Error::abortIfWarnings() {
|
|||||||
|
|
||||||
bool V3Error::isError(V3ErrorCode code, bool supp) {
|
bool V3Error::isError(V3ErrorCode code, bool supp) {
|
||||||
if (supp) return false;
|
if (supp) return false;
|
||||||
|
else if (code==V3ErrorCode::USERINFO) return false;
|
||||||
else if (code==V3ErrorCode::EC_INFO) return false;
|
else if (code==V3ErrorCode::EC_INFO) return false;
|
||||||
else if (code==V3ErrorCode::EC_FATAL) return true;
|
else if (code==V3ErrorCode::EC_FATAL) return true;
|
||||||
else if (code==V3ErrorCode::EC_FATALSRC) return true;
|
else if (code==V3ErrorCode::EC_FATALSRC) return true;
|
||||||
@ -124,6 +125,7 @@ string V3Error::msgPrefix() {
|
|||||||
V3ErrorCode code=s_errorCode;
|
V3ErrorCode code=s_errorCode;
|
||||||
bool supp=s_errorSuppressed;
|
bool supp=s_errorSuppressed;
|
||||||
if (supp) return "-arning-suppressed: ";
|
if (supp) return "-arning-suppressed: ";
|
||||||
|
else if (code==V3ErrorCode::USERINFO) return "-Info: ";
|
||||||
else if (code==V3ErrorCode::EC_INFO) return "-Info: ";
|
else if (code==V3ErrorCode::EC_INFO) return "-Info: ";
|
||||||
else if (code==V3ErrorCode::EC_FATAL) return "%Error: ";
|
else if (code==V3ErrorCode::EC_FATAL) return "%Error: ";
|
||||||
else if (code==V3ErrorCode::EC_FATALSRC) return "%Error: Internal Error: ";
|
else if (code==V3ErrorCode::EC_FATALSRC) return "%Error: Internal Error: ";
|
||||||
@ -175,7 +177,8 @@ void V3Error::v3errorEnd (ostringstream& sstr) {
|
|||||||
s_messages.insert(msg);
|
s_messages.insert(msg);
|
||||||
// Output
|
// Output
|
||||||
cerr<<msg;
|
cerr<<msg;
|
||||||
if (!s_errorSuppressed && s_errorCode!=V3ErrorCode::EC_INFO) {
|
if (!s_errorSuppressed && !(s_errorCode==V3ErrorCode::EC_INFO
|
||||||
|
|| s_errorCode==V3ErrorCode::USERINFO)) {
|
||||||
if (!s_describedEachWarn[s_errorCode]
|
if (!s_describedEachWarn[s_errorCode]
|
||||||
&& !s_pretendError[s_errorCode]) {
|
&& !s_pretendError[s_errorCode]) {
|
||||||
s_describedEachWarn[s_errorCode] = true;
|
s_describedEachWarn[s_errorCode] = true;
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
module t;
|
module t;
|
||||||
localparam str = "string";
|
localparam str = "string";
|
||||||
function logic checkParameter(input logic [8:0] N);
|
function logic checkParameter(input logic [8:0] N);
|
||||||
|
$display("x is %d.", N);
|
||||||
if (N == 1)
|
if (N == 1)
|
||||||
return 0;
|
return 0;
|
||||||
$fatal(1, "Parameter %d is invalid...%s and %s", N, str, "constant both work");
|
$fatal(1, "Parameter %d is invalid...%s and %s", N, str, "constant both work");
|
||||||
|
Loading…
Reference in New Issue
Block a user