Commit Graph

13 Commits

Author SHA1 Message Date
Graham Rushton
6660627558
Fix concat of long hashed names in traces etc (#2854) 2021-04-20 09:08:29 -04:00
Wilson Snyder
70b3a599ce Fix trace signal names getting hashed (#2643). 2020-11-16 18:11:27 -05:00
Geza Lore
6a54922044
Set FST timescale correctly. (#2266)
The FST trace timescale used to be set in the constructor via
set_time_unit, but at that point we haven't normally opened the
file yet so it was just dropped. On top of that, we actually want
to use set_time_resolution... FST trace timescales now match the VCD.
2020-04-19 08:47:22 -04:00
Geza Lore
dc5c259069
Improve tracing performance. (#2257)
* Improve tracing performance.

Various tactics used to improve performance of both VCD and FST tracing:
- Both: Change tracing functions to templates to take variable widths as
  template parameters. For VCD, subsequently specialize these to the
  values used by Verilator. This avoids redundant instructions and hard
  to predict branches.
- Both: Check for value changes via direct pointer access into the
  previous signal value buffer. This eliminates a lot of simple pointer
  arithmetic instructions form the tracing code.
- Both: Verilator provides clean input, no need to mask out used bits.
- VCD: pre-compute identifier codes and use memory copy instead of
  re-computing them every time a code is emitted. This saves a lot of
  instructions and hard to predict branches. The added D-cache misses
  are cheaper than the removed branches/instructions.
- VCD: re-write the routines emitting the changes to be more efficient.
- FST: Use previous signal value buffer the same way as the VCD tracing
  code, and only call the FST API when a change is detected.

Performance as measured on SweRV EH1, with the pre-canned CoreMark
benchmark running from DCCM/ICCM, clang 6.0.0, Intel i7-3770 @ 3.40GHz,
and IO to ramdisk:

            +--------------+---------------+----------------------+
            | VCD          | FST           | FST separate thread  |
            | (--trace)    | (--trace-fst) | (--trace-fst-thread) |
------------+-----------------------------------------------------+
Before      |  30.2 s      | 121.1 s       |  69.8 s              |
============+==============+===============+======================+
After       |  24.7 s      |  45.7 s       |  32.4 s              |
------------+--------------+---------------+----------------------+
Speedup     |    22 %      |   256 %       |   215 %              |
------------+--------------+---------------+----------------------+
Rel. to VCD |     1 x      |  1.85 x       |  1.31 x              |
------------+--------------+---------------+----------------------+

In addition, FST trace size for the above reduced by 48%.
2020-04-14 00:13:10 +01:00
Wilson Snyder
8f0e8e0696 Fix FST tracing of enums inside structs. 2020-01-24 19:46:46 -05:00
Wilson Snyder
9978cbfa5c Fix tracing -1 index arrays. Closes #2090. 2020-01-08 07:32:31 -05:00
Wilson Snyder
3acb85a005 Fix FST enums not displaying, bug1426. 2019-05-01 19:18:45 -04:00
Wilson Snyder
b8098098d8 Internals: Refactor input/output to new class in prep for ref support. 2018-10-27 17:29:00 -04:00
Wilson Snyder
cc45a3dd72 For --trace-fst, save enum decoding information, bug1358. 2018-10-08 07:21:22 -04:00
Wilson Snyder
870918a788 Tests: Dump and test FST trace attributes. 2018-10-07 22:04:49 -04:00
Wilson Snyder
98b0d19363 Tests: Add enum to trace test. 2018-10-05 18:38:52 -04:00
Wilson Snyder
d11592cadd Support signal types in FST dumps, bug1358. 2018-10-04 20:24:41 -04:00
Sergi Granell
a5aa0e2b0a Add GTKWave FST native tracing, bug1356.
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2018-10-02 18:42:53 -04:00