mirror of
https://github.com/verilator/verilator.git
synced 2025-04-16 01:26:54 +00:00
Fix $display with uppercase %M.
This commit is contained in:
parent
b19dd49fc9
commit
0b24e62d43
4
Changes
4
Changes
@ -7,7 +7,9 @@ indicates the contributor was also the author of the fix; Thanks!
|
||||
|
||||
*** Improved warning when "do" used as identifier.
|
||||
|
||||
**** Fix tracing escaped dotted identifiers.
|
||||
**** Fix tracing escaped dotted identifiers, bug107.
|
||||
|
||||
**** Fix $display with uppercase %M.
|
||||
|
||||
* Verilator 3.713 2009/08/04
|
||||
|
||||
|
@ -65,7 +65,9 @@ private:
|
||||
AstNode* timesp = nodep->exprsp(); if (timesp) timesp->unlinkFrBack();
|
||||
timesp = timesp->addNext(new AstTime(nodep->fileline()));
|
||||
nodep->exprsp(timesp);
|
||||
if (!nodep->scopeNamep() && nodep->name().find("%m") != string::npos) {
|
||||
if (!nodep->scopeNamep()
|
||||
&& (nodep->name().find("%m") != string::npos
|
||||
|| nodep->name().find("%M") != string::npos)) {
|
||||
nodep->scopeNamep(new AstScopeName(nodep->fileline()));
|
||||
}
|
||||
}
|
||||
|
@ -361,7 +361,7 @@ private:
|
||||
inPct = true;
|
||||
} else if (inPct) {
|
||||
inPct = false;
|
||||
switch (ch) {
|
||||
switch (tolower(ch)) {
|
||||
case '0': case '1': case '2': case '3': case '4':
|
||||
case '5': case '6': case '7': case '8': case '9':
|
||||
inPct = true;
|
||||
@ -441,7 +441,8 @@ private:
|
||||
nodep->v3error(nodep->verilogKwd()+" only allowed under a assertion.");
|
||||
}
|
||||
if (nodep->displayType().needScopeTracking()
|
||||
|| nodep->name().find("%m") != string::npos) {
|
||||
|| nodep->name().find("%m") != string::npos
|
||||
|| nodep->name().find("%M") != string::npos) {
|
||||
nodep->scopeNamep(new AstScopeName(nodep->fileline()));
|
||||
}
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ private:
|
||||
if (!inPct && ch=='%') {
|
||||
inPct = true;
|
||||
} else if (inPct && isdigit(ch)) {
|
||||
} else if (inPct) {
|
||||
} else if (tolower(inPct)) {
|
||||
inPct = false;
|
||||
switch (tolower(ch)) {
|
||||
case '%': break; // %% - just output a %
|
||||
|
@ -52,7 +52,7 @@ module sub;
|
||||
begin
|
||||
$write("[%0t] In %m\n", $time);
|
||||
begin : subblock
|
||||
$write("[%0t] In %m\n", $time);
|
||||
$write("[%0t] In %M\n", $time); // Uppercase %M test
|
||||
end
|
||||
end
|
||||
endtask
|
||||
|
Loading…
Reference in New Issue
Block a user