forked from github/verilator
Fix rounding in trace , bug946.
This commit is contained in:
parent
06d5a7b2bf
commit
1891cfd79a
2
Changes
2
Changes
@ -13,6 +13,8 @@ indicates the contributor was also the author of the fix; Thanks!
|
||||
|
||||
**** Fix dpi imports inside generates. [Michael Tresidder]
|
||||
|
||||
**** Fix rounding in trace $timescale, bug946. [Frederic Requin]
|
||||
|
||||
|
||||
* Verilator 3.874 2015-06-06
|
||||
|
||||
|
@ -378,7 +378,7 @@ string VerilatedVcd::doubleToTimescale (double value) {
|
||||
else if (value>=1e-12) { suffixp="ps"; value *= 1e12; }
|
||||
else if (value>=1e-15) { suffixp="fs"; value *= 1e15; }
|
||||
else if (value>=1e-18) { suffixp="as"; value *= 1e18; }
|
||||
char valuestr[100]; sprintf(valuestr,"%d%s",(int)(value), suffixp);
|
||||
char valuestr[100]; sprintf(valuestr,"%3.0f%s", value, suffixp);
|
||||
return valuestr; // Gets converted to string, so no ref to stack
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user