Commit Graph

1333 Commits

Author SHA1 Message Date
Yilou Wang 10ac99ac05
Support randomization of scope variables with 'std::randomize()' (#5438) (#6185) 2025-07-25 12:13:46 +02:00
Wilson Snyder db5b2669fc Add current memory usage statistic (#6192 partial) 2025-07-24 08:36:58 +02:00
Wilson Snyder 7a6775ca84 Internals: Rename memPeakUsageBytes 2025-07-17 22:16:59 -04:00
Ryszard Rozak e2e5d9eaf1
Support disabling a fork from outside that fork (#6174) 2025-07-14 06:51:58 -04:00
Bartłomiej Chmiel 9ad0de1efd
Fix uninitialized thread PGO counters (#6167) 2025-07-10 04:56:14 -04:00
Wilson Snyder 6c9cbaef62 Internals: Clean up some constructors. No functional change intended. 2025-07-03 18:59:32 -04:00
Wilson Snyder b914cda1c7 Internals: cppcheck cleanups. No functional change. 2025-06-28 12:29:41 -04:00
Wilson Snyder 51545b36ca Internals: Add format-make rule and standardize Makefile indents. No functional change intended. 2025-06-24 17:58:55 -04:00
Wilson Snyder 6af694b04b Support `$timeformat` with missing arguments (#6113). 2025-06-24 17:30:05 -04:00
Geza Lore 277611bcdd
Add DFG binToOneHot pass to generate one-hot decoders (#6096)
Somewhat commonly, there is code out there that compares an expression (or
variable) against many different constants, e.g. a one-hot decoder:

```systemverilog
  assign oneHot = {x == 3, x == 2, x == 1, x == 0};
```

If the width of the expression is sufficiently large, this can blow up
a GCC pass and take an egregious amount of memory and time to compile.

Adding a new DFG pass that will generate a cheap one-hot decoder:
to compute:

```systemverilog
  wire [$bits(x)-1:0] idx = <the expression being compared many times>
  reg tab [1<<$bits(x)] = '{default: 0};
  reg [$bits(x)-1:0] pre = '0;

  always_comb begin
    tab[pre] = 0;
    tab[idx] = 1;
    pre = idx ; // This assignment marked to avoid a false UNOPFTLAT
  end
```

We then replace the comparisons `x == CONST` with `tab[CONST]`.

This is generally performance neutral, but avoids the compile time and memory
blowup with GCC (128GB+ -> 1GB in one example).

We do not apply this if the comparisons seem to be part of a `COMPARE ?
val : COND` conditional tree, which the C++ compilers can turn into jump
tables.

This enables all XiangShan configurations from RTLMeter to now build with GCC,
so in this patch we enabled those in the nightly runs.
2025-06-16 23:14:24 +01:00
Wilson Snyder 4990b44120 Fix trace hierarchicalName runtime errors (#5668) (#6076). 2025-06-10 20:17:32 -04:00
Paul Swirhun ac06b6fc4f
Fix streaming operator packing order (#5903) (#6077) 2025-06-10 17:23:16 -04:00
Todd Strader d9534ec626
Fix x assign vs init randomization (#6075) 2025-06-09 17:59:01 -04:00
Todd Strader 4b041c636f
Fix --x-initial and --x-assign random stability (#2662) (#5958) (#6018) (#6025) 2025-05-27 09:31:55 -04:00
Wilson Snyder af30436357 Internals: Rename VL_PACK/VL_UNPACK in prep for future fix. No functional change intended. 2025-05-22 06:54:16 -04:00
Wilson Snyder 7b2dc46399 Commentary: Changes update 2025-05-22 06:45:39 -04:00
Ryszard Rozak 2491f25da7
Add filtering type option in verilator_coverage (#6030) 2025-05-22 02:42:09 -07:00
Wilson Snyder de08655c5b Internals: Fix some legacy casts. No functional change. 2025-05-20 22:51:54 -04:00
github action a227aad13d Apply 'make format' 2025-05-20 23:46:57 +00:00
Joel Bodenmann 80ea173390
Add missing FreeBSD include (#6027) (#6028)
Fixes #6027
2025-05-20 16:46:07 -07:00
Wilson Snyder 640339ec36 Revert 'Fix --x-initial and --x-assign random stability (#2662) (#5958).' See (#6018).
Reverts 4581023805 plus line in Changes file
2025-05-17 20:27:03 -04:00
Wilson Snyder 1bcd5ee0c1 Fix spelling 2025-05-16 19:02:19 -04:00
Todd Strader 4581023805
Fix --x-initial and --x-assign random stability (#2662) (#5958) 2025-05-16 13:54:51 -04:00
Dominick Grochowina 295fae0edc
Fix nullptr segfault in VerilatedVcd::emitTimeChange() (#5980) 2025-05-11 08:01:13 -04:00
Wilson Snyder 7191a0ba8b Internals: Favor preincrements. No functional change. 2025-05-09 21:20:35 -04:00
Yilou Wang a80aa07de6
Support constrained random for associative arrays (#5985) (#5986) 2025-05-07 07:07:16 -04:00
Bartłomiej Chmiel d6e52b9400
Support profiling nested hierarchical mtasks with verilator_gantt (#5956) 2025-04-24 07:50:07 -04:00
Yilou Wang e0fdb933a0
Support constraint random for StructArray (#5805) (#5937) 2025-04-16 07:08:46 -04:00
github action e3e8f18a4e Apply 'make format' 2025-04-15 01:41:13 +00:00
Brian Li 50d7f2afc6
Support assigning unpacked arrays to queues (#5924) (#5928) 2025-04-14 21:40:17 -04:00
Wilson Snyder 174eafd74c Update libfst from upstream 2025-04-12 18:10:40 -04:00
Bartłomiej Chmiel 84f26ed3d7
Add visualization of multi-threaded waiting time with verilator_gantt (#5929) 2025-04-10 10:03:58 -04:00
Wilson Snyder e12b971ba6 Optimize SAIF writes (#5916) 2025-04-05 15:09:32 -04:00
Wilson Snyder 34a760b75b Optimize duplicate timestamps out of traces (#4686) 2025-04-05 14:19:58 -04:00
Wilson Snyder 0984fd045f Change `--trace` to `--trace-vcd`. 2025-04-05 10:46:39 -04:00
Mateusz Gancarz e4771dac7f
In SAIF dumps include signals with TC 0 (#5914) 2025-04-03 16:25:10 -04:00
Wilson Snyder 6d1e82b908
Add numactl-like automatic assignment of processor affinity (#5911) 2025-04-02 08:27:23 -04:00
Wilson Snyder 538f39edf9 Fix grammar. 2025-04-01 07:54:56 -04:00
Wilson Snyder 21229e0350 Update libfst from upstream (gtkwave/libfst#12) 2025-03-30 11:10:38 -04:00
Wilson Snyder f29eeecee7 Fix process comparisons (#5896). 2025-03-29 07:16:54 -04:00
Wilson Snyder 9b48cc33db Fix process comparisons (#5896). 2025-03-28 22:40:21 -04:00
Wilson Snyder ed1e3ec4a2 Internals: Fix some clang-tidy issues. No functional change. 2025-03-27 21:21:37 -04:00
Wilson Snyder 98b89d0f2c Fix some cppcheck warnings. No functional change intended. 2025-03-27 19:46:59 -04:00
Wilson Snyder 5e69faff46 Fix clang 20 warnings 2025-03-27 19:01:25 -04:00
Wilson Snyder 40acac1c57 Fix queue accessing past end (Clang 20 GLIBC warning) 2025-03-27 19:00:43 -04:00
Bartłomiej Chmiel 8965401d10
Fix PGO profiling for multi-threaded hierarchical scenarios (#5888) 2025-03-27 11:10:48 -04:00
Wilson Snyder ce058cc432 Fix `$fscanf` not returning -1 on EOF (#5881). 2025-03-25 08:28:36 -04:00
Bartłomiej Chmiel fabded95df
Support multi-thread hierarchical simulation (#2583) (#5871) 2025-03-24 18:39:29 -04:00
Wilson Snyder 464e19caaa Tests: Fix ubuntu24.04-arm issues 2025-03-22 16:55:53 -04:00
Wilson Snyder c508fd5d24 Internals: Remove single-statement braces. No functional change. 2025-03-19 22:55:11 -04:00
Geza Lore 59cb53cfbc
Set trigger vector in whole words (#5857)
Having many triggers still hits a bottleneck in LLVM leading to long
compile times.

Instead of setting triggers bit-wise, set them as a whole 64-bit word
when possible. This improves C++ compile times by ~4x on some large
designs and has minor run-time performance benefit.
2025-03-14 14:06:51 +00:00
Geza Lore aca3b1636a Remove unused gtkwave/wavealloca.h 2025-03-13 14:43:35 +00:00
Geza Lore 51a97ccb90
Update libfst from upstream (#5855)
Ignore whitespace if comparing this change.
2025-03-13 07:24:47 -04:00
Gilberto Abram 4dbb066b96
Fix removal of callbacks no longer in current list (#5851) (#5852) 2025-03-11 17:44:12 -04:00
Yilou Wang 7fe51583e5
Fix foreach of assocArr inside a constraint block (#5727) (#5841) 2025-03-11 13:32:34 -04:00
Mateusz Gancarz 9b4509f7d9
Add `--trace-saif` for SAIF power traces (#5812) 2025-03-07 10:41:29 -05:00
Wilson Snyder 258becd179 Add empty veriuser.h for legacy compatibility. 2025-03-04 21:25:28 -05:00
Yilou Wang dae4c8ee22
Support constrained random for arrays in structs (#5765) (#5802) 2025-02-24 17:51:51 -05:00
Wilson Snyder fe15171649 Internals: cppcheck cleanups. No functional change. 2025-02-18 01:14:51 -05:00
Trung Nguyen aa3942ab24
Internals: `constexpr` for `VlUnpacked` data access (#5725) (#5770)
Add `constexpr` to data access functions of `VlUnpacked` whose `std::array` equivalent in C++14 is `constexpr`.
2025-02-09 22:45:50 -05:00
Moubarak Jeje ac659d525b
Support VPI array accessors (#5612) 2025-02-07 19:06:46 -05:00
Moubarak Jeje 5b65c15eca
Internals: Add datap cast functions (#5761) 2025-02-05 15:29:54 -05:00
Yilou Wang 6b4183632c
Support Unpacked Structures' Constrained Randomization (#5657) (#5759) 2025-02-03 11:56:00 -05:00
Wilson Snyder 28a59a2b21 Update gtkwave from upstream. 2025-01-11 12:16:46 -05:00
Yilou Wang d3e205f201
Support constraints on associative array user-defined keys (#5671) (#5729) 2025-01-11 12:07:52 -05:00
github action bb871728c9 Apply 'make format' 2025-01-10 00:05:16 +00:00
Krzysztof Starecki 69dce205d3
Support multidimensional array access via VPI (#2812) (#5573) 2025-01-09 19:04:26 -05:00
Yilou Wang 0380a36c76
Fix constrained random for > 64-bit associative arrays (#5670) (#5682) 2025-01-09 08:33:38 -05:00
Andrew Nolte b8288b97f7
Improve VPI write errors (#5712) 2025-01-06 17:56:18 -05:00
Wilson Snyder 8ca49d98c1 Fix %p format output for real inside struct (#5713). 2025-01-03 19:15:03 -05:00
Wilson Snyder f5e2f60dcc Update include/gtkwave from upstream 2025-01-01 08:40:49 -05:00
Wilson Snyder 8fbb725f34 Copyright year update. 2025-01-01 08:30:25 -05:00
Wilson Snyder 8a121803f5 Add configure CFG_CXX_VERSION 2024-12-19 20:56:47 -05:00
Yilou Wang 54ef9ad31c
Support associative array basic constrained randomization (#5658) (#5670) 2024-12-12 11:31:54 -05:00
Wilson Snyder 6e204ed0dd Internals: Cleanup 'error error' on fatals 2024-12-11 08:52:41 -05:00
Wilson Snyder b0f898cec8 Internals: Determine needing verilated_std without symbol table 2024-12-01 11:35:00 -05:00
Wilson Snyder 0c820c3068 Internals: Standardize template argument names. No functional change. 2024-11-29 20:20:38 -05:00
Wilson Snyder 990ccd6763 Internals: Standardize on `template<typename`. No functional change. 2024-11-29 18:01:50 -05:00
Ryszard Rozak 5470cf9fa9
Support randomize size constraints with restrictions (#5582 partial) (#5611) 2024-11-15 10:45:06 -05:00
Tom Manner c98744b914
Internals: Fix `VerilatedContext::randSeed` comments (#5609) 2024-11-14 11:07:23 -05:00
Wilson Snyder 3ffea76e11 Add `--no-std-waiver` and default reading of standard lint waivers file (#5607). 2024-11-12 22:11:19 -05:00
Krzysztof Starecki 1d06364284
Support vpiDefName (#5572) 2024-11-12 11:28:39 -05:00
Yilou Wang a173883b2d
Support basic constrained random for multi-dimensional dynamic array and queue (#5591) 2024-11-08 14:04:58 -05:00
Wilson Snyder 9689a4f58a Internals: Support VL_UNREACHABLE in C++23/MSVC. No functional change intended. 2024-10-31 21:29:13 -04: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
Wilson Snyder 36888fac5d Fix long module names crashing string handling (#5546). 2024-10-22 09:25:58 -04:00
Krzysztof Boroński 7ccc93d9df
Fix reduction methods for verilated types (#5542) 2024-10-18 19:51:44 -04:00
Yilou Wang c05c48aaf3
Support unpacked array Constrained Randomization (#5437) (#5489) 2024-10-02 10:29:47 -04:00
Wilson Snyder 48faf8d036 Fix tracing when name() is empty (#5470). 2024-09-21 08:25:14 -04:00
Wilson Snyder 0fe8c73d19 Fix `$fatal` to not be affected by `+verilator+error+limit` (#5135). 2024-09-13 20:45:44 -04:00
Wilson Snyder 521c5c2f75 Fix extra events in traces (#5405). 2024-09-10 19:14:52 -04:00
Wilson Snyder 3525484730 Commentary 2024-09-10 19:04:55 -04:00
Arkadiusz Kozdra 4a58997604
Support basic constrained queue randomization (#5413)
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-09-10 09:33:14 -04:00
Wilson Snyder 7b41d2046d Fix GTKWave clang 18 warning 2024-09-07 10:12:09 -04:00
Wilson Snyder e4ff0909dc Tests: Misc test cleanups from Python branch. 2024-09-03 21:42:06 -04:00
Wilson Snyder 7a74ddc1af Internals: Fix some getter/setter ordering. No functional change intended. 2024-09-02 18:48:49 -04:00
Krzysztof Bieganski 088862d449
Support appending to queue via `[]` (#5421) 2024-09-02 09:45:47 -04:00
github action e9f758ce67 Apply 'make format' 2024-09-02 01:13:41 +00:00
Wilson Snyder df594ee430 Tests: Fix ll scan test. 2024-09-01 20:59:42 -04:00
Arkadiusz Kozdra 5cb6f370e9
Internals: Emit rand constraint right away. No functional change intended. (#5409)
This change gets rid of most of the shared pointers and useless memory
allocations.  Also takes advantage of higher-arity bvxor/concat to
reduce amount of data sent to the solver.

Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-08-28 16:11:39 +02:00