Commit Graph

1584 Commits

Author SHA1 Message Date
Geza Lore
74e16d85c5
Fix FST trace initial time stamp. (#2264)
If the first dump was not at time zero, then the FST trace used
to contain the initial values as if they were set at time zero. Now
they only appear at the time the first dump call is actually made,
and hence match the VCD trace exactly.
2020-04-18 18:54:02 -04:00
Wilson Snyder
39d7cbf412 Fix arrayed instances connecting to slices, #2263. 2020-04-17 19:30:53 -04:00
Wilson Snyder
8f7e463656 Tests: Fix makeflag test, was failing older makes. 2020-04-16 17:31:41 -04:00
Wilson Snyder
d4f7f5297a
Support IEEE time units and time precisions, #234. (#2253)
Includes `timescale, $printtimescale, $timeformat.
VL_TIME_MULTIPLIER, VL_TIME_PRECISION, VL_TIME_UNIT have been removed
and the time precision must now match the SystemC time precision.
To get closer behavior to older versions, use e.g. --timescale-override
"1ps/1ps".
2020-04-15 19:39:03 -04:00
Wilson Snyder
58091edd68 Tests: Fix cmake -j unknown 2020-04-15 18:08:31 -04:00
Yutetsu TAKATSUKASA
18412f9322
Add --build option to call make/cmake as subprocess (#2249)
* Add --build, -j, -MAKEFLAGS, and --no-verilate options
* Verilator: Can build on both gmake and cmake
2020-04-15 17:44:21 -04:00
Geza Lore
1a64c7d232
Fix run-time formatting of variable wider than 1023 bits (#2261) 2020-04-15 17:26:15 -04:00
Geza Lore
08b74e5ab9
Fix crash when formatting constant wider than 1023 bits (#2260) 2020-04-14 18:07:09 -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
dba88bae3c Support class new. 2020-04-12 18:57:12 -04:00
Wilson Snyder
ea3acc2d3a Fix --skip-identical broke recent commit. 2020-04-11 20:22:57 -04:00
Wilson Snyder
8e6674066f Tests: Clean before rerunning failing test. 2020-04-11 11:40:15 -04:00
Wilson Snyder
15b40a97d9 Support `unconnected_drive 2020-04-09 23:26:03 -04:00
Wilson Snyder
608d5a87d1 tests: Avoid assuming a timescale. 2020-04-07 20:55:47 -04:00
Geza Lore
0cfa828572 Fix DPI import/export to be standard compliant, #2236. 2020-04-07 19:07:47 -04:00
Wilson Snyder
b6c21ad21a Fix duplicate traces with $dumpfile, part of #2237. 2020-04-06 08:33:51 -04:00
Wilson Snyder
26301a4133 Commentary 2020-04-06 08:19:32 -04:00
Wilson Snyder
383f9832d4 Tests: Standardize verilog indentation. 2020-04-05 21:53:24 -04:00
Wilson Snyder
a331397954 Fix real conversion from constant with X/Z. 2020-04-05 11:56:15 -04:00
Wilson Snyder
a494ad5ec7 Support $ferror, #1638. 2020-04-05 11:22:05 -04:00
Wilson Snyder
e55338f927 Support $fflush without arguments, #1638. 2020-04-05 10:11:28 -04:00
Wilson Snyder
6eadb8e771 Add simplistic class support with many restrictions, see manual, #377. 2020-04-05 09:30:23 -04:00
Wilson Snyder
bf17bb4648 Fix codacity warnings 2020-04-04 20:08:58 -04:00
Wilson Snyder
c288a7bfb9 Add GCC10-style line number prefix when showing source text for errors. 2020-04-03 20:07:46 -04:00
Marco Widmer
7f9aa057bf
Support split_var in vit files (#2219) 2020-04-03 08:08:23 -04:00
Wilson Snyder
dcde026bac With --Wpedantic, report forward typedefs that are unused. 2020-04-02 07:39:14 -04:00
Wilson Snyder
926209706f Report REALCVT on $display format mistakes. 2020-04-01 20:42:47 -04:00
Wilson Snyder
19abce5535 Suppress REALCVT for whole real numbers. 2020-04-01 18:43:53 -04:00
Wilson Snyder
e6beab4037 Fix implicit conversion of floats to wide integers. 2020-03-31 20:42:07 -04:00
Wilson Snyder
ebeb645539 Commentary 2020-03-30 20:09:55 -04:00
Wilson Snyder
5c72f01598 Fix assertions with unique case inside, #2199. 2020-03-30 18:13:51 -04:00
Matthew Ballance
510be53521
Expose VPI cbNextDeadline via the public API (#2212)
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
2020-03-28 13:47:21 -04:00
Wilson Snyder
4145a38c47 Fix duplicate typedefs in generate for, #2205. 2020-03-26 18:10:20 -04:00
Wilson Snyder
590b1853d0 Fix packages as enum base types, #2202. 2020-03-24 17:57:12 -04:00
Wilson Snyder
1e0e51edd3 Fix parameter type redeclaring a type, #2195. 2020-03-21 12:13:55 -04:00
Wilson Snyder
0ca07e4d58 Tests: Remove t_emit_memb_limit/vltmt as slow 2020-03-21 12:08:38 -04:00
Wilson Snyder
1ce360ed5b Add SPDX license identifiers. No functional change. 2020-03-21 11:24:24 -04:00
Wilson Snyder
5f63b24c50 Change --quiet-exit to also suppress 'Exiting due to N errors'. 2020-03-15 08:09:51 -04:00
Wilson Snyder
81c659957e Add column numbers to errors and warnings. 2020-03-14 22:02:42 -04:00
Wilson Snyder
ee8dd32c04 Check and document error format, #2191. 2020-03-14 21:48:26 -04:00
Wilson Snyder
0a755e6ecf Tests: Favor use of expect_filename. No functional change. 2020-03-14 17:42:15 -04:00
Wilson Snyder
e6c91f59ab Tests: Allow --numsets 2/2 2020-03-09 17:57:27 -04:00
Wilson Snyder
135ccf6595 Tests: Fix ormux on travis. 2020-03-08 09:48:13 -04:00
Wilson Snyder
9a2a3f8db7 Tests: Add t_gate_ormux, #2186, #2187. 2020-03-08 09:18:12 -04:00
Wilson Snyder
8ccc17f30b Add setting VM_PARALLEL_BUILDS=1 when using --output-split, #2185. 2020-03-08 09:03:29 -04:00
Wilson Snyder
328fef8190 Tests: Add driver --hashset for Travis. 2020-03-07 21:38:44 -05:00
Wilson Snyder
6c6d70a5e5 Fix FST when multi-model tracing. 2020-03-07 18:39:58 -05:00
Wilson Snyder
6f49f802b1 Tests: Add fst_identical. 2020-03-07 16:59:46 -05:00
Wilson Snyder
e70cba77e6 Add support for dynamic arrays, #379. 2020-03-07 10:24:27 -05:00
Wilson Snyder
135cbcd79a Internals: Move 'new' unsupported forward from parse into Ast. 2020-03-05 22:33:31 -05:00