Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

time_format.patch

__vl_vsformat patch - Julien Margetts, 05/21/2019 02:13 PM

Download (1.47 KB)

View differences:

include/verilated.cpp
649 649
                if (lbits) {}  // UNUSED - always 64
650 650
                switch (fmt) {
651 651
                case '^': {  // Realtime
652
                    int digits = sprintf(tmp, "%g", d/VL_TIME_MULTIPLIER);
652
                    int digits = sprintf(tmp, "%gns", d/VL_TIME_MULTIPLIER);
653 653
                    int needmore = width-digits;
654 654
                    if (needmore>0) output.append(needmore, ' ');  // Pre-pad spaces
655 655
                    output += tmp;
......
747 747
                case 't': {  // Time
748 748
                    int digits;
749 749
                    if (VL_TIME_MULTIPLIER==1) {
750
                        digits=sprintf(tmp, "%" VL_PRI64 "u", ld);
750
                        digits=sprintf(tmp, "%" VL_PRI64 "uns", ld);
751 751
                    } else if (VL_TIME_MULTIPLIER==1000) {
752
                        digits=sprintf(tmp, "%" VL_PRI64 "u.%03" VL_PRI64 "u",
752
                        digits=sprintf(tmp, "%" VL_PRI64 "u.%03" VL_PRI64 "uus",
753 753
                                       static_cast<QData>(ld/VL_TIME_MULTIPLIER),
754 754
                                       static_cast<QData>(ld%VL_TIME_MULTIPLIER));
755 755
                    } else {