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
Geza Lore
05f213c266
VCD tracing speed improvements ( #2246 )
...
* Don't inline VCD dump functions
Improves model speed with tracing. Measured on SweRW cmark:
- GCC 5.5 ~3% faster
- Clang 6.0 ~12% faster (!)
* Remove redundant test from VCD bit tracing.
Improves model speed with tracing. Measured on SweRW cmark:
- GCC 5.5 ~7.5% faster
- Clang 6.0 ~1.5% faster
2020-04-09 08:19:26 -04:00
Wilson Snyder
e07e9390f6
Internals: clang-format cleanups. No functional change.
2020-04-04 14:09:21 -04:00
Wilson Snyder
1ce360ed5b
Add SPDX license identifiers. No functional change.
2020-03-21 11:24:24 -04:00
Wilson Snyder
905067d13f
Fix $dumpvar multithreaded assert, broke last commit.
2020-03-02 07:43:10 -05:00
Wilson Snyder
30a33a6104
Add support for and , #2126 .
2020-03-01 21:39:23 -05:00
Wilson Snyder
9978cbfa5c
Fix tracing -1 index arrays. Closes #2090 .
2020-01-08 07:32:31 -05:00
Wilson Snyder
f23fe8fd84
Update copyright year.
2020-01-06 18:05:53 -05:00
Wilson Snyder
5c361efaea
Internals: Minor format cleanups. No functional change.
2019-12-22 18:09:46 -05:00
Wilson Snyder
35e9489f33
Includes: Allow VCD trace of 64 bit array.
2019-12-05 22:25:30 -05:00
Wilson Snyder
f87107e757
Tests etc: Cleanup some clang-format suggestions. No functional change.
2019-11-09 20:35:12 -05:00
Wilson Snyder
6ffbb7cabf
Internals: Remove extra semicolons. No functional change.
2019-06-11 18:31:06 -04:00
Wilson Snyder
96c70ea2df
Internals: Fix some long lines in include files. No functional change.
...
When merging, recommend using "git merge -Xignore-all-space"
2019-05-14 22:49:32 -04:00
Wilson Snyder
a2a7021914
Reorder VCD codes for better viewer packing.
2019-05-06 18:55:38 -04:00
Wilson Snyder
8a4aeddbb0
Copyright year update.
2019-01-03 19:17:22 -05:00
Wilson Snyder
8170391573
Internals: Fix spacing of comments. No functional change.
2018-11-28 19:59:10 -05:00
Wilson Snyder
304a24d03a
Internals: Fix many clang-tidy issues. No functional change intended.
2018-10-14 18:39:33 -04:00
Wilson Snyder
d87b9d25ca
Internals: Cleanup and standardize include order. No functional change intended.
2018-10-14 13:59:40 -04:00
Wilson Snyder
8f838433df
Internals: Fix spacing and style of v4 changes. No functional change.
2018-08-23 05:22:34 -04:00
Wilson Snyder
0b84222500
Includes: Fix spacing and style in prep for new LXT2. No functional change.
2018-08-22 19:14:06 -04:00
Wilson Snyder
8e65d93d6d
Copyright year update. No functional change.
2018-01-02 18:05:06 -05:00
Wilson Snyder
add5cc8b56
Internals: Add VL_UNCOPYABLE to make classes uncopyable. No functional change intended.
2017-11-01 18:51:41 -04:00
Wilson Snyder
f91bac7b31
Rewrite include libraries to support VL_THREADED towards future threading
2017-10-26 21:51:51 -04:00
Wilson Snyder
ad693d67b2
Mark Verilated functions with multithreaded status. No functional change.
2017-10-26 20:05:42 -04:00
Wilson Snyder
c17c81254e
Internals: Use = delete via a macro for a bit of C++11 forward compatibility
2017-10-25 20:00:38 -04:00
Wilson Snyder
32874fa848
Internals: Misc VCD code cleanups. No functional change.
2017-10-21 17:53:23 -04:00
Wilson Snyder
d21824cbae
Internals: Refactor verilated_vcd to move singleton into only .cpp. No functional change intended.
2017-10-14 13:00:25 -04:00
Wilson Snyder
0ac116bb4e
Internals: Favor C++ cast style. No functional change intended.
2017-10-07 15:01:19 -04:00
Wilson Snyder
89ac6ab594
Fix memory leak in VerilatedVcd dumps, bug1222 partial.
2017-10-02 18:49:00 -04:00
Wilson Snyder
3f14e649b5
Internals: Use singleton in place of global
2017-09-23 07:44:52 -04:00
Wilson Snyder
c2e8062f84
Verilated headers no longer "use namespace std;"
2017-09-23 07:32:37 -04:00
Wilson Snyder
70daadf987
Fix cpp-check warnings; support XML format 2
2017-07-06 20:25:59 -04:00
Wilson Snyder
6c87724af8
Support set_time_unit/set_time_precision in C traces, msg2261.
2017-06-20 19:33:58 -04:00
Wilson Snyder
e6d7e7e329
Version bump
2017-01-15 12:13:13 -05:00
Wilson Snyder
b738d1960a
Copyright year update
2016-01-06 20:36:41 -05:00
Wilson Snyder
318ded4198
Internals: Cleanup cppcheck warnings.
2015-10-03 22:33:06 -04:00
Wilson Snyder
c0df07c86f
Commentary: Update contributor list
2015-03-13 07:38:17 -04:00
Wilson Snyder
005b4b7609
Updated - add VerilatedVcdFile to allow real-time waveforms, bug890.
2015-03-05 20:21:48 -05:00
Wilson Snyder
a0fd065dcf
Add VerilatedVcdFile to allow real-time waveforms, bug890.
2015-03-05 08:54:57 -05:00
Wilson Snyder
8323092a0c
Fix cppcheck warnings. No functional change.
2015-02-09 21:05:27 -05:00
Wilson Snyder
4c91ade61d
Copyright year update
2015-01-07 18:25:53 -05:00
Wilson Snyder
d33ad7600b
Commentary. Cleanup stale SystemPerl references.
2014-11-23 22:00:00 -05:00
Wilson Snyder
3234fa15ef
Fix trace overflow on huge arrays, bug834.
2014-11-05 22:22:27 -05:00
Wilson Snyder
4422de0c6c
Copyright year update.
2014-01-06 19:28:57 -05:00
Wilson Snyder
e6808a787c
Fix opening a VerilatedVcdC file multiple times, msg1021.
2013-02-23 21:10:25 -05:00
Wilson Snyder
a8bbf7231b
Copyright year update.
2013-01-01 09:42:59 -05:00
Wilson Snyder
50edef4ab2
Add Emacs indentation line. No functional change
2012-04-12 21:08:20 -04:00
Wilson Snyder
c2c7c7bd9a
Copyright year update
2012-01-15 10:26:28 -05:00
Wilson Snyder
df1da3dda9
Internals: Fix cppcheck warnings; no functional change intended
2011-08-04 21:58:45 -04:00
Wilson Snyder
c83f2a4abd
Internals: Fix preincrements to reduce cppcheck warnings
2011-08-04 21:15:24 -04:00
Wilson Snyder
71c1f00ec2
Copyright year update
2011-01-01 18:21:19 -05:00
Wilson Snyder
495585830d
Fix trace files with empty modules crashing some viewers.
2010-03-22 18:38:24 -04:00
Wilson Snyder
e40fbf1470
Verilated: Add missing VL_UNLIKELYs
2010-02-03 06:56:20 -05:00
Wilson Snyder
53fda88d4c
VCD_VERSION is unused
2010-02-01 21:41:47 -05:00
Wilson Snyder
11e702c430
SystemPerl is no longer required for tracing.
...
Applications must use VerilatedVcdC class in place of SpTraceVcdC.
2010-01-24 18:37:01 -05:00