forked from github/verilator
Fix %0 format on $value$plusargs.
This commit is contained in:
parent
d2a8fa7440
commit
0abc856be9
1
Changes
1
Changes
@ -23,6 +23,7 @@ Verilator 4.215 devel
|
||||
* Fix split_var assign merging (#3177) (#3179). [Yutetsu TAKATSUKASA]
|
||||
* Fix nested generate if genblk naming (#3189). [yanx21]
|
||||
* Fix display of empty string constant (#3207). [Julie Schwartz]
|
||||
* Fix %0 format on $value$plusargs.
|
||||
|
||||
|
||||
Verilator 4.214 2021-10-17
|
||||
|
@ -1600,6 +1600,7 @@ IData VL_VALUEPLUSARGS_INW(int rbits, const std::string& ld, WDataOutP rwp) VL_M
|
||||
inPct = true;
|
||||
} else if (!inPct) { // Normal text
|
||||
prefix += *posp;
|
||||
} else if (inPct && posp[0] == '0') { // %0
|
||||
} else { // Format character
|
||||
switch (std::tolower(*posp)) {
|
||||
case '%':
|
||||
|
@ -23,11 +23,16 @@ module t;
|
||||
if ($test$plusargs("NOTTHERE")!==0) $stop;
|
||||
|
||||
p_i = 10;
|
||||
if ($value$plusargs("NOTTHERE%d", p_i)!==0) $stop;
|
||||
if ($value$plusargs("NOTTHERE%d", p_i) !== 0) $stop;
|
||||
if ($value$plusargs("NOTTHERE%0d", p_i) !== 0) $stop;
|
||||
if (p_i !== 10) $stop;
|
||||
|
||||
p_i = 0;
|
||||
if ($value$plusargs("INT=%d", p_i)!==1) $stop;
|
||||
if ($value$plusargs("INT=%d", p_i) !== 1) $stop;
|
||||
if (p_i !== 32'd1234) $stop;
|
||||
|
||||
p_i = 0;
|
||||
if ($value$plusargs("INT=%0d", p_i) !== 1) $stop;
|
||||
if (p_i !== 32'd1234) $stop;
|
||||
|
||||
p_i = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user