verilator/include
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
..
gtkwave Update gtkwave from upstream. 2020-03-21 21:45:57 -04:00
vltstd Support IEEE 1800-2017 as default language. 2018-03-12 22:26:34 -04:00
.gitignore
verilated_config.h.in Add SPDX license identifiers. No functional change. 2020-03-21 11:24:24 -04:00
verilated_cov_key.h Add SPDX license identifiers. No functional change. 2020-03-21 11:24:24 -04:00
verilated_cov.cpp Cleanup misc clang-tidy warnings. No functional change intended 2020-04-03 22:31:54 -04:00
verilated_cov.h Cleanup misc clang-tidy warnings. No functional change intended 2020-04-03 22:31:54 -04:00
verilated_dpi.cpp Modernize va args (#2214) 2020-03-29 10:29:12 -04:00
verilated_dpi.h Fix DPI import/export to be standard compliant, #2236. 2020-04-07 19:07:47 -04:00
verilated_fst_c.cpp Improve tracing performance. (#2257) 2020-04-14 00:13:10 +01:00
verilated_fst_c.h Improve tracing performance. (#2257) 2020-04-14 00:13:10 +01:00
verilated_heavy.h Internals: cppcheck 1.90 fixes. No functional change intended. 2020-04-05 18:57:47 -04:00
verilated_imp.h Add SPDX license identifiers. No functional change. 2020-03-21 11:24:24 -04:00
verilated_save.cpp Internals: clang-format cleanups. No functional change. 2020-04-04 14:09:21 -04:00
verilated_save.h Internals: clang-format cleanups. No functional change. 2020-04-04 14:09:21 -04:00
verilated_sc.h Add SPDX license identifiers. No functional change. 2020-03-21 11:24:24 -04:00
verilated_sym_props.h Internals: clang-format cleanups. No functional change. 2020-04-04 14:09:21 -04:00
verilated_syms.h Add SPDX license identifiers. No functional change. 2020-03-21 11:24:24 -04:00
verilated_threads.cpp Internals: cppcheck 1.90 fixes. No functional change intended. 2020-04-05 18:57:47 -04:00
verilated_threads.h Internals: clang-format cleanups. No functional change. 2020-04-04 14:09:21 -04:00
verilated_unordered_set_map.h Cleanup misc clang-tidy warnings. No functional change intended 2020-04-03 22:31:54 -04:00
verilated_vcd_c.cpp Improve tracing performance. (#2257) 2020-04-14 00:13:10 +01:00
verilated_vcd_c.h Improve tracing performance. (#2257) 2020-04-14 00:13:10 +01:00
verilated_vcd_sc.cpp Add SPDX license identifiers. No functional change. 2020-03-21 11:24:24 -04:00
verilated_vcd_sc.h Add SPDX license identifiers. No functional change. 2020-03-21 11:24:24 -04:00
verilated_vpi.cpp Internals: cppcheck 1.90 fixes. No functional change intended. 2020-04-05 18:57:47 -04:00
verilated_vpi.h Expose VPI cbNextDeadline via the public API (#2212) 2020-03-28 13:47:21 -04:00
verilated.cpp Fix clang warning. 2020-04-06 20:13:24 -04:00
verilated.h Always define VL_SIG etc; conditional definitions were long removed SystemPerl. 2020-04-13 19:07:56 -04:00
verilated.mk.in Compile fast tracing code with OPT_FAST in single compile mode. (#2245) 2020-04-08 21:05:43 -04:00
verilated.v Add SPDX license identifiers. No functional change. 2020-03-21 11:24:24 -04:00
verilatedos.h Deprecate VL_ULL. 2020-04-05 16:45:53 -04:00