Commit Graph

541 Commits

Author SHA1 Message Date
Geza Lore
849487da23
Modify --build to be a standalone option (#2294)
- Issue an error when --build is used together with --make
- When given --build, always use GNU Make to perform the build
- Update documentation (examples were good as they were)
- Remove the broken t_flag_build_cmake test

Fixes #2280
2020-04-30 12:54:50 +01:00
Wilson Snyder
977ceb404d Mention -march-native, #2289. 2020-04-29 18:10:43 -04:00
Wilson Snyder
b44efe7ef7 Use 'suggest' for consistent wording. 2020-04-28 21:19:19 -04:00
Wilson Snyder
a95eb53684 Commentary (#2290). 2020-04-28 18:46:59 -04:00
Geza Lore
c52f3349d1
Initial implementation of generic multithreaded tracing (#2269)
The --trace-threads option can now be used to perform tracing on a
thread separate from the main thread when using VCD tracing (with
--trace-threads 1). For FST tracing --trace-threads can be 1 or 2, and
--trace-fst --trace-threads 1 is the same a what --trace-fst-threads
used to be (which is now deprecated).

Performance numbers on SweRV EH1 CoreMark, clang 6.0.0, Intel i7-3770 @
3.40GHz, IO to ramdisk, with numactl set to schedule threads on different
physical cores. Relative speedup:

--trace     ->  --trace --trace-threads 1      +22%
--trace-fst ->  --trace-fst --trace-threads 1  +38% (as --trace-fst-thread)
--trace-fst ->  --trace-fst --trace-threads 2  +93%

Speed relative to --trace with no threaded tracing:
--trace                                 1.00 x
--trace --trace-threads 1               0.82 x
--trace-fst                             1.79 x
--trace-fst --trace-threads 1           1.23 x
--trace-fst --trace-threads 2           0.87 x

This means FST tracing with 2 extra threads is now faster than single
threaded VCD tracing, and is on par with threaded VCD tracing. You do
pay for it in total compute though as --trace-fst --trace-threads 2 uses
about 240% CPU vs 150% for --trace-fst --trace-threads 1, and 155% for
--trace --trace threads 1. Still for interactive use it should be
helpful with large designs.
2020-04-21 23:49:07 +01:00
James Hanlon
97cbc10925 Add --flaten for use with --xml-only (#2270). 2020-04-21 18:14:08 -04:00
Wilson Snyder
466535abdc Support direct class member init. 2020-04-18 20:20:17 -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
9b8aebb00c Commentary on --build 2020-04-15 18:08:37 -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
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
Geza Lore
0f617988d4
Compile fast tracing code with OPT_FAST in single compile mode. (#2245)
When using the __ALL*.cpp based single compile mode (i.e.: without
VM_PARALLEL_BUILDS), the fast path tracing code used to be included in
__Allsup.cpp, which was compiled with OPT_SLOW, severely harming tracing
performance. We now have __ALLfast.cpp and __ALLslow.cpp instead of
__ALLcls.cpp and __ALLsup.cpp, so we can compile the fast support code
with OPT_FAST as well.
2020-04-08 21:05:43 -04:00
Wilson Snyder
1e0b37f4bc Commentary 2020-04-08 17:55:12 -04:00
Wilson Snyder
914a6edd33 Add error if use SystemC 2.2 and earlier (pre-2011) as is deprecated. 2020-04-07 19:58:17 -04:00
Wilson Snyder
efaf375887 Configuring with ccache present now defaults to using it; see OBJCACHE in the manual. 2020-04-05 16:10:33 -04:00
Wilson Snyder
a494ad5ec7 Support $ferror, #1638. 2020-04-05 11:22:05 -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
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
Marco Widmer
305b4f3c75
Fix configuration file documentation (#2221) 2020-04-02 17:32:06 -04:00
Wilson Snyder
1ce360ed5b Add SPDX license identifiers. No functional change. 2020-03-21 11:24:24 -04:00
Wilson Snyder
172583eb03 Commentary - fix error regexp, #2191. 2020-03-17 15:39:50 -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
ee8dd32c04 Check and document error format, #2191. 2020-03-14 21:48:26 -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
2d52f525c5 Add --structs-packed for forward compatibility, #1541. 2020-03-07 10:51:06 -05:00
Wilson Snyder
c108f5def9 Commentary, Closes #2177. 2020-03-05 19:09:58 -05:00
Wilson Snyder
30a33a6104 Add support for and , #2126. 2020-03-01 21:39:23 -05:00
Wilson Snyder
4878fe3a1f Add split_var metacomment to assist UNOPTFLAT fixes, #2066. 2020-02-28 19:15:08 -05:00
Wilson Snyder
c6b755a12e Commentary 2020-02-27 19:35:49 -05:00
Wilson Snyder
991d81cd0a Recommend -Os. 2020-02-27 07:46:34 -05:00
Wilson Snyder
6131bcdbb0 Verilator_gantt: Fix CPU count in report. 2020-02-27 07:12:50 -05:00
Wilson Snyder
4c438bbc67 Commentary 2020-02-25 19:01:14 -05:00
Tobias Wölfel
18f8cd0529
Allow assert disable (#2168)
* Add +verilator+noassert flag

This allows to disable the assert check per simulation argument.

* Add AssertOn check for assert

Insert the check AssertOn to allow disabling of asserts.
Asserts can be disabled by not using the `--assert` flag or by calling
`AssertOn(false)`, or passing the "+verilator+noassert" runtime flag.
Add tests for this behavior.
Bad tests check that the assert still causes a stop.
Non bad tests check that asserts are properly disabled and cause no stop
of the simulation.

Fixes #2162.

Signed-off-by: Tobias Wölfel <tobias.woelfel@mailbox.org>

* Correct file location

Signed-off-by: Tobias Wölfel <tobias.woelfel@mailbox.org>

* Add description for single test execution

Without this description it is not obvious how to run a single test from
the regression test suite.

Signed-off-by: Tobias Wölfel <tobias.woelfel@mailbox.org>
2020-02-15 18:17:23 -06:00
Wilson Snyder
02786b3f09 Commentary 2020-02-12 22:46:59 -05:00
Wilson Snyder
a4e8d39932 Spelling fixes 2020-01-24 20:10:44 -05:00
Stefan Wallentowitz
22088c907f
Set maximum number width (#2128)
Adjust the maximum number width to 64K. Add --max-num-width option to
adjust this setting.

Closes #2082
2020-01-21 12:17:31 +01:00
Pieter Kapsenberg
4a122fd0f2 Add detailed location to XML output (#2122)
* Add detailed location to XML output

* Fixing build failures

* less cryptic regulary expressions

* correcting typo in test

* Adding file letter to the location attribute, and cleaning up the regular expression in the tests.

* Add remaining test expected output files for XML changes

* spacing fix, adding documentation on changes
2020-01-20 14:08:13 -05:00
Wilson Snyder
1acff950d0 Commentary: Add deprecations section to docs. Closes #2081. 2020-01-20 10:06:45 -05:00
Stefan Wallentowitz
fad465abf1
Add lint_off -match waivers (#2102)
* Add more directives to configuration files

Allow to set the same directives in configuration files that can also
be set by comment attributes (such as /* verilator public */ etc).

* Add support for lint messsage waivers

Add configuration file switch '-match' for lint_off. It takes a string
with wildcards allowed and warnings will be matched against it (if
rule and file also match). If it matches, the warning is waived.

Fixes #1649 and #1514 
Closes #2072
2020-01-12 10:03:17 +01:00
Wilson Snyder
8859cbf5bc Commentary 2020-01-10 19:12:45 -05:00
Philipp Wagner
4a307742c4 Fix typo in help output (#2096)
The variable is named VM_PARALLEL_BUILDS, not VM_PARALLEL_BUILD.

Signed-off-by: Philipp Wagner <mail@philipp-wagner.com>
2020-01-09 20:07:08 -05:00
Wilson Snyder
a2911ed933 Fix shebang breaking some shells. Closes #2067. 2020-01-09 20:01:12 -05:00
Wilson Snyder
f23fe8fd84 Update copyright year. 2020-01-06 18:05:53 -05:00
Stefan Wallentowitz
b7665a88db
Rename msg to rule in configuration files (#2080)
Rename the -msg switch to -rule in configuration files as it is more
clear.

resolves #2068
2019-12-30 19:15:43 +01:00
Wilson Snyder
39950d16d0 Ignore `uselib to end-of-line, bug1634. 2019-12-12 20:57:48 -05:00
Todd Strader
c62c152048 Commentary 2019-12-12 07:53:08 -05:00
Wilson Snyder
cda5c53cf9 Add BOUNDED warning and promote bounded queues to unbounded. 2019-12-08 15:56:49 -05:00
Wilson Snyder
c199930943 Commentary 2019-12-08 07:34:47 -05:00