Commit Graph

1518 Commits

Author SHA1 Message Date
Wilson Snyder 430238a6b4 Support # as a comment in -f files (#2497). 2020-09-15 20:12:08 -04:00
Peter Monsson d0819f156f
Add support for |=> inside properties (#1292). 2020-09-10 06:49:04 -04:00
Wilson Snyder 30f3774134 Support const object new() assignments. 2020-09-07 17:26:53 -04:00
Wilson Snyder c1d35c8622 devel release 2020-09-07 09:42:13 -04:00
Wilson Snyder 16fba59480 Version bump 2020-09-07 09:26:03 -04:00
Peter Monsson 627d83e807
Add support for assume property (#2531) 2020-09-03 12:38:48 -04:00
Wilson Snyder ba5779c69e Fix queues as class members (#2525). 2020-08-29 12:56:43 -04:00
Wilson Snyder 069eb97eca SystemC 2.3.0 or newer (SYSTEMC_VERSION >= 20111121) is now required. 2020-08-29 10:45:47 -04:00
Wilson Snyder f7f3d3fd43 Fix splitting eval functions with --output-split-cfuncs (#2368). 2020-08-23 22:21:40 -04:00
Wilson Snyder 917d3b0fb3 Support virtual class 2020-08-23 20:27:25 -04:00
Wilson Snyder f4a72946eb Support $urandom, $urandom_range without stability. 2020-08-23 08:42:50 -04:00
Wilson Snyder 4e6d2cfe38 Fix class constructor error on assignments to const. 2020-08-22 22:44:00 -04:00
Wilson Snyder 7f3a73e314 Fix naming of "id : begin" blocks. 2020-08-22 22:21:37 -04:00
Wilson Snyder 9702d11657 Support class extern. 2020-08-22 19:46:21 -04:00
Wilson Snyder 2d7d2c5992 Fix false DECLFILENAME on black-boxed modules (#2430). 2020-08-22 16:56:21 -04:00
Wilson Snyder 27181d534e Commentary 2020-08-17 07:57:38 -04:00
Wilson Snyder 7a33fe2bf2 devel release 2020-08-15 09:20:50 -04:00
Wilson Snyder bdecf6c4e1 Version bump 2020-08-15 09:14:36 -04:00
Wilson Snyder 6fcf05e2b6 Commentary 2020-08-15 09:12:36 -04:00
Peter Monsson 4a5e4b04f3
Support $rose and $fell. (#2148) (#2501) 2020-08-14 07:37:10 -04:00
Wilson Snyder 20c906261b Fix casting non-self-determined subexpressions (#2493). 2020-08-09 20:59:06 -04:00
Wilson Snyder 98cd925fda Fix non-32 bit conversion to float (#2495). 2020-08-06 21:56:43 -04:00
Peter Monsson 1280070abb
Support $stable (#2488) 2020-07-28 18:26:24 -04:00
Wilson Snyder a52f975bd7 Fix combining different-width parameters (#2484). 2020-07-26 17:54:23 -04:00
Wilson Snyder bfea4b7f99 Fix arrayed interfaces, broke in 4.038 (#2468). 2020-07-15 17:58:26 -04:00
Wilson Snyder 1194dbf19c devel release 2020-07-11 09:18:40 -04:00
Wilson Snyder 0cd4a57ad9 Version bump 2020-07-11 09:05:24 -04:00
Wilson Snyder 1bd1e21a69 Change --enable-prec11 to --enable-prec11-final and give stronger warning 2020-07-11 08:56:40 -04:00
Wilson Snyder b35b5aacfa Fix division exception (#2460) 2020-07-10 22:28:02 -04:00
Wilson Snyder 8cdecd5668 Commentary: Changes update 2020-07-10 18:18:02 -04:00
Wilson Snyder 0b09636c58 Support for-loop increments with commas. 2020-06-29 21:18:41 -04:00
Stefan Wallentowitz 8006b5479c
Missing entry in Changes for VPI parameters (#2417) 2020-06-13 05:22:12 -04:00
Wilson Snyder 35226d5e1a Commentary 2020-06-12 08:12:54 -04:00
Geza Lore fac89c5d62
Close trace on vl_fatal/vl_finish (#2414)
This is required to get the last bit of FST trace and close the FST file
properly on $stop or assertion failure.
2020-06-12 07:15:42 +01:00
Wilson Snyder 6de78d58fa Add new UNSUPPORTED error code to replace most previous Unsupported: messages. 2020-06-09 19:20:16 -04:00
Wilson Snyder a21947d887 Support --bbox-unsup parsing of 'with' 2020-06-06 11:11:23 -04:00
Wilson Snyder aae2bf872c devel release 2020-06-06 07:51:54 -04:00
Wilson Snyder 04c0fc8aa7 Version bump 2020-06-06 07:48:47 -04:00
Wilson Snyder a57826b125 Line Coverage now tracks all statement lines, not just branch lines. 2020-05-31 15:52:17 -04:00
Wilson Snyder 2e32387e5c Fix GCC false warning on array bounds. (#2386) 2020-05-30 13:47:53 -04:00
Wilson Snyder 279f21bb5b Configure now enables SystemC if it is installed as a system headers. 2020-05-28 18:51:46 -04:00
Wilson Snyder b6d4899d3f Commentary 2020-05-28 18:09:31 -04:00
Wilson Snyder cbafff8a71 Commentary 2020-05-27 21:52:55 -04:00
Geza Lore 622f59ad65
Set OPT_FAST=-Os as default (#2374) 2020-05-28 00:57:49 +01:00
Geza Lore d737266f64
Add OPT_GLOBAL to use for run-time library (#2373)
This allows compiling the run-time library with optimization even when OPT_FAST is not used in order to imporove model build speed, possibly during debug cycles.
2020-05-27 01:52:08 +01:00
Stefan Wallentowitz dc90e6c3c3
Generate file with waivers (#2354)
This adds the flag --generate-waivefile <filename>. This will generate
a verilator config file with the proper lint_off statemens to turn off
warnings emitted during this particular run.

This feature can be used to start with using Verilator as linter and
systematically capture all known lint warning for further
elimination. It hopefully helps people turning of -Wno-fatal or
-Wno-lint and gradually improve their code base.

Signed-off-by: Stefan Wallentowitz <stefan.wallentowitz@hm.edu>
2020-05-26 20:38:14 +02:00
Geza Lore 7b683fe258 Use sane --output-split values by default to help large builds
--output-split is now on by default with value 20000.
--output-split-cfuncs and --output-split-ctrace now defaults to the
value of --output-split unless explicitly specified.
2020-05-26 01:22:10 +01:00
Vassilis Papaefstathiou a7432bdea7 Support wide operands in queues and dynamic arrays (#2352) 2020-05-23 21:59:56 -04:00
Wilson Snyder d33d0301f8 Support verilator_coverage --write-info for lcov HTML reports. 2020-05-16 09:18:35 -04:00
Wilson Snyder c1a9fe07e9 Support multi channel descriptor I/O (#2190)
clang-format and Changes update. No functional change.
2020-05-14 18:14:50 -04:00
Yossi Nivin f9a0cf0cff
Support $countbits (#2287) 2020-05-10 14:27:22 -04:00
Wilson Snyder 070bcddf5a Support unpacked array .sum and .product. 2020-05-10 12:48:33 -04:00
Wilson Snyder 9375d9f603 Fix $isunknown with constant Zs. 2020-05-07 21:40:08 -04:00
Wilson Snyder 72bd91c7f1 Support $isunbounded and parameter $. (#2104) 2020-05-07 21:12:58 -04:00
Wilson Snyder a41ea180fa Fix +: and -: on unpacked arrays. (#2304) 2020-05-04 19:40:50 -04:00
Geza Lore 8afcd67a1f Fix FST tracing of little endian vectors 2020-05-03 22:39:45 +01:00
Wilson Snyder 16e258eb4c Commentary: reformat changes, relocate announcements 2020-05-03 16:10:02 -04:00
Wilson Snyder d6fbbddac9 devel release 2020-05-03 11:18:53 -04:00
Wilson Snyder 9dc65df982 Version bump 2020-05-03 11:14:37 -04:00
Wilson Snyder 8f64e4a76f Support $root, #2150. 2020-05-02 08:29:20 -04:00
Wilson Snyder 5ded80cf79 Fix MacOs Homebrew by removing default LIBS, #2298. 2020-04-30 19:53:21 -04:00
Wilson Snyder a6deee2083 Fix clock enables with bit-extends, #2299. 2020-04-30 19:22:58 -04:00
Wilson Snyder e1f45dd84a Commentary 2020-04-30 18:52:32 -04:00
Wilson Snyder 9fd4541069 Fix reduction OR on wide data, broke in v4.026, #2300. 2020-04-30 17:53:54 -04:00
Wilson Snyder 15ad3f46be Fix logical not optimization with empty begin, #2291. 2020-04-28 21:15:20 -04:00
Wilson Snyder 910803e6db Fix error on unpacked connecting to packed, #2288. 2020-04-27 18:38:54 -04:00
Wilson Snyder 87e1c36e4a Support event data type (with some restrictions). 2020-04-25 15:37:46 -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 39d7cbf412 Fix arrayed instances connecting to slices, #2263. 2020-04-17 19:30:53 -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
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 8b2666cd04
Fix to make trace code allocation dense. (#2250)
This looks like a bits/bytes bug. The affected m_codeInc member
determines how many 32-bit words to allocate in a buffer used to store
previous values of the signal, but this was off by a factor of 8, so
we used to use too much memory.

SweRV VCD tracing speed +6.5% (excluding IO, clang 6.0), due mainly to
reduced D cache misses.
2020-04-11 16:00:43 +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
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
Geza Lore 991d8b178b
Fix FST tracing performance by removing std::map from hot path. (#2244)
This patch eliminates a major piece of inefficiency in FST tracing
support, by using an array to lookup fstHandle values corresponding
to trace codes, instead of a tree based std::map. With this change, FST
tracing is now only about 3x slower than VCD tracing. We do require
more memory to store the symbol lookup table, but the size of that is
still small, for the speed benefit.
2020-04-08 17:54:35 -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
Geza Lore 0cfa828572 Fix DPI import/export to be standard compliant, #2236. 2020-04-07 19:07:47 -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 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 b2228afd1a devel release 2020-04-04 08:50:56 -04:00
Wilson Snyder d3797ade95 Version bump 2020-04-04 08:40:47 -04:00
Wilson Snyder 27516b565d Commentary 2020-04-03 20:08:24 -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 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 5c72f01598 Fix assertions with unique case inside, #2199. 2020-03-30 18:13:51 -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 08a51e3e09 Fix VCD open with empty filename, #2198. 2020-03-24 17:32:47 -04:00
Wilson Snyder 1e0e51edd3 Fix parameter type redeclaring a type, #2195. 2020-03-21 12:13:55 -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 8ccc17f30b Add setting VM_PARALLEL_BUILDS=1 when using --output-split, #2185. 2020-03-08 09:03:29 -04:00
Wilson Snyder 9392eac6a7 devel release 2020-03-08 08:40:33 -04:00