Commit Graph

3509 Commits

Author SHA1 Message Date
Wilson Snyder
87e1c36e4a Support event data type (with some restrictions). 2020-04-25 15:37:46 -04:00
Geza Lore
9991b19610 Another attempt at flushing threaded VCD correctly. 2020-04-25 18:40:09 +01:00
Geza Lore
1381d3dbde
Add -Wno-tautological-bitwise-compare to model build flags (#2285)
This appeases Clang 10.
2020-04-25 16:29:42 +01:00
Wilson Snyder
5e575f5906 Fix line numbers in tables. 2020-04-24 19:34:26 -04:00
Wilson Snyder
e2cbcd37d8 Commentary 2020-04-24 18:43:02 -04:00
Wilson Snyder
3b37b5b92d Tests: Check output from some unsupported tests. 2020-04-24 08:22:19 -04:00
Geza Lore
10b4678ee6 Make vgen.pl deterministic 2020-04-24 04:53:33 +01:00
Geza Lore
c1665818b9
Fix missing flush with threaded VCD tracing. (#2282)
VerilatedVcdC::openNext() failed to flush the tracing thread before
opening the next output file, which caused t_trace_cat.pl to fail
with --vltmt on occasion.
2020-04-24 03:09:26 +01:00
Geza Lore
27f4399c31
Fix tests failing on rerun after passing from clean. (#2281) 2020-04-23 21:27:06 -04:00
Wilson Snyder
df52e481fb Collected minor output code cleanups. 2020-04-23 21:22:47 -04:00
Wilson Snyder
f93ae707e0 Tests: Add bad option test. 2020-04-23 19:56:26 -04:00
Geza Lore
6ed10b7fde
Fix --protect-lib generated library link rules (#2279)
We used to include a .cpp file on the link line for the shared library,
which was ignored, but generated a .d file for the .so which contained
the header files required by the .cpp file. This then caused a rebuild
where we included the .d in verilated.mk to included in the .h headers
among the prerequisites of the .so, yielding a clang error about treating
.h files as c++-header rather than c-header... Long story short, we don't
do that anymore. This used t cause t_a4_examples to fail on occasion.

Note there is no need for a separate compilation rule for the
<--protect-lib>.cpp, as it will jsut pick up the standard OPT_FAST rule.
2020-04-23 17:30:23 -04:00
Geza Lore
8208fe8a0e
Fix test failures on Ubuntu 20.04 (#2278)
- Packaged SystemC lives in /usr so needed to update regex in test
driver
- Clang 10 complains about mixed named and positional initializers in
struct definitions.
2020-04-23 17:29:37 -04:00
Wilson Snyder
ace35b3e81 Tests: Add -G test. 2020-04-23 08:05:14 -04:00
Wilson Snyder
2b58e834ee Tests: Rename IVERILOG define for consistency. No functional change. 2020-04-23 08:05:14 -04:00
Qingyao Sun
14643643c9
Fix compatibility problem with CMake policy CMP0025 (#2277)
Signed-off-by: Qingyao Sun <sunqingyao19970825@icloud.com>
2020-04-23 07:14:20 -04:00
Wilson Snyder
7176aee852 Internals: Parse fork and delays, but then still report unsupported. 2020-04-22 21:31:40 -04:00
Geza Lore
c96a43b452
Fix unused variable in VL_READMEM_N (#2274) 2020-04-22 17:25:35 -04:00
Wilson Snyder
77915f78db Add experimental-only option. 2020-04-21 20:45:23 -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
Wilson Snyder
6ab51de96d Fix dockerfile 2020-04-21 18:37:53 -04:00
James Hanlon
97cbc10925 Add --flaten for use with --xml-only (#2270). 2020-04-21 18:14:08 -04:00
James Hanlon
65cd4f6047 Fix comment and add to CONTRIBUTORS (#2270). 2020-04-21 18:11:53 -04:00
Wilson Snyder
174fd1bf0e Codacy cleanups. No functional change. 2020-04-20 22:01:47 -04:00
Wilson Snyder
b12413e42f Tests: Reenable some tests incorrectly marked unsupported. 2020-04-20 21:55:23 -04:00
Wilson Snyder
7709130d93 Fix Codacy badge 2020-04-20 21:52:29 -04:00
Wilson Snyder
15f7685755 Codacity cleanups. No functional change intended. 2020-04-20 21:43:05 -04:00
Wilson Snyder
83c6e9e821 Commentary commit for Codacity. 2020-04-20 21:13:43 -04:00
Veripool API Bot
1cacb1deab Commentary commit for Codacity. 2020-04-20 20:01:59 -04:00
Veripool API Bot
03bc8b7480 Commentary commit for Codacity. 2020-04-20 19:54:07 -04:00
Veripool API Bot
7d6668a3bd Commentary commit for Codacity. 2020-04-20 19:38:21 -04:00
Wilson Snyder
def40fab9b Internals: Rename VSigning 2020-04-19 21:19:09 -04:00
Wilson Snyder
fceedd9f4d Tests: Update static test. 2020-04-19 21:18:57 -04:00
Wilson Snyder
4272f2116e Tests: Update static test. 2020-04-19 20:10:07 -04:00
Geza Lore
39d903375b
Factor out trace implementation common to all formats. (#2268)
This patch de-duplicates common functionality between the VCD and FST
trace implementation. It also enables adding new trace formats more
easily and consistently.

No functional nor performance change intended.
2020-04-19 23:57:36 +01:00
Wilson Snyder
9164eb03d5 Show that class parameters even if unused are unsupported. 2020-04-19 18:36:55 -04:00
Wilson Snyder
7b789fe02a Docker: Add ccache and libgoogle-perftools-dev 2020-04-19 12:59:38 -04:00
Wilson Snyder
4ae3d3af71 Fix docker build error 2020-04-19 12:43:20 -04:00
Geza Lore
6a54922044
Set FST timescale correctly. (#2266)
The FST trace timescale used to be set in the constructor via
set_time_unit, but at that point we haven't normally opened the
file yet so it was just dropped. On top of that, we actually want
to use set_time_resolution... FST trace timescales now match the VCD.
2020-04-19 08:47:22 -04:00
Wilson Snyder
466535abdc Support direct class member init. 2020-04-18 20:20:17 -04:00
Geza Lore
efacac2e3d
Tests: Ignore SystemC file paths in expected test results (#2265) 2020-04-18 18:56:19 -04:00
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
e6f345e45d Internal: clang-tidy fixes. No functional change. 2020-04-15 21:47:37 -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
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
Wilson Snyder
1883ab29cb clang-format 10.0 forward compatibility. No functional change. 2020-04-15 17:36:57 -04:00