Allow disabling BLKLOOPINIT (Intentionally undocumented)

This commit is contained in:
Wilson Snyder 2017-10-01 23:23:02 -04:00
parent 82460b0da3
commit c98ad79e68
2 changed files with 5 additions and 4 deletions

View File

@ -370,7 +370,7 @@ private:
&& nodep->lhsp()->castSel()->fromp()->castArraySel())) { && nodep->lhsp()->castSel()->fromp()->castArraySel())) {
AstNode* lhsp = nodep->lhsp()->unlinkFrBack(); AstNode* lhsp = nodep->lhsp()->unlinkFrBack();
AstNode* newlhsp = createDlyArray(nodep, lhsp); AstNode* newlhsp = createDlyArray(nodep, lhsp);
if (m_inLoop) nodep->v3warn(E_BLKLOOPINIT,"Unsupported: Delayed assignment to array inside for loops (non-delayed is ok - see docs)"); if (m_inLoop) nodep->v3warn(BLKLOOPINIT,"Unsupported: Delayed assignment to array inside for loops (non-delayed is ok - see docs)");
if (newlhsp) { if (newlhsp) {
nodep->lhsp(newlhsp); nodep->lhsp(newlhsp);
} else { } else {

View File

@ -48,7 +48,6 @@ public:
I_LINT, // All lint messages I_LINT, // All lint messages
I_DEF_NETTYPE_WIRE, // `default_nettype is WIRE (false=NONE) I_DEF_NETTYPE_WIRE, // `default_nettype is WIRE (false=NONE)
// Error codes: // Error codes:
E_BLKLOOPINIT, // Error: Delayed assignment to array inside for loops
E_DETECTARRAY, // Error: Unsupported: Can't detect changes on arrayed variable E_DETECTARRAY, // Error: Unsupported: Can't detect changes on arrayed variable
E_MULTITOP, // Error: Multiple top level modules E_MULTITOP, // Error: Multiple top level modules
E_TASKNSVAR, // Error: Task I/O not simple E_TASKNSVAR, // Error: Task I/O not simple
@ -60,6 +59,7 @@ public:
ASSIGNDLY, // Assignment delays ASSIGNDLY, // Assignment delays
ASSIGNIN, // Assigning to input ASSIGNIN, // Assigning to input
BLKANDNBLK, // Blocked and non-blocking assignments to same variable BLKANDNBLK, // Blocked and non-blocking assignments to same variable
BLKLOOPINIT, // Delayed assignment to array inside for loops
BLKSEQ, // Blocking assignments in sequential block BLKSEQ, // Blocking assignments in sequential block
CASEINCOMPLETE, // Case statement has missing values CASEINCOMPLETE, // Case statement has missing values
CASEOVERLAP, // Case statements overlap CASEOVERLAP, // Case statements overlap
@ -121,11 +121,11 @@ public:
// Boolean // Boolean
" I_COVERAGE", " I_TRACING", " I_LINT", " I_DEF_NETTYPE_WIRE", " I_COVERAGE", " I_TRACING", " I_LINT", " I_DEF_NETTYPE_WIRE",
// Errors // Errors
"BLKLOOPINIT", "DETECTARRAY", "MULTITOP", "TASKNSVAR", "DETECTARRAY", "MULTITOP", "TASKNSVAR",
// Warnings // Warnings
" EC_FIRST_WARN", " EC_FIRST_WARN",
"ALWCOMBORDER", "ASSIGNDLY", "ASSIGNIN", "ALWCOMBORDER", "ASSIGNDLY", "ASSIGNIN",
"BLKANDNBLK", "BLKSEQ", "BLKANDNBLK", "BLKLOOPINIT", "BLKSEQ",
"CASEINCOMPLETE", "CASEOVERLAP", "CASEWITHX", "CASEX", "CDCRSTLOGIC", "CLKDATA", "CASEINCOMPLETE", "CASEOVERLAP", "CASEWITHX", "CASEX", "CDCRSTLOGIC", "CLKDATA",
"CMPCONST", "COMBDLY", "DEFPARAM", "DECLFILENAME", "CMPCONST", "COMBDLY", "DEFPARAM", "DECLFILENAME",
"ENDLABEL", "GENCLK", "ENDLABEL", "GENCLK",
@ -150,6 +150,7 @@ public:
// Warnings we'll present to the user as errors // Warnings we'll present to the user as errors
// Later -Werror- options may make more of these. // Later -Werror- options may make more of these.
bool pretendError() const { return ( m_e==ASSIGNIN || m_e==BLKANDNBLK bool pretendError() const { return ( m_e==ASSIGNIN || m_e==BLKANDNBLK
|| m_e==BLKLOOPINIT
|| m_e==IMPURE || m_e==MODDUP); } || m_e==IMPURE || m_e==MODDUP); }
// Warnings to mention manual // Warnings to mention manual
bool mentionManual() const { return ( m_e==EC_FATALSRC || m_e==SYMRSVDWORD bool mentionManual() const { return ( m_e==EC_FATALSRC || m_e==SYMRSVDWORD