Commit Graph

9925 Commits

Author SHA1 Message Date
Geza Lore fcc7acbfc6
CI: Factor out artifact based caching as a reusable action (#7883) 2026-07-06 14:16:06 +01:00
Geza Lore bf4c72f93b
CI: Squash macos brew warning (#7881) 2026-07-06 11:43:55 +01:00
Geza Lore c78a342bdc CI: Don't Python make venv on cache hit 2026-07-06 11:30:59 +01:00
Geza Lore c2ed0aab00
CI: Use ci-install.bash for lint-py dependencies (#7880) 2026-07-06 11:27:58 +01:00
Geza Lore 5563b3b6f8
CI: Cache Python venv (#7879)
This is smallish and mostly static, should cache well, avoid setup cost.
2026-07-06 11:03:35 +01:00
Geza Lore 5750c888a6
CI: Improve ccache handling in build and test jobs (#7874)
Cache key isolation: Include the build flavour (ccwarn/asan/gcov) in the
build ccache key, so the coverage (gcov), asan, and RTLMeter
(ccwarn-off) configurations no longer share and thrash the single
'<runs-on>-<cc>' bucket, nor warm-start from each other's (near-useless)
caches.

Prune stale entries instead of a fixed size cap: After building/testing,
evict ccache entries this run did not touch (--evict-older-than, based
on the run's own duration).  This bounds the saved cache to the current
working set, so CCACHE_MAXSIZE and CCACHE_LIMIT_MULTIPLE are no longer
needed and are removed (ccache falls back to its 5G default ceiling, but
is realistically much smaller).

ccache configuration:
- Drop CCACHE_COMPRESS (already the default in ccache 4.x).
- Add CCACHE_COMPILERCHECK=content, so a changed compiler mtime on a rebuilt
  ephemeral runner image does not invalidate the whole restored cache.
- Hoist all ccache-related variables (CACHE_BASE_KEY, CCACHE_*, CXX) to the
  workflow-level env.

Remove dead ccache scaffolding:
- reusable-lint-py: the job never compiles or caches; drop its ccache env.
- reusable-rtlmeter-run: remove the disabled persistent-cache step and its
  storage variables; keep CCACHE_DISABLE=1, since caching must stay off to
  keep RTLMeter timings representative.

Store test job ccache as artifacts for reuse
2026-07-06 01:44:32 +01:00
Geza Lore 8b564f509b CI: Remove macos-15 gcc job
On macOS, gcc is an alias for clang, so this job was effectively the
same as the clang job.
2026-07-05 21:18:36 +01:00
Geza Lore c7c778f109 CI: Improve Pages job
Code coverage and RTLMeter complete (concluding 'skipped') on branch
pushes where they do no work, and each completion fires the Pages
workflow_run trigger. Rebuilding and redeploying master's pages for
these no-op events is wasteful.

Gate the build job so a workflow_run whose upstream conclusion is
'skipped' does nothing; deploy and notify need build, so they
cascade-skip.

Route such no-op runs to their own throwaway concurrency group. In the
shared 'pages' group they would, as the newest queued run, cancel a
pending real run and then deploy nothing (concurrency keeps only the
in-progress and newest pending run). Real runs keep sharing 'pages' and
serialize as before.

Add retry to deploy step to reduce flakyness due to the Pages back end.

Fix trigger on workflow file changes.
2026-07-05 21:11:45 +01:00
Geza Lore cbd78e689c
CI: Cleanup Windows build (#7873)
The Windows build never actually used ccache; the '.ccache' directory
only ever held the win_flex_bison install, and cmake/MSVC did no compiler
caching. Clean this up:

- Drop the CCACHE_* environment variables from the job (meaningless here).
- Store win_flex_bison in a dedicated 'win_flex_bison' directory instead of
  the misleadingly named '.ccache', and cache just that (static key, as it
  is a fixed third-party tool).
- Set WIN_FLEX_BISON inside ci-win-compile.ps1 as an absolute path, rather
  than in the workflow, making the script self-contained.
- Use the runner's processor count for build parallelism instead of a fixed
  '-j 3', in both ci-win-compile.ps1 and ci-win-test.ps1.
- Remove the verilator-win.zip archive and upload steps; nothing consumes
  that artifact.
- Build Verilator with the Ninja generator from an MSVC developer shell
  instead of MSBuild. MSBuild only parallelizes across projects, and
  Verilator is a single project, so it compiled serially; Ninja keeps all
  cores busy. Also compile with /Od: this job only checks that Verilator
  builds and can verilate an example, so an optimized binary is not needed
  and the otherwise-dominant optimizer time is wasted.
2026-07-05 19:15:09 +01:00
Geza Lore 8d0c75171c
CI: Unify regression and RTLMeter build jobs to one (#7872)
- Merge reusable-rtlmeter-build.yml into reusable-build.yml, selected by
  an 'install' flag: archive the installed Verilator for RTLMeter, or
  the whole repository tree for the test jobs.
- Align reusable-test.yml input arguments with  reusable-build.yml
- Pass build/test options as booleans instead of 0/1.
- Inline the single-entry build matrices, and hoist matrix keys that are
  constant across a job.
2026-07-05 18:52:55 +01:00
Geza Lore 6e06cd18da
CI: Decouple build and test into separate scripts, simplify workflows (#7871)
- Split the monolithic ci-script.bash into ci-build.bash and
  ci-test.bash, with shared setup in ci-common.bash.
- Pass job parameters as explicit command-line options rather than
  environment variables (--compiler, --prefix, --suite, --asan,
  --gcov, --reloc, --ccwarn).
- Detect the host OS and distribution at runtime (uname,
  /etc/os-release) instead of the legacy Travis-era CI_OS_NAME,
  CI_RUNS_ON and CI_BUILD_STAGE_NAME variables.
- Remove dead code: FreeBSD support, Windows wavediff install, the
  unused CI_COMMIT variable, and various redundant operations.
- Inline the single-entry build-job matrices.
- Rename osx to macOS
- Refuse to run these ci scripts outside GitHub Actions to protect
  developer checkouts.
2026-07-05 15:46:30 +01:00
Geza Lore 198cce29ba
CI: Restore relocation testing (#7870)
PR #7776 removed Ubuntu 22.04 clang from the test matrix, which was the
only one testing the relocation of an installation. Add back under
Ubuntu 24.04 clang.
2026-07-05 14:26:30 +01:00
Geza Lore a518efbedb
Internals: Prepare V3DfgBreakCycles to support multi-dimensional arrays (#7867)
This is prep for more array support later. Minor functional improvement
for tracing arrays, but no meaningful change.
2026-07-05 11:40:08 +01:00
Geza Lore 13236822d3
CI: Use faster zstd for repo archives (#7868) 2026-07-05 09:24:33 +01:00
Geza Lore 2285e5b6da
Optimize more always blocks in Dfg (#7775)
Optimize always blocks that:
- drive an unused variable (so logic can be pruned)
- write only a single variable (regardless of CFG size)
2026-07-05 09:24:01 +01:00
Geza Lore 1bab793c75 CI: Fix deleting pr notifications after multiple reruns 2026-07-04 22:46:19 +01:00
Geza Lore 566f4e6efc
Internals: Add new VL_RESTORER flavours (#7866)
Restrict VL_RESTORER to be usable only with trivially copyable types.
Introduce VL_RESTORER_COPY and VL_RESTORER_CLEAR, which are more
efficient versions usable for non trivially copyable types.

VL_RESTORER_COPY semantically behaves the same as VL_RESTORER, but only
does one copy at initialization, and on scope exit restores via a move.

VL_RESTORER_CLEAR swaps the variable with an new one constructed via
the no-args constructor (e.g. empty collection), which does not require
any copying at any point.

Static assertions enforce picking one of the new flavours when copying
might be expensive.
2026-07-04 17:27:07 +01:00
Wilson Snyder 83eb54ec7e Fix wild compare operators on strings 2026-07-04 11:05:34 -04:00
Wilson Snyder f82f59a024 Commentary: Changes update 2026-07-03 13:01:05 -04:00
Wilson Snyder 12fab5d5d7 Tests: Cleanup some cross-simulator test differences 2026-07-03 13:00:23 -04:00
Pawel Klopotek 7ece66d06e
Fix unique0 case side effects (#7787) 2026-07-03 12:49:21 -04:00
Eryk Szpotański a64234e897
Add comments as a branch description in coverage .info files (#7843)
Signed-off-by: Eryk Szpotanski <eszpotanski@antmicro.com>
2026-07-03 11:18:29 -04:00
Dragon-Git 58bd13b623
Fix heap-use-after-free in `VlRNG::VlRNG()` (#7865) 2026-07-03 06:38:48 -04:00
Pawel Kojma b97df914dd
Fix clang++ ambiguous overload of '==' operator (#7863) 2026-07-03 06:37:48 -04:00
Geza Lore 0e371d6e5c Fix cleaning purity cache after assertions 2026-07-02 17:47:09 +01:00
Geza Lore 1106e89c84 Optimize random initialization
Fetching a thread-local is relatively expensive. Random initializing
wides used to do it once or twice per word, and on short runs for
large designs can be noticeably expensive, so fetch once per variable
instead. Also remove unused VL_RAND_RESET_{Q,W} functions.
2026-07-02 16:38:14 +01:00
Jakub Michalski 506f703da5
Internals: Remove unused variables in verilated_funcs.h (#7862)
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
2026-07-02 07:16:42 -04:00
Jakub Michalski 853ee5df17
Fix DFG misoptimizing bound checks (#7755)
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
2026-07-02 11:33:38 +01:00
Wilson Snyder 964474837f Commentary 2026-07-01 19:37:12 -04:00
Wilson Snyder ce4be92a67 devel release 2026-07-01 18:31:23 -04:00
Wilson Snyder 848d926ebd Version bump 2026-07-01 18:27:54 -04:00
Wilson Snyder bb9cad507f Commentary: Changes update 2026-07-01 18:27:54 -04:00
github action 9c655d379a Apply 'make format' [ci skip] 2026-07-01 19:59:37 +00:00
Sergey Chusov 1ea10ba71c
Fix class scope '::' reference through an inherited type parameter (#7844) 2026-07-01 15:58:35 -04:00
Wilson Snyder 6b3e2ce971 Commentary: Changes update 2026-06-29 22:00:10 -04:00
dependabot[bot] e80329a57b
CI: Bump actions/cache from 5.0.5 to 6.1.0 in the everything group (#7854) 2026-06-29 11:03:22 -04:00
github action 514fa120f5 Apply 'make format' [ci skip] 2026-06-29 14:58:00 +00:00
Joshua Leahy cf7e3f791a
Fix covergroups without --coverage (#7848) (#7849)
Fixes #7848.
2026-06-29 10:56:59 -04:00
Wilson Snyder 276f2f344d Commentary: Changes update 2026-06-28 16:15:54 -04:00
Wilson Snyder 6006f91e2e Tests: Add t_queue_array (#6921 test) 2026-06-28 16:07:37 -04:00
Wilson Snyder c4f63583bc Tests: Fix t_cover_expr_fork data location 2026-06-28 15:40:10 -04:00
Wilson Snyder 657d5f6abf Tests: Add t_initial_dlyass2 (#5210).
Fixes #5210. (Confirms fixed in master earlier).
2026-06-28 15:34:50 -04:00
Wilson Snyder 9448e4366c Fix MSVC warning. No functional change. 2026-06-28 09:47:53 -04:00
Nick Brereton 59b85f670b
Fix constant pool recache after dead scope removal (#7845) 2026-06-28 09:30:48 -04:00
Matthew Ballance d023b3b075
Support dynamic loading of VPI extensions (#7727) 2026-06-28 09:28:09 -04:00
Yilou Wang 3853301367
Fix disable iff ignored when its condition is held continuously true (#7841) 2026-06-26 06:00:44 -04:00
Geza Lore 2d157b29b0 Optimize assetOn checks furter 2026-06-25 20:12:49 +01:00
Yilou Wang f0f1c44dd6
Fix object randomization skipped by an unrelated global constraint (#7833) (#7838)
Fixes #7833.
2026-06-25 09:30:05 -04:00
Geza Lore b73a897db3
Optimize module inlining heuristic (#7837)
Rewrite module inlining decision to be based on a bipartite Module/Cell
graph, similar to V3InlineCFuncs. Preserved all old heuristics, but
added 2 new ones:

- If a module, and all the sub-hierarchy below it, is less than 10% the
  total flattened size of the design, then flatten the contents of that
  module (but the module itself is not necessarily inlined).

- If the flattened size of all instances of a module is less than 20% of
  the total flattened size of the design, then inline all instances of
  that module.

These are both relative to the total size of the design, so they
auto-scale with complexity. The net effect is that large shared
instances are preserved, but their contents are flattened out. E.g. in a
multi-core CPU this would keep the cores non-inlined but flatten out
most everything else. This still enables V3Combining and sharing those
later, but avoids potentially big overheads e.g. with small widely used
library modules.

Empirically this yields less generated C++ than the previous version
(due to removing lots of small functions), and can improve performance
10-20% while still having meaningful combining relative to the size of
the design.
2026-06-25 14:14:15 +01:00
Yilou Wang 000afcf52d
Support variable-length intersect in SVA sequences (#7835) 2026-06-25 04:41:53 -07:00