Commit Graph

64 Commits

Author SHA1 Message Date
Geza Lore ffbb3229a8
Change default thread pool sizes to respect processor affinity (#6604)
Instead of using the number of processors in the host, use the number of
processors available to the process, respecting cpu affinity
assignments. Without pthreads, fall back and use the number of
processors in the host as before.

This is now applied everywhere so runing `nuamctl -C 0-3 verilator` or
`numactl -C 0-3 Vsim` should behave as if the host has 4 cores (e.g.
like in CI jobs)
2025-10-28 18:10:40 +00:00
Christian Hecken cc28b07dc1
Tests: Fix driver.py error for missing scenario (#6586) 2025-10-23 12:48:02 -04:00
Christian Hecken bf2422b55b
Tests: Fix driver.py --xrun option raising error (#6585) 2025-10-23 12:47:05 -04:00
Geza Lore 49c51af841
Deprecate '--make cmake' option (#6540) 2025-10-08 09:40:17 -04:00
Geza Lore c8c53f9a18 Tests: Remove sanitize option and parameter
Fixes #6536
2025-10-08 08:51:42 +01:00
Geza Lore ce0a05691b
Internals: Improve coverage flow (#6526)
See addes "Code coverage" section in docs/internals.rst
2025-10-03 17:18:24 +01:00
Geza Lore 62dbbbba85 Internals: Rename --enable-asan to --enable-dev-asan and related 2025-10-03 12:26:48 +01:00
Wilson Snyder 21dbdbf69d Tests: Auto-skip when not in root repo 2025-09-25 21:08:24 -04:00
Wilson Snyder fd12ab3413 Fix interface exposure with `--public-depth` or `--trace-depth` (#5758). 2025-09-23 22:05:51 -04:00
Geza Lore d1eda66668
Deprecate clocker attribute and --clk option (#6463)
The only use for the clocker attribute and the AstVar::isUsedClock that
is actually necessary today for correctness is to mark top level inputs
of --lib-create blocks as being (or driving) a clock signal. Correctness
of --lib-create (and hence hierarchical blocks) actually used to depend
on having the right optimizations eliminate intermediate clocks (e.g.:
V3Gate), when the top level port was not used directly in a sensitivity
list, or marking top level signals manually via --clk or the clocker
attribute. However V3Sched::partition already needs to trace through the
logic to figure out what signals might drive a sensitivity list, so it
can very easily mark all top level inputs as such.

In this patch we remove the AstVar::attrClocker and AstVar::isUsedClock
attributes, and replace them with AstVar::isPrimaryClock, automatically
set by V3Sched::partition. This eliminates all need for manual
annotation so we are deprecating the --clk/--no-clk options and the
clocker/no_clocker attributes.

This also eliminates the opportunity for any further mis-optimization
similar to #6453.

Regarding the other uses of the removed AstVar attributes:
- As of 5.000, initial edges are triggered via a separate mechanism
  applied in V3Sched, so the use in V3EmitCFunc.cpp is redundant
- Also as of 5.000, we can handle arbitrary sensitivity expressions, so
  the restriction on eliminating clock signals in V3Gate is unnecessary
- Since the recent change when Dfg is applied after V3Scope, it does
  perform the equivalent of GateClkDecomp, so we can delete that pass.
2025-09-20 15:50:22 +01:00
Wilson Snyder 3a039df351 Tests: Strictly test exit codes (no unexpected core dumps) 2025-09-17 21:01:11 -04:00
Geza Lore a44907b700
Fix memory leaks - batch 4 (#6439) 2025-09-16 19:22:36 +01:00
Wilson Snyder a2b6aca288 Tests: Refactor to create test.root variable. No test change. 2025-09-14 08:43:52 -04:00
Wilson Snyder 419e775dfb Tests: Support ANSI input in driver 2025-09-13 08:53:23 -04:00
Geza Lore 56927fb955
Fix memory leaks - batch 3 (#6419) 2025-09-11 12:01:36 +01:00
Geza Lore 5ffa05fba0
Fix AddressSanitizer issues (#6406)
These are all genuine bugs, brief descriptions.

1. V3OrderCFuncEmitter.h used to delete a node early that was still
   reference in a graph dump later. Not a big deal, it can be deleted
   later at the end of V3Order.

2. V3Param.cpp: this one is tricky. The variable referenced by
   AstVarXRef was deleted at the end of `visit(AstGenCase*)`, but then
   `visit(AstVarXRef*)` checks `nodep->varp()` (already deleted) to see
   if it's in an interface.

3. V3String::wildMatch is sometimes called with an empty 's' (the string
   we are matching against tha pattern 'p'), in which case it used to go
   off into the woods. Added check on call. An arbitrary number of `*`
   will still match the empty string.

4. V3Task.cpp: There was an error reported for an unsupported construct,
   then a subsequent SEGV. Just signal the error upward so we bail on an
   error in a more graceful way.

5. verylog.y: Some unsupported constructs failed to set the parsed node,
   so some memory thrash made it into some code downstream. Just parse
   these into nullptr.

Also increased the timeout on one test, which sometimes tripped with
asan on GCC during heavy host load.
2025-09-09 13:55:00 +01:00
Geza Lore 056c3ee331
Testing: Add --enable-asan configure option to compile with AddressSanitizer (#6404) 2025-09-09 08:55:49 +01:00
Geza Lore 141de7b94a
Tests: Do not redirect interactive debugger stdout (#6389) (#6392) 2025-09-05 17:06:23 -04:00
Aleksander Kiryk a9aa2f11b8
Improve testing on FreeBSD (#6328)
* Skip profiling tests on non-glibc platforms

* Enforce dumb terminal in tests

* Include POSIX headers whenever __unix__ macro is defined

* Treat no procfs as normal condition

* Respect MAKE variable when running make
2025-08-23 10:49:03 -04:00
Wilson Snyder 75c6745868 Test driver.py: Pass-through +verilator+ arguments to runtime 2025-08-12 19:32:56 -04:00
Artur Bieniek 04c38d5b3b
Tests: Switch to measuring CPU time instead of real time in test timeouts (#6224)
Signed-off-by: Artur Bieniek <abieniek@internships.antmicro.com>
2025-07-24 11:27:02 +02:00
Todd Strader 73696f0a71
Tests: Add coverpoints test (#6118) 2025-06-27 15:47:13 -04:00
Paul Swirhun c9fa54536e
Tests: Fix MacOS test driver when child process finishes (#6032) (#6038)
os.read(fd, 1) returns b'' on MacOS when the
child process exits, whereas it must be throwing an OSError
on other platforms.
2025-05-26 08:58:20 -04:00
Wilson Snyder 091be59f0d Tests: Use make -j when few tests. 2025-05-22 17:53:04 -04:00
Wilson Snyder 66667b6172
Support SARIF JSON diagnostic output with `--diagnostics-sarif`. (#6017) 2025-05-17 15:46:15 -04:00
Wilson Snyder 38dd9a344e Improve documentation for BADVLTPRAGMA 2025-04-30 20:32:30 -04:00
Wilson Snyder c7ff82f06b
Tests: Fix driver.py not stopping on interrupts (#5752) (#5921) 2025-04-06 19:03:39 -04:00
Wilson Snyder e12b971ba6 Optimize SAIF writes (#5916) 2025-04-05 15:09:32 -04:00
Wilson Snyder 0984fd045f Change `--trace` to `--trace-vcd`. 2025-04-05 10:46:39 -04:00
Wilson Snyder d26d62a176 Tests: Add driver.py --driver-clean 2025-03-27 18:33:18 -04:00
Wilson Snyder 0b6be2809e Tests: Fix bad ETA at startup 2025-03-22 08:49:40 -04:00
Mateusz Gancarz 9b4509f7d9
Add `--trace-saif` for SAIF power traces (#5812) 2025-03-07 10:41:29 -05:00
Wilson Snyder b54f897090
Tests: Fix Ubuntu24.04 clang test issues, and enable action (#5824) 2025-03-02 16:53:59 -05:00
github action ff244c1d1f Apply 'make format' 2025-01-08 14:44:48 +00:00
Krzysztof Starecki 260ac342f4
Tests: Add support for Questa in TestSimulator class (#5718) 2025-01-08 09:43:57 -05:00
Wilson Snyder 8fbb725f34 Copyright year update. 2025-01-01 08:30:25 -05:00
Wilson Snyder d75f41b641 Tests: Add param type to t_typename test 2024-12-01 17:28:13 -05:00
Wilson Snyder 9ec5413d33 Tests: Cleaner error summaries 2024-12-01 10:27:05 -05:00
Wilson Snyder 25d75ee86f Add `--fno-inline-funcs` to disable function inlining. 2024-11-25 19:59:10 -05:00
Wilson Snyder 1277a40b31 Tests: Add driver --obj-suffix option 2024-11-24 21:12:08 -05:00
sumpster ca31bcdbb6
Tests: Fix solver help output detection case insensitive (#5626) (#5627) 2024-11-23 18:10:37 -05:00
Geza Lore 76b4c2f254
driver.py: Properly detect cfg with ccache (#5579) 2024-11-01 17:14:17 +00:00
Geza Lore aac0186871
Fix pylint 3.2.7 global-variable-not-assigned (#5578) 2024-11-01 15:27:08 +00:00
Todd Strader dab826bef9
VPI error instead of fatal for vpi_get_value() on large signals (#5571) 2024-10-31 17:02:37 -04:00
Geza Lore 81ee89de15
Properly skip t_ccache_report when no ccache (#5562) 2024-10-25 14:33:26 +01:00
Todd Strader d3d45c0be5
Tests: Fix file_grep_count() error message (#5550) 2024-10-23 10:07:03 -04:00
Wilson Snyder 13c7b6e827 Tests: Faster first retry 2024-10-07 21:44:07 -04:00
Wilson Snyder d52822781c Tests: Fix driver for --iv etc 2024-10-06 04:49:53 -04:00
Wilson Snyder c300075a20 Tests: Remove driver Python version package requirement (#5505) 2024-10-03 19:39:28 -04:00
Geza Lore 59b07529b1
driver.py: fix aslr_off (#5477) 2024-09-21 16:37:51 +01:00