Suppress VARHIDDEN on dpi import arguments.

This commit is contained in:
Wilson Snyder 2011-11-27 12:03:22 -05:00
parent ad4edf6c68
commit 06b796c6bd
3 changed files with 12 additions and 1 deletions

View File

@ -4,6 +4,11 @@ The contributors that suggested a given feature are shown in []. [by ...]
indicates the contributor was also the author of the fix; Thanks!
* Verilator 3.831****
**** Suppress VARHIDDEN on dpi import arguments. [Ruben Diez]
* Verilator 3.830 2011/11/27
** With "--language VAMS" support a touch of Verilog AMS. [Holger Waechtler]

View File

@ -319,7 +319,8 @@ private:
}
} else {
// User can disable the message at either point
if (!nodep->fileline()->warnIsOff(V3ErrorCode::VARHIDDEN)
if (!(m_ftaskp && m_ftaskp->dpiImport())
&& !nodep->fileline()->warnIsOff(V3ErrorCode::VARHIDDEN)
&& !foundp->fileline()->warnIsOff(V3ErrorCode::VARHIDDEN)) {
nodep->v3warn(VARHIDDEN,"Declaration of signal hides declaration in upper scope: "<<nodep->name());
foundp->v3warn(VARHIDDEN,"... Location of original declaration");

View File

@ -5,6 +5,11 @@
module t;
// Arguable, but we won't throw a hidden warning on tcp_port
parameter tcp_port = 5678;
import "DPI-C" function int dpii_func ( input integer tcp_port,
output longint obj );
// 't' is hidden:
integer t;
endmodule