Support ignoring "`pragma protect ..." (#2886)
This support code merely adds the capability to skip over the encrypted parts. Many models have unencrypted module interfaces with ports, and only encrypt the critical parts.
This commit is contained in:
parent
12416bc0a3
commit
422c076fec
|
|
@ -128,6 +128,13 @@ List Of Warnings
|
|||
simulate correctly.
|
||||
|
||||
|
||||
.. option:: BADSTDPRAGMA
|
||||
|
||||
Error that a pragma is badly formed, when that pragma is defined by IEEE1800-2017.
|
||||
For example, an empty `pragma line, or an incorrect specified '`pragma protect'.
|
||||
Note that 3rd party pragmas not defined by IEEE1800-2017 are ignored.
|
||||
|
||||
|
||||
.. option:: BLKANDNBLK
|
||||
|
||||
.. TODO better example
|
||||
|
|
@ -988,6 +995,16 @@ List Of Warnings
|
|||
a var/reg must be used as the target of procedural assignments.
|
||||
|
||||
|
||||
.. option:: PROTECTED
|
||||
|
||||
Warning that a '`pragma protected' section was encountered. The code
|
||||
inside the protected region will be partly checked for correctness, but is
|
||||
otherwise ignored.
|
||||
|
||||
Suppressing the warning may make Verilator differ from a simulator that
|
||||
accepts the protected code.
|
||||
|
||||
|
||||
.. option:: RANDC
|
||||
|
||||
Warns that the :code:`randc` keyword is currently unsupported, and that
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ public:
|
|||
ALWCOMBORDER, // Always_comb with unordered statements
|
||||
ASSIGNDLY, // Assignment delays
|
||||
ASSIGNIN, // Assigning to input
|
||||
BADSTDPRAGMA, // Any error related to pragmas
|
||||
BLKANDNBLK, // Blocked and non-blocking assignments to same variable
|
||||
BLKLOOPINIT, // Delayed assignment to array inside for loops
|
||||
BLKSEQ, // Blocking assignments in sequential block
|
||||
|
|
@ -109,6 +110,7 @@ public:
|
|||
PINNOTFOUND, // instance port name not found in it's module
|
||||
PKGNODECL, // Error: Package/class needs to be predeclared
|
||||
PROCASSWIRE, // Procedural assignment on wire
|
||||
PROTECTED, // detected `pragma protected
|
||||
RANDC, // Unsupported: 'randc' converted to 'rand'
|
||||
REALCVT, // Real conversion
|
||||
REDEFMACRO, // Redefining existing define macro
|
||||
|
|
@ -159,7 +161,7 @@ public:
|
|||
"DETECTARRAY", "ENCAPSULATED", "PORTSHORT", "UNSUPPORTED", "TASKNSVAR",
|
||||
// Warnings
|
||||
" EC_FIRST_WARN",
|
||||
"ALWCOMBORDER", "ASSIGNDLY", "ASSIGNIN",
|
||||
"ALWCOMBORDER", "ASSIGNDLY", "ASSIGNIN", "BADSTDPRAGMA",
|
||||
"BLKANDNBLK", "BLKLOOPINIT", "BLKSEQ", "BSSPACE",
|
||||
"CASEINCOMPLETE", "CASEOVERLAP", "CASEWITHX", "CASEX", "CASTCONST", "CDCRSTLOGIC", "CLKDATA",
|
||||
"CMPCONST", "COLONPLUS", "COMBDLY", "CONTASSREG",
|
||||
|
|
@ -171,7 +173,7 @@ public:
|
|||
"LATCH", "LITENDIAN", "MODDUP",
|
||||
"MULTIDRIVEN", "MULTITOP","NOLATCH", "NULLPORT", "PINCONNECTEMPTY",
|
||||
"PINMISSING", "PINNOCONNECT", "PINNOTFOUND", "PKGNODECL", "PROCASSWIRE",
|
||||
"RANDC", "REALCVT", "REDEFMACRO",
|
||||
"PROTECTED", "RANDC", "REALCVT", "REDEFMACRO",
|
||||
"SELRANGE", "SHORTREAL", "SPLITVAR", "STMTDLY", "SYMRSVDWORD", "SYNCASYNCNET",
|
||||
"TICKCOUNT", "TIMESCALEMOD",
|
||||
"UNDRIVEN", "UNOPT", "UNOPTFLAT", "UNOPTTHREADS",
|
||||
|
|
@ -192,8 +194,8 @@ public:
|
|||
// Warnings we'll present to the user as errors
|
||||
// Later -Werror- options may make more of these.
|
||||
bool pretendError() const {
|
||||
return (m_e == ASSIGNIN || m_e == BLKANDNBLK || m_e == BLKLOOPINIT || m_e == CONTASSREG
|
||||
|| m_e == IMPURE || m_e == PINNOTFOUND || m_e == PKGNODECL
|
||||
return (m_e == ASSIGNIN || m_e == BADSTDPRAGMA || m_e == BLKANDNBLK || m_e == BLKLOOPINIT
|
||||
|| m_e == CONTASSREG || m_e == IMPURE || m_e == PINNOTFOUND || m_e == PKGNODECL
|
||||
|| m_e == PROCASSWIRE); // Says IEEE
|
||||
}
|
||||
// Warnings to mention manual
|
||||
|
|
|
|||
|
|
@ -146,6 +146,10 @@ private:
|
|||
void lexStreamDepthAdd(int delta);
|
||||
};
|
||||
|
||||
//======================================================================
|
||||
// Enum Class for `pragma protect encoding types
|
||||
enum class Enctype : uint8_t { UUENCODE, BASE64, QUOTE_PRINTABLE, RAW, ERR };
|
||||
|
||||
//======================================================================
|
||||
// Class entry for each per-lexer state
|
||||
|
||||
|
|
@ -170,6 +174,9 @@ public: // Used only by V3PreLex.cpp and V3PreProc.cpp
|
|||
bool m_defQuote = false; // Definition value inside quote
|
||||
string m_defValue; // Definition value being built.
|
||||
int m_enterExit = 0; // For VL_LINE, the enter/exit level
|
||||
int m_protLength = 0; // unencoded length for BASE64
|
||||
int m_protBytes = 0; // decoded length for BASE64
|
||||
Enctype m_encType; // encoding type for `pragma protect
|
||||
|
||||
// CONSTRUCTORS
|
||||
V3PreLex(V3PreProcImp* preimpp, FileLine* filelinep)
|
||||
|
|
|
|||
122
src/V3PreLex.l
122
src/V3PreLex.l
|
|
@ -77,6 +77,11 @@ static void appendDefValue(const char* t, size_t l) { LEXP->appendDefValue(t, l)
|
|||
%x ARGMODE
|
||||
%x INCMODE
|
||||
%x PRTMODE
|
||||
%x PRAGMA
|
||||
%x PRAGMAERR
|
||||
%x PRAGMAPRT
|
||||
%x PRAGMAPRTERR
|
||||
%x ENCBASE64
|
||||
|
||||
/* drop: Drop Ctrl-Z - can't pass thru or may EOF the output too soon */
|
||||
|
||||
|
|
@ -112,12 +117,119 @@ bom [\357\273\277]
|
|||
<INITIAL>"`undef" { FL_FWDC; return VP_UNDEF; }
|
||||
<INITIAL>"`undefineall" { FL_FWDC; return VP_UNDEFINEALL; }
|
||||
<INITIAL>"`error" { FL_FWDC; if (!pedantic()) return VP_ERROR; else return VP_DEFREF; }
|
||||
<INITIAL>"`pragma"{wsn}*[^\n\r]* { FL_FWDC;
|
||||
const char* pointp = yytext + strlen("`pragma");
|
||||
while (isspace(*pointp)) ++pointp;
|
||||
if (!*pointp && v3Global.opt.pedantic()) {
|
||||
yyerrorf("`pragma is missing a pragma_expression.");
|
||||
/* We wanted this to be next to `protect But it must be before `pramga */
|
||||
/* we win only because we both match to the end of the line so the length */
|
||||
/* is equal and we are first*/
|
||||
<PRAGMAPRT>"encoding"{wsn}*[^\n\r]* { FL_FWDC;
|
||||
int res;
|
||||
char enctype[16]; // long enough to hold "quote-printable"
|
||||
if (LEXP->m_protBytes > 0) {
|
||||
LEXP->curFilelinep()->v3warn(BADSTDPRAGMA, "multiple `pragma protected encoding sections");
|
||||
}
|
||||
res = sscanf(yytext + strlen("encoding"), " = (enctype = \"%15[A-Za-z0-9]\", line_length = %d, bytes = %d)", &enctype[0], &LEXP->m_protLength, &LEXP->m_protBytes);
|
||||
if (res == 0)
|
||||
LEXP->curFilelinep()->v3warn(BADSTDPRAGMA, "`pragma protected encoding must have an \"enctype\" field");
|
||||
LEXP->m_encType = !VL_STRCASECMP(enctype, "uuencode") ? Enctype::UUENCODE :
|
||||
!VL_STRCASECMP(enctype, "base64") ? Enctype::BASE64 :
|
||||
!VL_STRCASECMP(enctype, "quoted-printable") ? Enctype::QUOTE_PRINTABLE :
|
||||
!VL_STRCASECMP(enctype, "raw") ? Enctype::RAW : Enctype::ERR;
|
||||
if (LEXP->m_encType == Enctype::ERR)
|
||||
LEXP->curFilelinep()->v3warn(BADSTDPRAGMA, "Illegal encoding type for `pragma protected encoding");
|
||||
if (LEXP->m_encType != Enctype::BASE64)
|
||||
LEXP->curFilelinep()->v3warn(E_UNSUPPORTED, "Unsupported: only BASE64 is recognized for `pragma protected encoding");
|
||||
if (res == 3) {
|
||||
if ((LEXP->m_encType == Enctype::BASE64) && (LEXP->m_protLength & 3))
|
||||
LEXP->curFilelinep()->v3warn(BADSTDPRAGMA, "line_length must be multiple of 4 for BASE64");
|
||||
} else {
|
||||
// default values
|
||||
LEXP->m_protBytes = 0;
|
||||
LEXP->m_protLength = 76; // ?? default value not mentioned in IEEE spec
|
||||
}
|
||||
BEGIN(INITIAL);
|
||||
return VP_TEXT;
|
||||
}
|
||||
<PRAGMAPRT>"key_block"{wsn}*[\n\r] {
|
||||
FL_FWDC;
|
||||
linenoInc();
|
||||
BEGIN(ENCBASE64);
|
||||
return VP_TEXT; }
|
||||
<PRAGMAPRT>"data_block"{wsn}*[\n\r] {
|
||||
FL_FWDC;
|
||||
linenoInc();
|
||||
LEXP->curFilelinep()->v3warn(PROTECTED, "A '`pragma protected data_block' encrypted section was detected and will be skipped.");
|
||||
BEGIN(ENCBASE64);
|
||||
return VP_TEXT; }
|
||||
<PRAGMAPRT>("begin_protected"|"end_protected")[\n\r] { FL_FWDC; linenoInc(); BEGIN(INITIAL); return VP_TEXT; }
|
||||
<PRAGMAPRT>"version="[^\n\r]*[\n\r] {
|
||||
FL_FWDC;
|
||||
linenoInc();
|
||||
BEGIN(INITIAL);
|
||||
return VP_TEXT; }
|
||||
<PRAGMAPRT>("encrypt_agent"|"encrypt_agent_info"|"key_keyowner"|"key_keyname"){wsn}*={wsn}*[\"][^\n\r]*[\"][\n\r] {
|
||||
FL_FWDC;
|
||||
linenoInc();
|
||||
BEGIN(INITIAL);
|
||||
return VP_TEXT; }
|
||||
<PRAGMAPRT>("data_method"|"key_method"){wsn}*={wsn}*[\"][^\n\r]*[\"][\n\r] {
|
||||
FL_FWDC;
|
||||
linenoInc();
|
||||
BEGIN(INITIAL);
|
||||
return VP_TEXT; }
|
||||
/* catch-all for unknown '`pragma protect' rules */
|
||||
<PRAGMAPRT>. { yyless(0);
|
||||
BEGIN(PRAGMAPRTERR);
|
||||
return VP_TEXT; }
|
||||
<ENCBASE64>[A-Za-z0-9+/]+[=]{0,2}[\n\r] { FL_FWDC; linenoInc(); FL_BRK;
|
||||
if ((yyourleng()-1) <= size_t(LEXP->m_protLength) && ((yyleng & 3) == 1)) {
|
||||
LEXP->m_protBytes -= (yyleng-1)/4*3;
|
||||
} else {
|
||||
LEXP->curFilelinep()->v3warn(BADSTDPRAGMA, "BASE64 line too long in `pragma protect key_bloock/data_block");
|
||||
}
|
||||
if (yytext[yyleng-3] == '=')
|
||||
LEXP->m_protBytes++;
|
||||
if (yytext[yyleng-2] == '=')
|
||||
LEXP->m_protBytes++;
|
||||
if (LEXP->m_protBytes == 0) {
|
||||
BEGIN(INITIAL);
|
||||
} else if (LEXP->m_protBytes < 0)
|
||||
LEXP->curFilelinep()->v3warn(BADSTDPRAGMA, "BASE64 encoding (too short) in `pragma protect key_bloock/data_block");
|
||||
/*return VP_TEXT;*/ }
|
||||
<ENCBASE64>{wsn}*[\n\r] { FL_FWDC;
|
||||
if (LEXP->m_protBytes != 0)
|
||||
LEXP->curFilelinep()->v3warn(BADSTDPRAGMA, "BASE64 encoding length mismatch in `pragma protect key_bloock/data_block");
|
||||
linenoInc(); BEGIN(INITIAL);
|
||||
return VP_TEXT; }
|
||||
|
||||
/* Catch only empty `pragma lines */
|
||||
<INITIAL>"`pragma"{wsn}*[\n\r] {
|
||||
yyless(yyleng-1); FL_FWDC;
|
||||
if (v3Global.opt.pedantic()) {
|
||||
LEXP->curFilelinep()->v3warn(BADSTDPRAGMA, "`pragma is missing a pragma_expression.");
|
||||
}
|
||||
return VP_TEXT; }
|
||||
|
||||
/* catch all other nonempty `pragma */
|
||||
<INITIAL>"`pragma"{wsn}*[^\n\r] {
|
||||
yyless(yyleng-1); FL_FWDC;
|
||||
if (!v3Global.opt.preprocOnly())
|
||||
BEGIN(PRAGMA);
|
||||
return VP_TEXT; }
|
||||
<PRAGMA>"protect"{wsn}* { FL_FWDC; BEGIN(PRAGMAPRT); return VP_TEXT;}
|
||||
|
||||
/* catch-all for unknown `pragma rules */
|
||||
<PRAGMA>. { yyless(0);
|
||||
BEGIN(PRAGMAERR);
|
||||
return VP_TEXT; }
|
||||
|
||||
/* the catch-all rule only got 1 char, lets get all line */
|
||||
<PRAGMAERR>[^\n\r]* { FL_FWDC;
|
||||
/* Add a warning here for unknown pragmas if desired, at the moment , we don't */
|
||||
/* LEXP->curFilelinep()->v3warn(BADPRAGMA, "Unknown `pragma"); */
|
||||
BEGIN(INITIAL);
|
||||
return VP_TEXT; }
|
||||
<PRAGMAPRTERR>[^\n\r]* { FL_FWDC;
|
||||
LEXP->curFilelinep()->v3warn(BADSTDPRAGMA, "Unknown '`pragma protect' error");
|
||||
BEGIN(INITIAL);
|
||||
return VP_TEXT; }
|
||||
<INITIAL,STRIFY>"`__FILE__" { FL_FWDC;
|
||||
static string rtnfile;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2021 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
scenarios(linter => 1);
|
||||
|
||||
|
||||
lint(
|
||||
verilator_flags2 => ['--lint-only -Wno-PROTECTED'],
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
// This part should pass OK
|
||||
|
||||
module t_lint_pragma_protected;
|
||||
|
||||
`pragma protect begin_protected
|
||||
`pragma protect version=1
|
||||
`pragma protect encrypt_agent="XXXXX"
|
||||
`pragma protect encrypt_agent_info="YYYYY"
|
||||
`pragma protect data_method="AES128-CBC"
|
||||
`pragma protect key_keyowner="BIG3#1"
|
||||
`pragma protect key_keyname="AAAAAA"
|
||||
`pragma protect key_method="RSA"
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 64)
|
||||
`pragma protect key_block
|
||||
ICAgICAgICAgICAgICAgICAgIEdOVSBMRVNTRVIgR0VORVJBTCBQVUJMSUMgTElDRU5TRQogICAg
|
||||
KSAyMDA3IE==
|
||||
|
||||
`pragma protect key_keyowner="BIG3#2"
|
||||
`pragma protect key_keyname="BBBBBB"
|
||||
`pragma protect key_method="RSA"
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128)
|
||||
`pragma protect key_block
|
||||
IEV2ZXJ5b25lIGlzIHBlcm1pdHRlZCB0byBjb3B5IGFuZCBkaXN0cmlidXRlIHZlcmJhdGltIGNv
|
||||
cGllcwogb2YgdGhpcyBsaWNlbnNlIGRvY3VtZW50LCBidXQgY2hhbmdpbmcgaXQgaXMgbm90IGFs
|
||||
bG93ZWQuCgoKICBUaGl=
|
||||
|
||||
`pragma protect key_keyowner="BIG3#3"
|
||||
`pragma protect key_keyname="CCCCCCCC"
|
||||
`pragma protect key_method="RSA"
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128)
|
||||
`pragma protect key_block
|
||||
TGljZW5zZSBpbmNvcnBvcmF0ZXMKdGhlIHRlcm1zIGFuZCBjb25kaXRpb25zIG9mIHZlcnNpb24g
|
||||
MyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljCkxpY2Vuc2UsIHN1cHBsZW1lbnRlZCBieSB0aGUg
|
||||
YWRkaXRpb25hbCBwZXJ=
|
||||
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 295)
|
||||
`pragma protect data_block
|
||||
aW5pdGlvbnMuCgogIEFzIHVzZWQgaGVyZWluLCAidGhpcyBMaWNlbnNlIiByZWZlcnMgdG8gdmVy
|
||||
c2lvbiAzIG9mIHRoZSBHTlUgTGVzc2VyCkdlbmVyYWwgUHVibGljIExpY2Vuc2UsIGFuZCB0aGUg
|
||||
IkdOVSBHUEwiIHJlZmVycyB0byB2ZXJzaW9uIDMgb2YgdGhlIEdOVQpHZW5lcmFsIFB1YmxpYyBM
|
||||
aWNlbnNlLgoKICAiVGhlIExpYnJhcnkiIHJlZmVycyB0byBhIGNvdmVyZWQgd29yayBnb3Zlcm5l
|
||||
ZCBieSB0aGlzIExpY2Vuc2UsCm90aGVyIHRoYW4gYW4gQXBwbGljYXRpb24gb3IgYSBDb21iaW5l
|
||||
ZCBXb3JrIGFzIG==
|
||||
|
||||
|
||||
`pragma protect end_protected
|
||||
|
||||
endmodule
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
%Error-BADSTDPRAGMA: t/t_lint_pragma_protected_err.v:8:17: Unknown '`pragma protect' error
|
||||
8 | `pragma protect encrypt_agent=123
|
||||
| ^~~~~~~~~~~~~~~~~
|
||||
... For error description see https://verilator.org/warn/BADSTDPRAGMA?v=latest
|
||||
%Error-BADSTDPRAGMA: t/t_lint_pragma_protected_err.v:10:17: Unknown '`pragma protect' error
|
||||
10 | `pragma protect encrypt_agent_info
|
||||
| ^~~~~~~~~~~~~~~~~~
|
||||
%Error-BADSTDPRAGMA: t/t_lint_pragma_protected_err.v:23:1: BASE64 encoding length mismatch in `pragma protect key_bloock/data_block
|
||||
%Error-BADSTDPRAGMA: t/t_lint_pragma_protected_err.v:27:17: multiple `pragma protected encoding sections
|
||||
27 | `pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128)
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
%Warning-PROTECTED: t/t_lint_pragma_protected_err.v:44:17: A '`pragma protected data_block' encrypted section was detected and will be skipped.
|
||||
... Use "/* verilator lint_off PROTECTED */" and lint_on around source to disable this message.
|
||||
%Error-BADSTDPRAGMA: t/t_lint_pragma_protected_err.v:58:1: `pragma is missing a pragma_expression.
|
||||
58 | `pragma
|
||||
| ^~~~~~~
|
||||
%Error: Exiting due to
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2021 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
scenarios(linter => 1);
|
||||
|
||||
lint(
|
||||
fails => 1,
|
||||
verilator_flags2 => ['--lint-only -Wpedantic'],
|
||||
expect_filename => $Self->{golden_filename},
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
module t_lint_pragma_protected_err;
|
||||
|
||||
// This part should see some failures
|
||||
|
||||
`pragma protect begin_protected
|
||||
`pragma protect version="xx"
|
||||
// should fail because value should be quoted
|
||||
`pragma protect encrypt_agent=123
|
||||
// should fail because no value given at all
|
||||
`pragma protect encrypt_agent_info
|
||||
`pragma protect data_method="AES128-CBC"
|
||||
`pragma protect key_keyowner="BIG3#1"
|
||||
`pragma protect key_keyname="AAAAAA"
|
||||
`pragma protect key_method="RSA"
|
||||
|
||||
// expect error in key_block below, 64 bytes but expecting 65
|
||||
// also expect "multiple `pragma encoding sections` error because number of
|
||||
// bytes does not go down to 0 in the end of the section below due to the 64->65 change
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 65)
|
||||
`pragma protect key_block
|
||||
ICAgICAgICAgICAgICAgICAgIEdOVSBMRVNTRVIgR0VORVJBTCBQVUJMSUMgTElDRU5TRQogICAg
|
||||
KSAyMDA3IE==
|
||||
|
||||
`pragma protect key_keyowner="BIG3#2"
|
||||
`pragma protect key_keyname="BBBBBB"
|
||||
`pragma protect key_method="RSA"
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128)
|
||||
`pragma protect key_block
|
||||
IEV2ZXJ5b25lIGlzIHBlcm1pdHRlZCB0byBjb3B5IGFuZCBkaXN0cmlidXRlIHZlcmJhdGltIGNv
|
||||
cGllcwogb2YgdGhpcyBsaWNlbnNlIGRvY3VtZW50LCBidXQgY2hhbmdpbmcgaXQgaXMgbm90IGFs
|
||||
bG93ZWQuCgoKICBUaGl=
|
||||
|
||||
`pragma protect key_keyowner="BIG3#3"
|
||||
`pragma protect key_keyname="CCCCCCCC"
|
||||
`pragma protect key_method="RSA"
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128)
|
||||
`pragma protect key_block
|
||||
TGljZW5zZSBpbmNvcnBvcmF0ZXMKdGhlIHRlcm1zIGFuZCBjb25kaXRpb25zIG9mIHZlcnNpb24g
|
||||
MyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljCkxpY2Vuc2UsIHN1cHBsZW1lbnRlZCBieSB0aGUg
|
||||
YWRkaXRpb25hbCBwZXJ=
|
||||
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 295)
|
||||
`pragma protect data_block
|
||||
aW5pdGlvbnMuCgogIEFzIHVzZWQgaGVyZWluLCAidGhpcyBMaWNlbnNlIiByZWZlcnMgdG8gdmVy
|
||||
c2lvbiAzIG9mIHRoZSBHTlUgTGVzc2VyCkdlbmVyYWwgUHVibGljIExpY2Vuc2UsIGFuZCB0aGUg
|
||||
IkdOVSBHUEwiIHJlZmVycyB0byB2ZXJzaW9uIDMgb2YgdGhlIEdOVQpHZW5lcmFsIFB1YmxpYyBM
|
||||
aWNlbnNlLgoKICAiVGhlIExpYnJhcnkiIHJlZmVycyB0byBhIGNvdmVyZWQgd29yayBnb3Zlcm5l
|
||||
ZCBieSB0aGlzIExpY2Vuc2UsCm90aGVyIHRoYW4gYW4gQXBwbGljYXRpb24gb3IgYSBDb21iaW5l
|
||||
ZCBXb3JrIGFzIG==
|
||||
|
||||
|
||||
`pragma protect end_protected
|
||||
|
||||
// Should trigger unknown pragma warning, although in principle unknown pragmas should be safely ignored.
|
||||
`pragma XXXXX
|
||||
|
||||
// Should trigger missing pragma warning
|
||||
`pragma
|
||||
|
||||
endmodule
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
%Error: t/t_pp_pragma_bad.v:7:1: `pragma is missing a pragma_expression.
|
||||
%Error-BADSTDPRAGMA: t/t_pp_pragma_bad.v:7:1: `pragma is missing a pragma_expression.
|
||||
7 | `pragma
|
||||
| ^~~~~~~
|
||||
... For error description see https://verilator.org/warn/BADSTDPRAGMA?v=latest
|
||||
`line 1 "t/t_pp_pragma_bad.v" 1
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -274,6 +274,62 @@ endmodule
|
|||
`line 164 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
module t_lint_pragma_protected;
|
||||
|
||||
`line 168 "t/t_preproc.v" 0
|
||||
`pragma protect begin_protected
|
||||
`pragma protect version=1
|
||||
`pragma protect encrypt_agent="XXXXX"
|
||||
`pragma protect encrypt_agent_info="YYYYY"
|
||||
`pragma protect data_method="AES128-CBC"
|
||||
`pragma protect key_keyowner="BIG3#1"
|
||||
`pragma protect key_keyname="AAAAAA"
|
||||
`pragma protect key_method="RSA"
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 64)
|
||||
`pragma protect key_block
|
||||
ICAgICAgICAgICAgICAgICAgIEdOVSBMRVNTRVIgR0VORVJBTCBQVUJMSUMgTElDRU5TRQogICAg
|
||||
KSAyMDA3IE==
|
||||
|
||||
`line 181 "t/t_preproc.v" 0
|
||||
`pragma protect key_keyowner="BIG3#2"
|
||||
`pragma protect key_keyname="BBBBBB"
|
||||
`pragma protect key_method="RSA"
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128)
|
||||
`pragma protect key_block
|
||||
IEV2ZXJ5b25lIGlzIHBlcm1pdHRlZCB0byBjb3B5IGFuZCBkaXN0cmlidXRlIHZlcmJhdGltIGNv
|
||||
cGllcwogb2YgdGhpcyBsaWNlbnNlIGRvY3VtZW50LCBidXQgY2hhbmdpbmcgaXQgaXMgbm90IGFs
|
||||
bG93ZWQuCgoKICBUaGl=
|
||||
|
||||
`line 190 "t/t_preproc.v" 0
|
||||
`pragma protect key_keyowner="BIG3#3"
|
||||
`pragma protect key_keyname="CCCCCCCC"
|
||||
`pragma protect key_method="RSA"
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128)
|
||||
`pragma protect key_block
|
||||
TGljZW5zZSBpbmNvcnBvcmF0ZXMKdGhlIHRlcm1zIGFuZCBjb25kaXRpb25zIG9mIHZlcnNpb24g
|
||||
MyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljCkxpY2Vuc2UsIHN1cHBsZW1lbnRlZCBieSB0aGUg
|
||||
YWRkaXRpb25hbCBwZXJ=
|
||||
|
||||
`line 199 "t/t_preproc.v" 0
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 295)
|
||||
`pragma protect data_block
|
||||
aW5pdGlvbnMuCgogIEFzIHVzZWQgaGVyZWluLCAidGhpcyBMaWNlbnNlIiByZWZlcnMgdG8gdmVy
|
||||
c2lvbiAzIG9mIHRoZSBHTlUgTGVzc2VyCkdlbmVyYWwgUHVibGljIExpY2Vuc2UsIGFuZCB0aGUg
|
||||
IkdOVSBHUEwiIHJlZmVycyB0byB2ZXJzaW9uIDMgb2YgdGhlIEdOVQpHZW5lcmFsIFB1YmxpYyBM
|
||||
aWNlbnNlLgoKICAiVGhlIExpYnJhcnkiIHJlZmVycyB0byBhIGNvdmVyZWQgd29yayBnb3Zlcm5l
|
||||
ZCBieSB0aGlzIExpY2Vuc2UsCm90aGVyIHRoYW4gYW4gQXBwbGljYXRpb24gb3IgYSBDb21iaW5l
|
||||
ZCBXb3JrIGFzIG==
|
||||
|
||||
|
||||
`line 209 "t/t_preproc.v" 0
|
||||
`pragma protect end_protected
|
||||
|
||||
`line 211 "t/t_preproc.v" 0
|
||||
endmodule
|
||||
|
||||
`line 213 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -282,17 +338,17 @@ endmodule
|
|||
|
||||
|
||||
|
||||
`line 174 "t/t_preproc.v" 0
|
||||
`line 223 "t/t_preproc.v" 0
|
||||
begin addr <= (({regs[6], regs[7]} + 1)); rd <= 1; end and begin addr <= (({regs[6], regs[7]})); wdata <= (rdata); wr <= 1; end
|
||||
begin addr <= ({regs[6], regs[7]} + 1); rd <= 1; end
|
||||
begin addr <= ({regs[6], regs[7]}); wdata <= (rdata); wr <= 1; end more
|
||||
|
||||
`line 178 "t/t_preproc.v" 0
|
||||
`line 227 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
`line 181 "t/t_preproc.v" 0
|
||||
`line 230 "t/t_preproc.v" 0
|
||||
`line 1 "t/t_preproc_inc4.vh" 1
|
||||
|
||||
`line 2 "t/t_preproc_inc4.vh" 0
|
||||
|
|
@ -304,57 +360,57 @@ begin addr <= ({regs[6], regs[7]}); wdata <= (rdata); wr <= 1; end more
|
|||
|
||||
|
||||
`line 8 "t/t_preproc_inc4.vh" 2
|
||||
`line 181 "t/t_preproc.v" 0
|
||||
`line 230 "t/t_preproc.v" 0
|
||||
|
||||
`line 182 "t/t_preproc.v" 0
|
||||
`line 231 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 185 "t/t_preproc.v" 0
|
||||
`line 234 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
`line 187 "t/t_preproc.v" 0
|
||||
`line 236 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
`line 191 "t/t_preproc.v" 0
|
||||
`line 240 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 194 "t/t_preproc.v" 0
|
||||
`line 243 "t/t_preproc.v" 0
|
||||
|
||||
$blah("ab,cd","e,f");
|
||||
$blah(this.logfile,vec);
|
||||
$blah(this.logfile,vec[1,2,3]);
|
||||
$blah(this.logfile,{blah.name(), " is not foo"});
|
||||
|
||||
`line 200 "t/t_preproc.v" 0
|
||||
`line 249 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 203 "t/t_preproc.v" 0
|
||||
`line 252 "t/t_preproc.v" 0
|
||||
`pragma foo = 1
|
||||
`default_nettype none
|
||||
`default_nettype uwire
|
||||
|
||||
`line 207 "t/t_preproc.v" 0
|
||||
`line 256 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 210 "t/t_preproc.v" 0
|
||||
`line 259 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
`line 214 "t/t_preproc.v" 0
|
||||
Line_Preproc_Check 214
|
||||
`line 263 "t/t_preproc.v" 0
|
||||
Line_Preproc_Check 263
|
||||
|
||||
`line 216 "t/t_preproc.v" 0
|
||||
`line 265 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 219 "t/t_preproc.v" 0
|
||||
`line 268 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -362,15 +418,15 @@ Line_Preproc_Check 214
|
|||
|
||||
|
||||
|
||||
`line 226 "t/t_preproc.v" 0
|
||||
`line 275 "t/t_preproc.v" 0
|
||||
(x,y)
|
||||
Line_Preproc_Check 227
|
||||
Line_Preproc_Check 276
|
||||
|
||||
`line 229 "t/t_preproc.v" 0
|
||||
`line 278 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 232 "t/t_preproc.v" 0
|
||||
`line 281 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -379,17 +435,17 @@ beginend
|
|||
beginend
|
||||
"beginend"
|
||||
|
||||
`line 240 "t/t_preproc.v" 0
|
||||
`line 289 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
`\esc`def
|
||||
|
||||
`line 246 "t/t_preproc.v" 0
|
||||
`line 295 "t/t_preproc.v" 0
|
||||
Not a \`define
|
||||
|
||||
`line 248 "t/t_preproc.v" 0
|
||||
`line 297 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -398,123 +454,26 @@ Not a \`define
|
|||
|
||||
x,y)--bee submacro has comma paren
|
||||
|
||||
`line 256 "t/t_preproc.v" 0
|
||||
`line 305 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
$display("10 %d %d", $bits(foo), 10);
|
||||
|
||||
`line 261 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`line 266 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 269 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
assign a3 = ~b3 ;
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
`line 285 "t/t_preproc.v" 0
|
||||
|
||||
\
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`line 294 "t/t_preproc.v" 0
|
||||
|
||||
`line 294 "t/t_preproc.v" 0
|
||||
|
||||
`line 294 "t/t_preproc.v" 0
|
||||
def i
|
||||
|
||||
|
||||
`line 296 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
`line 298 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`line 302 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`line 308 "t/t_preproc.v" 0
|
||||
1 /*verilator NOT IN DEFINE*/ (nodef)
|
||||
2 /*verilator PART OF DEFINE*/ (hasdef)
|
||||
3
|
||||
`line 310 "t/t_preproc.v" 0
|
||||
/*verilator NOT PART
|
||||
OF DEFINE*/ (nodef)
|
||||
`line 311 "t/t_preproc.v" 0
|
||||
4
|
||||
`line 311 "t/t_preproc.v" 0
|
||||
/*verilator PART
|
||||
OF DEFINE*/ (nodef)
|
||||
`line 312 "t/t_preproc.v" 0
|
||||
5 also in
|
||||
`line 312 "t/t_preproc.v" 0
|
||||
also3 (nodef)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
HAS a NEW
|
||||
`line 315 "t/t_preproc.v" 0
|
||||
LINE
|
||||
|
||||
|
||||
|
||||
`line 317 "t/t_preproc.v" 0
|
||||
`line 318 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 319 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -527,10 +486,107 @@ LINE
|
|||
|
||||
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
assign a3 = ~b3 ;
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
`line 334 "t/t_preproc.v" 0
|
||||
|
||||
\
|
||||
|
||||
|
||||
|
||||
`line 335 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`line 343 "t/t_preproc.v" 0
|
||||
|
||||
`line 343 "t/t_preproc.v" 0
|
||||
|
||||
`line 343 "t/t_preproc.v" 0
|
||||
def i
|
||||
|
||||
|
||||
`line 345 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
`line 347 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`line 351 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`line 357 "t/t_preproc.v" 0
|
||||
1 /*verilator NOT IN DEFINE*/ (nodef)
|
||||
2 /*verilator PART OF DEFINE*/ (hasdef)
|
||||
3
|
||||
`line 359 "t/t_preproc.v" 0
|
||||
/*verilator NOT PART
|
||||
OF DEFINE*/ (nodef)
|
||||
`line 360 "t/t_preproc.v" 0
|
||||
4
|
||||
`line 360 "t/t_preproc.v" 0
|
||||
/*verilator PART
|
||||
OF DEFINE*/ (nodef)
|
||||
`line 361 "t/t_preproc.v" 0
|
||||
5 also in
|
||||
`line 361 "t/t_preproc.v" 0
|
||||
also3 (nodef)
|
||||
|
||||
|
||||
HAS a NEW
|
||||
`line 364 "t/t_preproc.v" 0
|
||||
LINE
|
||||
|
||||
`line 366 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
`line 368 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`line 381 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 384 "t/t_preproc.v" 0
|
||||
EXP: clxx_scen
|
||||
clxx_scen
|
||||
EXP: clxx_scen
|
||||
|
|
@ -538,44 +594,44 @@ EXP: clxx_scen
|
|||
|
||||
EXP: do if (start("verilog/inc1.v", 25)) begin message({"Blah-", "clx_scen", " end"}); end while(0);
|
||||
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
do
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
if (start("t/t_preproc.v", 341)) begin
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
if (start("t/t_preproc.v", 390)) begin
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
message({"Blah-", "clx_scen", " end"});
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
end
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
while(0);
|
||||
|
||||
`line 343 "t/t_preproc.v" 0
|
||||
`line 392 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
`line 345 "t/t_preproc.v" 0
|
||||
`line 394 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`line 349 "t/t_preproc.v" 0
|
||||
`line 398 "t/t_preproc.v" 0
|
||||
|
||||
`line 349 "t/t_preproc.v" 0
|
||||
`line 398 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
`line 350 "t/t_preproc.v" 0
|
||||
`line 399 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
EXP: This is fooed
|
||||
|
|
@ -583,7 +639,7 @@ This is fooed
|
|||
EXP: This is fooed_2
|
||||
This is fooed_2
|
||||
|
||||
`line 357 "t/t_preproc.v" 0
|
||||
`line 406 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
np
|
||||
|
|
@ -595,11 +651,11 @@ np
|
|||
|
||||
|
||||
|
||||
`line 368 "t/t_preproc.v" 0
|
||||
`line 417 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 371 "t/t_preproc.v" 0
|
||||
`line 420 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -608,12 +664,12 @@ np
|
|||
|
||||
|
||||
|
||||
`line 379 "t/t_preproc.v" 0
|
||||
`line 428 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
`line 383 "t/t_preproc.v" 0
|
||||
`line 432 "t/t_preproc.v" 0
|
||||
hello3hello3hello3
|
||||
hello4hello4hello4hello4
|
||||
|
||||
|
|
@ -621,7 +677,7 @@ hello4hello4hello4hello4
|
|||
|
||||
|
||||
|
||||
`line 389 "t/t_preproc.v" 0
|
||||
`line 438 "t/t_preproc.v" 0
|
||||
`line 1 "t/t_preproc_inc4.vh" 1
|
||||
|
||||
`line 2 "t/t_preproc_inc4.vh" 0
|
||||
|
|
@ -633,9 +689,9 @@ hello4hello4hello4hello4
|
|||
|
||||
|
||||
`line 8 "t/t_preproc_inc4.vh" 2
|
||||
`line 389 "t/t_preproc.v" 0
|
||||
`line 438 "t/t_preproc.v" 0
|
||||
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
`line 439 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -645,28 +701,28 @@ hello4hello4hello4hello4
|
|||
|
||||
|
||||
|
||||
`line 398 "t/t_preproc.v" 0
|
||||
`line 447 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
Line_Preproc_Check 402
|
||||
Line_Preproc_Check 451
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Line_Preproc_Check 408
|
||||
Line_Preproc_Check 457
|
||||
"FOO \
|
||||
BAR " "arg_line1 \
|
||||
arg_line2" "FOO \
|
||||
BAR "
|
||||
`line 411 "t/t_preproc.v" 0
|
||||
Line_Preproc_Check 411
|
||||
`line 460 "t/t_preproc.v" 0
|
||||
Line_Preproc_Check 460
|
||||
|
||||
|
||||
|
||||
`line 415 "t/t_preproc.v" 0
|
||||
`line 464 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -677,14 +733,14 @@ abc
|
|||
|
||||
|
||||
|
||||
`line 425 "t/t_preproc.v" 0
|
||||
`line 474 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
EXP: sonet_frame
|
||||
sonet_frame
|
||||
|
||||
`line 431 "t/t_preproc.v" 0
|
||||
`line 480 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
EXP: sonet_frame
|
||||
|
|
@ -695,7 +751,7 @@ sonet_frame
|
|||
EXP: sonet_frame
|
||||
sonet_frame
|
||||
|
||||
`line 441 "t/t_preproc.v" 0
|
||||
`line 490 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -703,13 +759,13 @@ EXP: module zzz ; endmodule
|
|||
module zzz ; endmodule
|
||||
module zzz ; endmodule
|
||||
|
||||
`line 448 "t/t_preproc.v" 0
|
||||
`line 497 "t/t_preproc.v" 0
|
||||
|
||||
EXP: module a_b ; endmodule
|
||||
module a_b ; endmodule
|
||||
module a_b ; endmodule
|
||||
|
||||
`line 453 "t/t_preproc.v" 0
|
||||
`line 502 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
integer foo;
|
||||
|
|
@ -723,7 +779,7 @@ module t;
|
|||
|
||||
|
||||
initial begin : \`LEX_CAT(a[0],_assignment)
|
||||
`line 465 "t/t_preproc.v" 0
|
||||
`line 514 "t/t_preproc.v" 0
|
||||
$write("GOT%%m='%m' EXP='%s'\n", "t.\\`LEX_CAT(a[0],_assignment) "); end
|
||||
|
||||
|
||||
|
|
@ -732,7 +788,7 @@ module t;
|
|||
|
||||
|
||||
initial begin : \a[0]_assignment_a[1]
|
||||
`line 472 "t/t_preproc.v" 0
|
||||
`line 521 "t/t_preproc.v" 0
|
||||
$write("GOT%%m='%m' EXP='%s'\n", "t.\\a[0]_assignment_a[1] "); end
|
||||
|
||||
|
||||
|
|
@ -748,7 +804,7 @@ module t;
|
|||
|
||||
|
||||
initial begin : \`CAT(ff,bb)
|
||||
`line 486 "t/t_preproc.v" 0
|
||||
`line 535 "t/t_preproc.v" 0
|
||||
$write("GOT%%m='%m' EXP='%s'\n", "t.\\`CAT(ff,bb) "); end
|
||||
|
||||
|
||||
|
|
@ -756,7 +812,7 @@ module t;
|
|||
|
||||
|
||||
initial begin : \`zzz
|
||||
`line 492 "t/t_preproc.v" 0
|
||||
`line 541 "t/t_preproc.v" 0
|
||||
$write("GOT%%m='%m' EXP='%s'\n", "t.\\`zzz "); end
|
||||
|
||||
|
||||
|
|
@ -765,11 +821,11 @@ module t;
|
|||
|
||||
|
||||
initial begin : \`FOO
|
||||
`line 499 "t/t_preproc.v" 0
|
||||
`line 548 "t/t_preproc.v" 0
|
||||
$write("GOT%%m='%m' OTHER_EXP='%s'\n OUR_EXP='%s'", "t.bar ","t.\\`FOO "); end
|
||||
|
||||
initial begin : \xx`FOO
|
||||
`line 501 "t/t_preproc.v" 0
|
||||
`line 550 "t/t_preproc.v" 0
|
||||
$write("GOT%%m='%m' EXP='%s'\n", "t.\\xx`FOO "); end
|
||||
|
||||
|
||||
|
|
@ -802,27 +858,27 @@ module t;
|
|||
|
||||
|
||||
initial
|
||||
`line 532 "t/t_preproc.v" 0
|
||||
`line 581 "t/t_preproc.v" 0
|
||||
$display("%s%s","a1","b2c3\n");
|
||||
endmodule
|
||||
|
||||
`line 535 "t/t_preproc.v" 0
|
||||
`line 584 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 538 "t/t_preproc.v" 0
|
||||
`line 587 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
$display("RAM0");
|
||||
$display("CPU");
|
||||
|
||||
`line 543 "t/t_preproc.v" 0
|
||||
`line 592 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`line 548 "t/t_preproc.v" 0
|
||||
`line 597 "t/t_preproc.v" 0
|
||||
|
||||
XXE_FAMILY = XXE_
|
||||
|
||||
|
|
@ -830,7 +886,7 @@ XXE_FAMILY = XXE_
|
|||
$display("XXE_ is defined");
|
||||
|
||||
|
||||
`line 555 "t/t_preproc.v" 0
|
||||
`line 604 "t/t_preproc.v" 0
|
||||
|
||||
XYE_FAMILY = XYE_
|
||||
|
||||
|
|
@ -838,7 +894,7 @@ XYE_FAMILY = XYE_
|
|||
$display("XYE_ is defined");
|
||||
|
||||
|
||||
`line 562 "t/t_preproc.v" 0
|
||||
`line 611 "t/t_preproc.v" 0
|
||||
|
||||
XXS_FAMILY = XXS_some
|
||||
|
||||
|
|
@ -846,7 +902,7 @@ XXS_FAMILY = XXS_some
|
|||
$display("XXS_some is defined");
|
||||
|
||||
|
||||
`line 569 "t/t_preproc.v" 0
|
||||
`line 618 "t/t_preproc.v" 0
|
||||
|
||||
XYS_FAMILY = XYS_foo
|
||||
|
||||
|
|
@ -854,10 +910,10 @@ XYS_FAMILY = XYS_foo
|
|||
$display("XYS_foo is defined");
|
||||
|
||||
|
||||
`line 576 "t/t_preproc.v" 0
|
||||
`line 625 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
`line 578 "t/t_preproc.v" 0
|
||||
`line 627 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -866,7 +922,7 @@ XYS_FAMILY = XYS_foo
|
|||
|
||||
|
||||
|
||||
`line 586 "t/t_preproc.v" 0
|
||||
`line 635 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -874,7 +930,7 @@ XYS_FAMILY = XYS_foo
|
|||
|
||||
|
||||
|
||||
`line 593 "t/t_preproc.v" 0
|
||||
`line 642 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -882,7 +938,7 @@ XYS_FAMILY = XYS_foo
|
|||
|
||||
|
||||
|
||||
`line 600 "t/t_preproc.v" 0
|
||||
`line 649 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -890,26 +946,26 @@ XYS_FAMILY = XYS_foo
|
|||
|
||||
|
||||
|
||||
`line 607 "t/t_preproc.v" 0
|
||||
`line 656 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
`line 609 "t/t_preproc.v" 0
|
||||
`line 658 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
`line 611 "t/t_preproc.v" 0
|
||||
`line 660 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
(.mySig (myInterface.pa5),
|
||||
|
||||
`line 615 "t/t_preproc.v" 0
|
||||
`line 664 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 618 "t/t_preproc.v" 0
|
||||
`line 667 "t/t_preproc.v" 0
|
||||
|
||||
`dbg_hdl(UVM_LOW, ("Functional coverage enabled: paramgrp"));
|
||||
|
||||
`line 621 "t/t_preproc.v" 0
|
||||
`line 670 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -918,28 +974,28 @@ XYS_FAMILY = XYS_foo
|
|||
|
||||
|
||||
|
||||
`line 629 "t/t_preproc.v" 0
|
||||
`line 678 "t/t_preproc.v" 0
|
||||
module pcc2_cfg;
|
||||
generate
|
||||
|
||||
`line 631 "t/t_preproc.v" 0
|
||||
`line 680 "t/t_preproc.v" 0
|
||||
covergroup a @(posedge b);
|
||||
`line 631 "t/t_preproc.v" 0
|
||||
`line 680 "t/t_preproc.v" 0
|
||||
c: coverpoint d iff ((c) === 1'b1); endgroup
|
||||
`line 631 "t/t_preproc.v" 0
|
||||
`line 680 "t/t_preproc.v" 0
|
||||
a u_a;
|
||||
`line 631 "t/t_preproc.v" 0
|
||||
`line 680 "t/t_preproc.v" 0
|
||||
initial do begin $display ("DEBUG : %s [%m]", $sformatf ("Functional coverage enabled: u_a")); end while(0);
|
||||
endgenerate
|
||||
endmodule
|
||||
|
||||
`line 635 "t/t_preproc.v" 0
|
||||
`line 684 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
"`NOT_DEFINED_STR"
|
||||
|
||||
`line 640 "t/t_preproc.v" 0
|
||||
`line 689 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -962,4 +1018,4 @@ predef 2 2
|
|||
|
||||
|
||||
|
||||
`line 662 "t/t_preproc.v" 2
|
||||
`line 711 "t/t_preproc.v" 2
|
||||
|
|
|
|||
|
|
@ -161,6 +161,55 @@ module prot();
|
|||
endmodule
|
||||
//"
|
||||
|
||||
//======================================================================
|
||||
// Check IEEE1800-2017 `pragma protect encrypted modules
|
||||
module t_lint_pragma_protected;
|
||||
|
||||
`pragma protect begin_protected
|
||||
`pragma protect version=1
|
||||
`pragma protect encrypt_agent="XXXXX"
|
||||
`pragma protect encrypt_agent_info="YYYYY"
|
||||
`pragma protect data_method="AES128-CBC"
|
||||
`pragma protect key_keyowner="BIG3#1"
|
||||
`pragma protect key_keyname="AAAAAA"
|
||||
`pragma protect key_method="RSA"
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 64)
|
||||
`pragma protect key_block
|
||||
ICAgICAgICAgICAgICAgICAgIEdOVSBMRVNTRVIgR0VORVJBTCBQVUJMSUMgTElDRU5TRQogICAg
|
||||
KSAyMDA3IE==
|
||||
|
||||
`pragma protect key_keyowner="BIG3#2"
|
||||
`pragma protect key_keyname="BBBBBB"
|
||||
`pragma protect key_method="RSA"
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128)
|
||||
`pragma protect key_block
|
||||
IEV2ZXJ5b25lIGlzIHBlcm1pdHRlZCB0byBjb3B5IGFuZCBkaXN0cmlidXRlIHZlcmJhdGltIGNv
|
||||
cGllcwogb2YgdGhpcyBsaWNlbnNlIGRvY3VtZW50LCBidXQgY2hhbmdpbmcgaXQgaXMgbm90IGFs
|
||||
bG93ZWQuCgoKICBUaGl=
|
||||
|
||||
`pragma protect key_keyowner="BIG3#3"
|
||||
`pragma protect key_keyname="CCCCCCCC"
|
||||
`pragma protect key_method="RSA"
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128)
|
||||
`pragma protect key_block
|
||||
TGljZW5zZSBpbmNvcnBvcmF0ZXMKdGhlIHRlcm1zIGFuZCBjb25kaXRpb25zIG9mIHZlcnNpb24g
|
||||
MyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljCkxpY2Vuc2UsIHN1cHBsZW1lbnRlZCBieSB0aGUg
|
||||
YWRkaXRpb25hbCBwZXJ=
|
||||
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 295)
|
||||
`pragma protect data_block
|
||||
aW5pdGlvbnMuCgogIEFzIHVzZWQgaGVyZWluLCAidGhpcyBMaWNlbnNlIiByZWZlcnMgdG8gdmVy
|
||||
c2lvbiAzIG9mIHRoZSBHTlUgTGVzc2VyCkdlbmVyYWwgUHVibGljIExpY2Vuc2UsIGFuZCB0aGUg
|
||||
IkdOVSBHUEwiIHJlZmVycyB0byB2ZXJzaW9uIDMgb2YgdGhlIEdOVQpHZW5lcmFsIFB1YmxpYyBM
|
||||
aWNlbnNlLgoKICAiVGhlIExpYnJhcnkiIHJlZmVycyB0byBhIGNvdmVyZWQgd29yayBnb3Zlcm5l
|
||||
ZCBieSB0aGlzIExpY2Vuc2UsCm90aGVyIHRoYW4gYW4gQXBwbGljYXRpb24gb3IgYSBDb21iaW5l
|
||||
ZCBXb3JrIGFzIG==
|
||||
|
||||
|
||||
`pragma protect end_protected
|
||||
|
||||
endmodule
|
||||
|
||||
//======================================================================
|
||||
// macro call with define that has comma
|
||||
`define REG_H 6
|
||||
|
|
|
|||
|
|
@ -273,6 +273,62 @@ endmodule
|
|||
|
||||
`line 164 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// Check IEEE1800-2017 `pragma protect encrypted modules
|
||||
module t_lint_pragma_protected;
|
||||
|
||||
`line 168 "t/t_preproc.v" 0
|
||||
`pragma protect begin_protected
|
||||
`pragma protect version=1
|
||||
`pragma protect encrypt_agent="XXXXX"
|
||||
`pragma protect encrypt_agent_info="YYYYY"
|
||||
`pragma protect data_method="AES128-CBC"
|
||||
`pragma protect key_keyowner="BIG3#1"
|
||||
`pragma protect key_keyname="AAAAAA"
|
||||
`pragma protect key_method="RSA"
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 64)
|
||||
`pragma protect key_block
|
||||
ICAgICAgICAgICAgICAgICAgIEdOVSBMRVNTRVIgR0VORVJBTCBQVUJMSUMgTElDRU5TRQogICAg
|
||||
KSAyMDA3IE==
|
||||
|
||||
`line 181 "t/t_preproc.v" 0
|
||||
`pragma protect key_keyowner="BIG3#2"
|
||||
`pragma protect key_keyname="BBBBBB"
|
||||
`pragma protect key_method="RSA"
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128)
|
||||
`pragma protect key_block
|
||||
IEV2ZXJ5b25lIGlzIHBlcm1pdHRlZCB0byBjb3B5IGFuZCBkaXN0cmlidXRlIHZlcmJhdGltIGNv
|
||||
cGllcwogb2YgdGhpcyBsaWNlbnNlIGRvY3VtZW50LCBidXQgY2hhbmdpbmcgaXQgaXMgbm90IGFs
|
||||
bG93ZWQuCgoKICBUaGl=
|
||||
|
||||
`line 190 "t/t_preproc.v" 0
|
||||
`pragma protect key_keyowner="BIG3#3"
|
||||
`pragma protect key_keyname="CCCCCCCC"
|
||||
`pragma protect key_method="RSA"
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128)
|
||||
`pragma protect key_block
|
||||
TGljZW5zZSBpbmNvcnBvcmF0ZXMKdGhlIHRlcm1zIGFuZCBjb25kaXRpb25zIG9mIHZlcnNpb24g
|
||||
MyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljCkxpY2Vuc2UsIHN1cHBsZW1lbnRlZCBieSB0aGUg
|
||||
YWRkaXRpb25hbCBwZXJ=
|
||||
|
||||
`line 199 "t/t_preproc.v" 0
|
||||
`pragma protect encoding = (enctype = "BASE64", line_length = 76, bytes = 295)
|
||||
`pragma protect data_block
|
||||
aW5pdGlvbnMuCgogIEFzIHVzZWQgaGVyZWluLCAidGhpcyBMaWNlbnNlIiByZWZlcnMgdG8gdmVy
|
||||
c2lvbiAzIG9mIHRoZSBHTlUgTGVzc2VyCkdlbmVyYWwgUHVibGljIExpY2Vuc2UsIGFuZCB0aGUg
|
||||
IkdOVSBHUEwiIHJlZmVycyB0byB2ZXJzaW9uIDMgb2YgdGhlIEdOVQpHZW5lcmFsIFB1YmxpYyBM
|
||||
aWNlbnNlLgoKICAiVGhlIExpYnJhcnkiIHJlZmVycyB0byBhIGNvdmVyZWQgd29yayBnb3Zlcm5l
|
||||
ZCBieSB0aGlzIExpY2Vuc2UsCm90aGVyIHRoYW4gYW4gQXBwbGljYXRpb24gb3IgYSBDb21iaW5l
|
||||
ZCBXb3JrIGFzIG==
|
||||
|
||||
|
||||
`line 209 "t/t_preproc.v" 0
|
||||
`pragma protect end_protected
|
||||
|
||||
`line 211 "t/t_preproc.v" 0
|
||||
endmodule
|
||||
|
||||
`line 213 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// macro call with define that has comma
|
||||
|
||||
|
||||
|
|
@ -282,17 +338,17 @@ endmodule
|
|||
|
||||
|
||||
|
||||
`line 174 "t/t_preproc.v" 0
|
||||
`line 223 "t/t_preproc.v" 0
|
||||
begin addr <= (({regs[6], regs[7]} + 1)); rd <= 1; end and begin addr <= (({regs[6], regs[7]})); wdata <= (rdata); wr <= 1; end
|
||||
begin addr <= ({regs[6], regs[7]} + 1); rd <= 1; end
|
||||
begin addr <= ({regs[6], regs[7]}); wdata <= (rdata); wr <= 1; end more
|
||||
|
||||
`line 178 "t/t_preproc.v" 0
|
||||
`line 227 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// include of parameterized file
|
||||
|
||||
|
||||
`line 181 "t/t_preproc.v" 0
|
||||
`line 230 "t/t_preproc.v" 0
|
||||
`line 1 "t/t_preproc_inc4.vh" 1
|
||||
// DESCRIPTION: Verilog::Preproc: Example source code
|
||||
`line 2 "t/t_preproc_inc4.vh" 0
|
||||
|
|
@ -304,57 +360,57 @@ begin addr <= ({regs[6], regs[7]}); wdata <= (rdata); wr <= 1; end more
|
|||
|
||||
|
||||
`line 8 "t/t_preproc_inc4.vh" 2
|
||||
`line 181 "t/t_preproc.v" 0
|
||||
`line 230 "t/t_preproc.v" 0
|
||||
|
||||
`line 182 "t/t_preproc.v" 0
|
||||
`line 231 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 185 "t/t_preproc.v" 0
|
||||
`line 234 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
`line 187 "t/t_preproc.v" 0
|
||||
`line 236 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
`line 191 "t/t_preproc.v" 0
|
||||
`line 240 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// macro call with , in {}
|
||||
|
||||
`line 194 "t/t_preproc.v" 0
|
||||
`line 243 "t/t_preproc.v" 0
|
||||
|
||||
$blah("ab,cd","e,f");
|
||||
$blah(this.logfile,vec);
|
||||
$blah(this.logfile,vec[1,2,3]);
|
||||
$blah(this.logfile,{blah.name(), " is not foo"});
|
||||
|
||||
`line 200 "t/t_preproc.v" 0
|
||||
`line 249 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// pragma/default net type
|
||||
|
||||
`line 203 "t/t_preproc.v" 0
|
||||
`line 252 "t/t_preproc.v" 0
|
||||
`pragma foo = 1
|
||||
`default_nettype none
|
||||
`default_nettype uwire
|
||||
|
||||
`line 207 "t/t_preproc.v" 0
|
||||
`line 256 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// Ifdef
|
||||
|
||||
`line 210 "t/t_preproc.v" 0
|
||||
`line 259 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
`line 214 "t/t_preproc.v" 0
|
||||
Line_Preproc_Check 214
|
||||
`line 263 "t/t_preproc.v" 0
|
||||
Line_Preproc_Check 263
|
||||
|
||||
`line 216 "t/t_preproc.v" 0
|
||||
`line 265 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// bug84
|
||||
|
||||
`line 219 "t/t_preproc.v" 0
|
||||
`line 268 "t/t_preproc.v" 0
|
||||
// Hello, comments MIGHT not be legal /*more,,)cmts*/ // But newlines ARE legal... who speced THAT?
|
||||
|
||||
|
||||
|
|
@ -362,15 +418,15 @@ Line_Preproc_Check 214
|
|||
|
||||
|
||||
|
||||
`line 226 "t/t_preproc.v" 0
|
||||
`line 275 "t/t_preproc.v" 0
|
||||
(//Here x,y //Too)
|
||||
Line_Preproc_Check 227
|
||||
Line_Preproc_Check 276
|
||||
|
||||
`line 229 "t/t_preproc.v" 0
|
||||
`line 278 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// defines split arguments
|
||||
|
||||
`line 232 "t/t_preproc.v" 0
|
||||
`line 281 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -379,17 +435,17 @@ beginend // 2001 spec doesn't require two tokens, so "beginend" ok
|
|||
beginend // 2001 spec doesn't require two tokens, so "beginend" ok
|
||||
"beginend" // No space "beginend"
|
||||
|
||||
`line 240 "t/t_preproc.v" 0
|
||||
`line 289 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// bug106
|
||||
|
||||
|
||||
`\esc`def
|
||||
|
||||
`line 246 "t/t_preproc.v" 0
|
||||
`line 295 "t/t_preproc.v" 0
|
||||
Not a \`define
|
||||
|
||||
`line 248 "t/t_preproc.v" 0
|
||||
`line 297 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// misparsed comma in submacro
|
||||
|
||||
|
|
@ -398,23 +454,23 @@ Not a \`define
|
|||
|
||||
x,y)--bee submacro has comma paren
|
||||
|
||||
`line 256 "t/t_preproc.v" 0
|
||||
`line 305 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// bug191
|
||||
|
||||
$display("10 %d %d", $bits(foo), 10);
|
||||
|
||||
`line 261 "t/t_preproc.v" 0
|
||||
`line 310 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// 1800-2009
|
||||
|
||||
|
||||
|
||||
`line 266 "t/t_preproc.v" 0
|
||||
`line 315 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 269 "t/t_preproc.v" 0
|
||||
`line 318 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// bug202
|
||||
|
||||
|
|
@ -429,34 +485,34 @@ $display("10 %d %d", $bits(foo), 10);
|
|||
|
||||
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
assign a3 = ~b3 ;
|
||||
`line 283 "t/t_preproc.v" 0
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
`line 285 "t/t_preproc.v" 0
|
||||
`line 334 "t/t_preproc.v" 0
|
||||
|
||||
/* multi \
|
||||
line1*/ \
|
||||
`line 287 "t/t_preproc.v" 0
|
||||
`line 336 "t/t_preproc.v" 0
|
||||
|
||||
/*multi \
|
||||
line2*/
|
||||
|
|
@ -465,59 +521,59 @@ $display("10 %d %d", $bits(foo), 10);
|
|||
|
||||
|
||||
|
||||
`line 294 "t/t_preproc.v" 0
|
||||
`line 343 "t/t_preproc.v" 0
|
||||
|
||||
`line 294 "t/t_preproc.v" 0
|
||||
`line 343 "t/t_preproc.v" 0
|
||||
|
||||
`line 294 "t/t_preproc.v" 0
|
||||
`line 343 "t/t_preproc.v" 0
|
||||
/* multi
|
||||
line 3*/
|
||||
`line 294 "t/t_preproc.v" 0
|
||||
`line 343 "t/t_preproc.v" 0
|
||||
def i
|
||||
|
||||
|
||||
`line 296 "t/t_preproc.v" 0
|
||||
`line 345 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
|
||||
`line 298 "t/t_preproc.v" 0
|
||||
`line 347 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`line 302 "t/t_preproc.v" 0
|
||||
`line 351 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`line 308 "t/t_preproc.v" 0
|
||||
`line 357 "t/t_preproc.v" 0
|
||||
1 // verilator NOT IN DEFINE (nodef)
|
||||
2 /* verilator PART OF DEFINE */ (hasdef)
|
||||
3
|
||||
`line 310 "t/t_preproc.v" 0
|
||||
`line 359 "t/t_preproc.v" 0
|
||||
/* verilator NOT PART
|
||||
OF DEFINE */ (nodef)
|
||||
`line 311 "t/t_preproc.v" 0
|
||||
`line 360 "t/t_preproc.v" 0
|
||||
4
|
||||
`line 311 "t/t_preproc.v" 0
|
||||
`line 360 "t/t_preproc.v" 0
|
||||
/* verilator PART
|
||||
OF DEFINE */ (nodef)
|
||||
`line 312 "t/t_preproc.v" 0
|
||||
`line 361 "t/t_preproc.v" 0
|
||||
5 also in
|
||||
`line 312 "t/t_preproc.v" 0
|
||||
`line 361 "t/t_preproc.v" 0
|
||||
also3 // CMT NOT (nodef)
|
||||
|
||||
|
||||
HAS a NEW
|
||||
`line 315 "t/t_preproc.v" 0
|
||||
`line 364 "t/t_preproc.v" 0
|
||||
LINE
|
||||
|
||||
`line 317 "t/t_preproc.v" 0
|
||||
`line 366 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
|
||||
`line 319 "t/t_preproc.v" 0
|
||||
`line 368 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -531,11 +587,11 @@ LINE
|
|||
|
||||
|
||||
|
||||
`line 332 "t/t_preproc.v" 0
|
||||
`line 381 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 335 "t/t_preproc.v" 0
|
||||
`line 384 "t/t_preproc.v" 0
|
||||
EXP: clxx_scen
|
||||
clxx_scen
|
||||
EXP: clxx_scen
|
||||
|
|
@ -543,44 +599,44 @@ EXP: clxx_scen
|
|||
|
||||
EXP: do if (start("verilog/inc1.v", 25)) begin message({"Blah-", "clx_scen", " end"}); end while(0);
|
||||
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
do
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
/* synopsys translate_off */
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
if (start("t/t_preproc.v", 341)) begin
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
if (start("t/t_preproc.v", 390)) begin
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
message({"Blah-", "clx_scen", " end"});
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
end
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
/* synopsys translate_on */
|
||||
`line 341 "t/t_preproc.v" 0
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
while(0);
|
||||
|
||||
`line 343 "t/t_preproc.v" 0
|
||||
`line 392 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
|
||||
`line 345 "t/t_preproc.v" 0
|
||||
`line 394 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`line 349 "t/t_preproc.v" 0
|
||||
`line 398 "t/t_preproc.v" 0
|
||||
|
||||
`line 349 "t/t_preproc.v" 0
|
||||
`line 398 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
`line 350 "t/t_preproc.v" 0
|
||||
`line 399 "t/t_preproc.v" 0
|
||||
|
||||
//`ifndef def_fooed_2 `error "No def_fooed_2" `endif
|
||||
EXP: This is fooed
|
||||
|
|
@ -588,7 +644,7 @@ This is fooed
|
|||
EXP: This is fooed_2
|
||||
This is fooed_2
|
||||
|
||||
`line 357 "t/t_preproc.v" 0
|
||||
`line 406 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
|
||||
np
|
||||
|
|
@ -600,11 +656,11 @@ np
|
|||
|
||||
|
||||
|
||||
`line 368 "t/t_preproc.v" 0
|
||||
`line 417 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
`line 371 "t/t_preproc.v" 0
|
||||
`line 420 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// Metaprogramming
|
||||
|
||||
|
|
@ -613,12 +669,12 @@ np
|
|||
|
||||
|
||||
|
||||
`line 379 "t/t_preproc.v" 0
|
||||
`line 428 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
`line 383 "t/t_preproc.v" 0
|
||||
`line 432 "t/t_preproc.v" 0
|
||||
hello3hello3hello3
|
||||
hello4hello4hello4hello4
|
||||
//======================================================================
|
||||
|
|
@ -626,7 +682,7 @@ hello4hello4hello4hello4
|
|||
|
||||
|
||||
|
||||
`line 389 "t/t_preproc.v" 0
|
||||
`line 438 "t/t_preproc.v" 0
|
||||
`line 1 "t/t_preproc_inc4.vh" 1
|
||||
// DESCRIPTION: Verilog::Preproc: Example source code
|
||||
`line 2 "t/t_preproc_inc4.vh" 0
|
||||
|
|
@ -638,9 +694,9 @@ hello4hello4hello4hello4
|
|||
|
||||
|
||||
`line 8 "t/t_preproc_inc4.vh" 2
|
||||
`line 389 "t/t_preproc.v" 0
|
||||
`line 438 "t/t_preproc.v" 0
|
||||
|
||||
`line 390 "t/t_preproc.v" 0
|
||||
`line 439 "t/t_preproc.v" 0
|
||||
|
||||
//======================================================================
|
||||
// Defines doing defines
|
||||
|
|
@ -650,28 +706,28 @@ hello4hello4hello4hello4
|
|||
|
||||
|
||||
|
||||
`line 398 "t/t_preproc.v" 0
|
||||
`line 447 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
Line_Preproc_Check 402
|
||||
Line_Preproc_Check 451
|
||||
//======================================================================
|
||||
// Quoted multiline - track line numbers, and ensure \\n gets propagated
|
||||
|
||||
|
||||
|
||||
Line_Preproc_Check 408
|
||||
Line_Preproc_Check 457
|
||||
"FOO \
|
||||
BAR " "arg_line1 \
|
||||
arg_line2" "FOO \
|
||||
BAR "
|
||||
`line 411 "t/t_preproc.v" 0
|
||||
Line_Preproc_Check 411
|
||||
`line 460 "t/t_preproc.v" 0
|
||||
Line_Preproc_Check 460
|
||||
//======================================================================
|
||||
// bug283
|
||||
|
||||
`line 415 "t/t_preproc.v" 0
|
||||
`line 464 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -682,14 +738,14 @@ abc
|
|||
|
||||
|
||||
|
||||
`line 425 "t/t_preproc.v" 0
|
||||
`line 474 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
EXP: sonet_frame
|
||||
sonet_frame
|
||||
|
||||
`line 431 "t/t_preproc.v" 0
|
||||
`line 480 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
EXP: sonet_frame
|
||||
|
|
@ -700,7 +756,7 @@ sonet_frame
|
|||
EXP: sonet_frame
|
||||
sonet_frame
|
||||
|
||||
`line 441 "t/t_preproc.v" 0
|
||||
`line 490 "t/t_preproc.v" 0
|
||||
// The existance of non-existance of a base define can make a difference
|
||||
|
||||
|
||||
|
|
@ -708,13 +764,13 @@ EXP: module zzz ; endmodule
|
|||
module zzz ; endmodule
|
||||
module zzz ; endmodule
|
||||
|
||||
`line 448 "t/t_preproc.v" 0
|
||||
`line 497 "t/t_preproc.v" 0
|
||||
|
||||
EXP: module a_b ; endmodule
|
||||
module a_b ; endmodule
|
||||
module a_b ; endmodule
|
||||
|
||||
`line 453 "t/t_preproc.v" 0
|
||||
`line 502 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// bug311
|
||||
integer/*NEED_SPACE*/ foo;
|
||||
|
|
@ -728,7 +784,7 @@ module t;
|
|||
|
||||
|
||||
initial begin : \`LEX_CAT(a[0],_assignment)
|
||||
`line 465 "t/t_preproc.v" 0
|
||||
`line 514 "t/t_preproc.v" 0
|
||||
$write("GOT%%m='%m' EXP='%s'\n", "t.\\`LEX_CAT(a[0],_assignment) "); end
|
||||
//-----
|
||||
// SHOULD(simulator-dependant): Backslash doesn't prevent arguments from
|
||||
|
|
@ -737,7 +793,7 @@ module t;
|
|||
|
||||
|
||||
initial begin : \a[0]_assignment_a[1]
|
||||
`line 472 "t/t_preproc.v" 0
|
||||
`line 521 "t/t_preproc.v" 0
|
||||
$write("GOT%%m='%m' EXP='%s'\n", "t.\\a[0]_assignment_a[1] "); end
|
||||
|
||||
//-----
|
||||
|
|
@ -753,7 +809,7 @@ module t;
|
|||
|
||||
// Similar to above; \ does not allow expansion after substitution
|
||||
initial begin : \`CAT(ff,bb)
|
||||
`line 486 "t/t_preproc.v" 0
|
||||
`line 535 "t/t_preproc.v" 0
|
||||
$write("GOT%%m='%m' EXP='%s'\n", "t.\\`CAT(ff,bb) "); end
|
||||
|
||||
//-----
|
||||
|
|
@ -761,7 +817,7 @@ module t;
|
|||
|
||||
// MUST: Unknown macro with backslash escape stays as escaped symbol name
|
||||
initial begin : \`zzz
|
||||
`line 492 "t/t_preproc.v" 0
|
||||
`line 541 "t/t_preproc.v" 0
|
||||
$write("GOT%%m='%m' EXP='%s'\n", "t.\\`zzz "); end
|
||||
|
||||
//-----
|
||||
|
|
@ -770,11 +826,11 @@ module t;
|
|||
|
||||
// SHOULD(simulator-dependant): Known macro with backslash escape expands
|
||||
initial begin : \`FOO
|
||||
`line 499 "t/t_preproc.v" 0
|
||||
`line 548 "t/t_preproc.v" 0
|
||||
$write("GOT%%m='%m' OTHER_EXP='%s'\n OUR_EXP='%s'", "t.bar ","t.\\`FOO "); end
|
||||
// SHOULD(simulator-dependant): Prefix breaks the above
|
||||
initial begin : \xx`FOO
|
||||
`line 501 "t/t_preproc.v" 0
|
||||
`line 550 "t/t_preproc.v" 0
|
||||
$write("GOT%%m='%m' EXP='%s'\n", "t.\\xx`FOO "); end
|
||||
|
||||
//-----
|
||||
|
|
@ -807,27 +863,27 @@ module t;
|
|||
|
||||
|
||||
initial
|
||||
`line 532 "t/t_preproc.v" 0
|
||||
`line 581 "t/t_preproc.v" 0
|
||||
$display("%s%s","a1","b2c3\n");
|
||||
endmodule
|
||||
|
||||
`line 535 "t/t_preproc.v" 0
|
||||
`line 584 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
//bug1225
|
||||
|
||||
`line 538 "t/t_preproc.v" 0
|
||||
`line 587 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
$display("RAM0");
|
||||
$display("CPU");
|
||||
|
||||
`line 543 "t/t_preproc.v" 0
|
||||
`line 592 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`line 548 "t/t_preproc.v" 0
|
||||
`line 597 "t/t_preproc.v" 0
|
||||
|
||||
XXE_FAMILY = XXE_
|
||||
|
||||
|
|
@ -835,7 +891,7 @@ XXE_FAMILY = XXE_
|
|||
$display("XXE_ is defined");
|
||||
|
||||
|
||||
`line 555 "t/t_preproc.v" 0
|
||||
`line 604 "t/t_preproc.v" 0
|
||||
|
||||
XYE_FAMILY = XYE_
|
||||
|
||||
|
|
@ -843,7 +899,7 @@ XYE_FAMILY = XYE_
|
|||
$display("XYE_ is defined");
|
||||
|
||||
|
||||
`line 562 "t/t_preproc.v" 0
|
||||
`line 611 "t/t_preproc.v" 0
|
||||
|
||||
XXS_FAMILY = XXS_some
|
||||
|
||||
|
|
@ -851,7 +907,7 @@ XXS_FAMILY = XXS_some
|
|||
$display("XXS_some is defined");
|
||||
|
||||
|
||||
`line 569 "t/t_preproc.v" 0
|
||||
`line 618 "t/t_preproc.v" 0
|
||||
|
||||
XYS_FAMILY = XYS_foo
|
||||
|
||||
|
|
@ -859,10 +915,10 @@ XYS_FAMILY = XYS_foo
|
|||
$display("XYS_foo is defined");
|
||||
|
||||
|
||||
`line 576 "t/t_preproc.v" 0
|
||||
`line 625 "t/t_preproc.v" 0
|
||||
//====
|
||||
|
||||
`line 578 "t/t_preproc.v" 0
|
||||
`line 627 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -871,7 +927,7 @@ XYS_FAMILY = XYS_foo
|
|||
|
||||
|
||||
|
||||
`line 586 "t/t_preproc.v" 0
|
||||
`line 635 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -879,7 +935,7 @@ XYS_FAMILY = XYS_foo
|
|||
|
||||
|
||||
|
||||
`line 593 "t/t_preproc.v" 0
|
||||
`line 642 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -887,7 +943,7 @@ XYS_FAMILY = XYS_foo
|
|||
|
||||
|
||||
|
||||
`line 600 "t/t_preproc.v" 0
|
||||
`line 649 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -895,26 +951,26 @@ XYS_FAMILY = XYS_foo
|
|||
|
||||
|
||||
|
||||
`line 607 "t/t_preproc.v" 0
|
||||
`line 656 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
`line 609 "t/t_preproc.v" 0
|
||||
`line 658 "t/t_preproc.v" 0
|
||||
// NEVER
|
||||
|
||||
`line 611 "t/t_preproc.v" 0
|
||||
`line 660 "t/t_preproc.v" 0
|
||||
//bug1227
|
||||
|
||||
(.mySig (myInterface.pa5),
|
||||
|
||||
`line 615 "t/t_preproc.v" 0
|
||||
`line 664 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// Stringify bug
|
||||
|
||||
`line 618 "t/t_preproc.v" 0
|
||||
`line 667 "t/t_preproc.v" 0
|
||||
|
||||
`dbg_hdl(UVM_LOW, ("Functional coverage enabled: paramgrp"));
|
||||
|
||||
`line 621 "t/t_preproc.v" 0
|
||||
`line 670 "t/t_preproc.v" 0
|
||||
|
||||
|
||||
|
||||
|
|
@ -923,28 +979,28 @@ XYS_FAMILY = XYS_foo
|
|||
|
||||
|
||||
|
||||
`line 629 "t/t_preproc.v" 0
|
||||
`line 678 "t/t_preproc.v" 0
|
||||
module pcc2_cfg;
|
||||
generate
|
||||
|
||||
`line 631 "t/t_preproc.v" 0
|
||||
`line 680 "t/t_preproc.v" 0
|
||||
covergroup a @(posedge b);
|
||||
`line 631 "t/t_preproc.v" 0
|
||||
`line 680 "t/t_preproc.v" 0
|
||||
c: coverpoint d iff ((c) === 1'b1); endgroup
|
||||
`line 631 "t/t_preproc.v" 0
|
||||
`line 680 "t/t_preproc.v" 0
|
||||
a u_a;
|
||||
`line 631 "t/t_preproc.v" 0
|
||||
`line 680 "t/t_preproc.v" 0
|
||||
initial do begin $display ("DEBUG : %s [%m]", $sformatf ("Functional coverage enabled: u_a")); end while(0);
|
||||
endgenerate
|
||||
endmodule
|
||||
|
||||
`line 635 "t/t_preproc.v" 0
|
||||
`line 684 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// Verilog-Perl bug1668
|
||||
|
||||
"`NOT_DEFINED_STR"
|
||||
|
||||
`line 640 "t/t_preproc.v" 0
|
||||
`line 689 "t/t_preproc.v" 0
|
||||
//======================================================================
|
||||
// IEEE mandated predefines
|
||||
// undefineall should have no effect on these
|
||||
|
|
@ -967,4 +1023,4 @@ predef 2 2
|
|||
// After `undefineall above, for testing --dump-defines
|
||||
|
||||
|
||||
`line 662 "t/t_preproc.v" 2
|
||||
`line 711 "t/t_preproc.v" 2
|
||||
|
|
|
|||
Loading…
Reference in New Issue