Commit Graph

358 Commits

Author SHA1 Message Date
Wilson Snyder
ee130cb20d Tests: Skip if no constraint solver 2024-05-23 22:25:14 -04:00
Geza Lore
72b96d5069
tests: disable ASLR for t_trace_ub_misaligned_address (#5075)
This works around an address-sanitizer bug hit with some GCC versions
2024-04-29 15:38:00 +01:00
Andrew Nolte
63fa6accc4
[Vpi] Fix missing scopes 2 (#4965) 2024-04-01 23:11:15 -04:00
Wilson Snyder
e67bdb4c08 Commentary 2024-03-24 09:23:37 -04:00
Wilson Snyder
65c3cb4708 Tests: stop testing if --fail-max tests fail 2024-03-15 21:11:24 -04:00
Wilson Snyder
229dbbb100 Tests: RUn same job count as CPU instead of +1 to reduce CI congestion 2024-03-11 20:13:23 -04:00
Geza Lore
f56f318217
Make installation relocatable, and the installation testable (#4927)
Fixes #4893
2024-03-01 00:08:28 +00:00
Andrew Nolte
cfb73923bd
Test driver: Add -xrun Xcelium support (#4896)
Co-authored-by: Andrew Nolte <anolte@hudson-trading.com>
2024-02-20 14:41:05 -05:00
Szymon Gizler
d667b73e8d Add --json-only and related JSON dumping (#4715) (#4831). 2024-02-09 17:50:09 -05:00
Szymon Gizler
c715cfc254
Add --valgrind switch (#4828) 2024-01-29 07:50:05 -05:00
Wilson Snyder
a38fea1f9e Tests: Use context coverage write 2024-01-20 11:19:42 -05:00
Wilson Snyder
a43fd06f85 Tests: Imply no driver.pl make when using --build. No functional change intended 2024-01-20 10:37:35 -05:00
Wilson Snyder
fef0502d50 Tests: Imply make_main=>0 on --main tests 2024-01-20 10:17:35 -05:00
Wilson Snyder
c30b9d04a8 Change unused vars to standard void syntax. No functional change intended. 2024-01-20 08:57:22 -05:00
Szymon Gizler
372cdf1fc8
Tests: Let debugger handle signals instead of test driver (#4817) 2024-01-16 11:18:20 -05:00
Wilson Snyder
3eaed3b6f5
Remove deprecated 32-bit pointer mode (#4791). 2024-01-01 10:16:48 -05:00
Wilson Snyder
e76f29e5ba Copyright year update 2024-01-01 03:19:59 -05:00
Wilson Snyder
7a537765bc Tests: Comment driver.pl with some argument meanings. No functional change. 2023-12-19 22:43:18 -05:00
Todd Strader
654ab117f2
Fix tracing FST enums (#4661) (#4756) 2023-12-19 11:07:06 -05:00
Todd Strader
1fe591ae20
fix --rrsim (#4725) 2023-11-30 07:15:12 -05:00
Geza Lore
82565690c7 test driver.pl: don't redirect to STDOUT of interactive GDB 2023-10-22 00:56:10 +01:00
Wilson Snyder
018d766179 Fix clang error (#4462) 2023-09-26 21:07:43 -04:00
Wilson Snyder
9eba61018a Tests: Ignore debug message in error line 2023-08-12 09:39:02 -04:00
Wilson Snyder
bd4afeea69 Tests: Fix removing line numbers (#4352) 2023-07-10 08:17:49 -04:00
Wilson Snyder
d42f76c346 Tests: Fix tests, broke in commit 3a9eeabd 2023-06-12 21:36:23 -04:00
Wilson Snyder
3a9eeabdb2 Tests: Auto detect and exit --timing with no coroutines 2023-06-12 20:09:12 -04:00
Wilson Snyder
13a87e5514 Parse process class, and report runtime errors (#3612) 2023-04-08 15:04:42 -04:00
Wilson Snyder
a93b344096 Tests: use standard lower case for Perl vm_prefix 2023-02-26 10:18:40 -05:00
Wilson Snyder
3a8288b0f6 Move test driver documentation into internals.rst 2023-01-21 16:17:26 -05:00
Wilson Snyder
b24d7c83d3 Copyright year update 2023-01-01 10:18:39 -05:00
Wilson Snyder
a0e7930036 docs: Fix spelling 2022-12-09 22:39:41 -05:00
Wilson Snyder
675cc891a5 Tests: Add rerunnable(0) 2022-12-02 19:57:40 -05:00
Wilson Snyder
4b3731d318 Remove env from main() to be C++11 compatible 2022-11-23 18:50:31 -05:00
Wilson Snyder
278d532368 Tests: Add TEST_DUMPFILE define 2022-11-20 09:40:02 -05:00
Wilson Snyder
6297650fef Tests: Fix internal error stability 2022-11-20 07:45:51 -05:00
Wilson Snyder
5634e96bb6 Tests: Remove unsupported() in tests, instead check whatever is current behavior 2022-11-19 22:43:10 -05:00
Kamil Rakoczy
d6126c4b32
Remove --no-threads; require --threads 1 for single threaded (#3703). 2022-11-05 08:47:34 -04:00
Wilson Snyder
7e1b92fa75 Add --get-supported to determine what features are in Verilator (#3688). 2022-10-20 21:42:30 -04:00
Geza Lore
ddb678cc5b Merge branch 'master' into develop-v5 2022-09-22 17:33:36 +01:00
Geza Lore
63c694f65f Streamline dump control options
- Rename `--dump-treei` option to `--dumpi-tree`, which itself is now a
  special case of `--dumpi-<tag>` where tag can be a magic word, or a
  filename
- Control dumping via static `dump*()` functions, analogous to `debug()`
- Make dumping independent of the value of `debug()` (so dumping always
  works even without the debug flag)
- Add separate `--dumpi-graph` for dumping V3Graphs, which is again a
  special case of `--dumpi-<tag>`
- Alias `--dump-<tag>` to `--dumpi-<tag> 3` as before
2022-09-22 17:24:41 +01:00
Geza Lore
27031ed688 Merge branch 'master' into develop-v5 2022-09-15 10:28:35 +01:00
Wilson Snyder
d85b909054 Internals: Use std:: for mem and str functions. 2022-09-14 21:10:19 -04:00
Krzysztof Bieganski
39af5d020e
Timing support (#3363)
Adds timing support to Verilator. It makes it possible to use delays,
event controls within processes (not just at the start), wait
statements, and forks.

Building a design with those constructs requires a compiler that
supports C++20 coroutines (GCC 10, Clang 5).

The basic idea is to have processes and tasks with delays/event controls
implemented as C++20 coroutines. This allows us to suspend and resume
them at any time.

There are five main runtime classes responsible for managing suspended
coroutines:
* `VlCoroutineHandle`, a wrapper over C++20's `std::coroutine_handle`
  with move semantics and automatic cleanup.
* `VlDelayScheduler`, for coroutines suspended by delays. It resumes
  them at a proper simulation time.
* `VlTriggerScheduler`, for coroutines suspended by event controls. It
  resumes them if its corresponding trigger was set.
* `VlForkSync`, used for syncing `fork..join` and `fork..join_any`
  blocks.
* `VlCoroutine`, the return type of all verilated coroutines. It allows
  for suspending a stack of coroutines (normally, C++ coroutines are
  stackless).

There is a new visitor in `V3Timing.cpp` which:
  * scales delays according to the timescale,
  * simplifies intra-assignment timing controls and net delays into
    regular timing controls and assignments,
  * simplifies wait statements into loops with event controls,
  * marks processes and tasks with timing controls in them as
    suspendable,
  * creates delay, trigger scheduler, and fork sync variables,
  * transforms timing controls and fork joins into C++ awaits

There are new functions in `V3SchedTiming.cpp` (used by `V3Sched.cpp`)
that integrate static scheduling with timing. This involves providing
external domains for variables, so that the necessary combinational
logic gets triggered after coroutine resumption, as well as statements
that need to be injected into the design eval function to perform this
resumption at the correct time.

There is also a function that transforms forked processes into separate
functions.

See the comments in `verilated_timing.h`, `verilated_timing.cpp`,
`V3Timing.cpp`, and `V3SchedTiming.cpp`, as well as the internals
documentation for more details.

Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-08-22 13:26:32 +01:00
Geza Lore
a5ddd10e31 Tests: compare VCD files both ways
vcddiff is a bit broken, and sometimes 'vcddiff a b' fails while the
files are indeed equivalent. There is a chance however that 'vcddif b a'
will succeed in this case, so compare trace files both ways when
checking test results and claim success if vcddiff succeeds in at least
one direction.
2022-07-27 10:48:02 +01:00
Geza Lore
f4038e3674
Move thread pool and execution profiler into the context. (#3477)
Fixes #3454
2022-07-12 11:41:15 +01:00
Geza Lore
3aa8624658 Set 'threads' in tests via parameter to compile
This is in preparation to #3454.
2022-07-05 12:33:41 +01:00
Geza Lore
383e384739 Remove always true cfg_with_threaded from test driver 2022-06-27 15:23:32 +01:00
Wilson Snyder
ada58465b2 Add -f<optimization> options to replace -O<letter> options (#3436). 2022-06-03 20:43:16 -04:00
Geza Lore
b51f887567
Perform VCD tracing in parallel when using --threads (#3449)
VCD tracing is now parallelized using the same thread pool as the model.
We achieve this by breaking the top level trace functions into multiple
top level functions (as many as --threads), and after emitting the time
stamp to the VCD file on the main thread, we execute the tracing
functions in parallel on the same thread pool as the model (which we
pass to the trace file during registration), tracing into a secondary
per thread buffer. The main thread will then stitch (memcpy) the buffers
together into the output file.

This makes the `--trace-threads` option redundant with `--trace`, which
now only affects `--trace-fst`. FST tracing uses the previous offloading
scheme.

This obviously helps a lot in VCD tracing performance, and I have seen
better than Amdahl speedup, namely I get 3.9x on XiangShan 4T (2.7x on
OpenTitan 4T).
2022-05-29 19:08:39 +01:00
Wilson Snyder
5aa12e9b51 Add assert when VerilatedContext is mis-deleted (#3121). 2022-05-15 10:51:03 -04:00