Commit Graph

145 Commits

Author SHA1 Message Date
Geza Lore 92f30dd28f
CI: Exclude 'Example' and 'hello' cases from RTLMeter PR reports (#6452)
These are too small and noisy to be useful, remove to avoid false
conclusions.
2025-09-18 13:02:37 +01:00
Geza Lore b85a482db0 CI: fix typo 2025-09-18 11:34:59 +01:00
Geza Lore 0e2f0381d0
CI: Improve and cleanup (#6448)
Chores:
- Remove ci-ccache-maint. This has never been useful and is just cruft.
- Remove then unused CI_COMMIT
- Change job names so they come out nicer in the web views
- Make os-name input to reusable-build always explicit

Improvements:
- Have at most build-test job in progress per branch
- Cancel in-progress build-test jobs on PRs
- In forks (that is, not on 'verilator/verilator'), cancel any
  in-progress build-test jobs on push to the branch
2025-09-17 20:41:29 +01:00
Geza Lore 1432bb8889 Revert "CI: Make formatting dispatch workflows on verilator/verilator"
This reverts commit 64dbd4abcc.
2025-09-17 13:53:20 +01:00
Geza Lore 64dbd4abcc CI: Make formatting dispatch workflows on verilator/verilator
Use the CI GitHub APP for authentication in the format job. This should
correctly trigger workflows after the push of the formatting.
2025-09-17 12:57:26 +01:00
dependabot[bot] a8d70c6edf
Bump actions/create-github-app-token from 2.1.1 to 2.1.4 (#6435) 2025-09-16 07:20:46 -04:00
Geza Lore d3aab31bcf
CI: Report RTLMeter performance numbers for all runs in PR comment (#6415) 2025-09-10 18:18:23 +01:00
Geza Lore 77e5bb9ec9
CI: Run 24.04 clang build/test with --enable-asan (#6408) 2025-09-09 15:15:29 +01:00
Wilson Snyder 72acb2edfd CI: rename workflow for consistency 2025-09-07 16:29:29 -04:00
Wilson Snyder f67534069c
CI: Avoid man page builds (#6402) 2025-09-07 13:32:34 -04:00
dependabot[bot] 319ab84f90
Bump actions/checkout from 4 to 5 (#6374) 2025-09-04 08:21:26 -04:00
dependabot[bot] e3acd528d8
Bump actions/create-github-app-token from 2.0.6 to 2.1.1 (#6375) 2025-09-04 06:21:48 -04:00
dependabot[bot] 43a03b1660
Bump docker/metadata-action from 4 to 5 (#6376) 2025-09-04 06:21:14 -04:00
Wilson Snyder 1ceda731e5 CI: Avoid duplicate action runs on dependabot 2025-09-03 18:54:27 -04:00
dependabot[bot] fcebac6b16
Bump docker/setup-buildx-action from 2 to 3 (#6372) 2025-09-03 18:50:58 -04:00
dependabot[bot] 1158842b7e
Bump docker/login-action from 2 to 3 (#6368) 2025-09-03 18:50:33 -04:00
dependabot[bot] 2a09114dc7
Bump actions/download-artifact from 4 to 5 (#6367) 2025-09-03 18:50:12 -04:00
dependabot[bot] d95e4dc150
Bump docker/setup-qemu-action from 2 to 3 (#6366) 2025-09-03 18:49:54 -04:00
dependabot[bot] 17f29b41c2
Bump docker/build-push-action from 4 to 6 (#6365) 2025-09-03 18:49:34 -04:00
Wilson Snyder 1e4ede08b6
CI: Put all OS builds into build-deploy workflow, add passed job (#6358) 2025-09-03 06:32:10 -04:00
Geza Lore 68ce45f203
Internals: Post RTLMeter metrics in PR comment (#6349)
Fixes #6301
2025-08-31 20:52:43 +01:00
Geza Lore 5bdc9abd2f Internals: Use Verilator CI App in 'RTLMeter PR results' 2025-08-31 18:17:40 +01:00
Lan Zongwei c03cb9d9c2
CI: introduce osx-build github workflow (#6352). 2025-08-31 12:58:05 -04:00
Geza Lore 34e3892367 Internals: Add 'RTLMeter PR results' workflow v3 2025-08-31 17:00:57 +01:00
Geza Lore 8ac8c64885 Internals: Add 'RTLMeter PR results' workflow v2 2025-08-31 16:01:58 +01:00
Geza Lore 7ac610a3cb Internals: Add 'RTLMeter PR results' workflow
Workflows triggered for a PR from a fork can never have write
permissions, so to post a comment on a PR, it must be done from a
separate workflow triggered by 'workflow_run' in the main repository.
2025-08-31 15:06:50 +01:00
Geza Lore b0044da8a7
Internals: Upload published nightly RTLMeter results artifact (#6346)
First half of #6301
2025-08-30 16:08:44 +01:00
Wilson Snyder ac2859bf24
Internals: Upgrade to clang-format-18 (#6333) 2025-08-25 20:47:48 -04:00
Wilson Snyder 1eccfa64b5 Commentary 2025-08-08 17:54:48 -04:00
Geza Lore dbb8cbece2 CI: Improve RTLMeter failure issue body (#6275) 2025-08-08 09:13:29 +01:00
Geza Lore 9ddbf5f4b8 CI: Only raise RTLMeter failure issue on failure 2025-08-08 08:07:55 +01:00
Geza Lore b2388faa5e
CI: Add running RTLMeter workflow on selective PRs (#6271)
Runs RTLMeter on PRs if the PR has the 'pr: rtlmeter' label applied to
it. This should make it easy to selectively require the RTLMeter
workflows to pass on a PR that is potentially invasive, per our own
judgement.
2025-08-07 19:30:43 +01:00
Geza Lore 188a12f609
CI: Add raising GitHub issue on failure of scheduled RTLMeter job (#6270) 2025-08-07 18:17:00 +01:00
Wilson Snyder 7bb790f7e4 CI: Proactively use windows-2025 2025-08-01 12:05:53 -04:00
Tobias Rosenkranz 92970bd9a0
Update docker base image to Ubuntu 24.04 (#6147) 2025-07-03 15:29:03 -04:00
Geza Lore bc892deacc
Safely support non-overlapping blocking/non-blocking assignments (#6137)
The manual for the BLKANDNBLK warning describes that it is safe to
disable that error if the updated ranges are non-overlapping. This
however was not true (see the added t_nba_mixed_update* tests).

In this patch we change V3Delayed to use a new ShadowVarMasked
scheme for variables that have mixed blocking and non-blocking 
updates (or the FlagUnique scheme for unpacked variables), which
is in fact safe to use when the updated parts are non-overlapping.

Furthermore, mixed assignments are safe as far as scheduling is
concerned if either:

- They are to independent parts (bits/members/etc) (with this patch)
- Or if the blocking assignment is in clocked (or suspendable) logic.

The risk in scheduling is a race between the Post scheduled NBA
commit, and blocking assignments in combinational logic, which might
order incorrectly.

The second point highlights that we can handle stuff like this safely,
which is sometimes used in testbenches:

```systemverilog
always @(posedge clk) begin
    if ($time == 0) a = 0;
end

always @(posedge clk) begin
    if ($time > 0) a <= 2;
end
````

The only dangerous case is:

```systemverilog
always @(posedge clk) foo[idx] <= val;
assign foo[0] = bar;
```

Whit this patch, this will still resolve fine at run-time if 'idx' is
never zero, but might resolve incorrectly if 'idx' is zero.

With the above in mind, the BLKANDNBLK warning is now only issued if:

- We can't prove that the assignments are to non-overlapping bits
- And the blocking assignment is in combinational logic

These are the cases that genuinely require user attention to resolve.

With this patch, there are no more BLKANDNBLK warnings in the RTLMeter
designs.

Fixes #6122.
2025-06-28 20:45:45 +01:00
Wilson Snyder 993f65f3b4 Internals/CI: Format cmakefiles using mbake 2025-06-26 17:36:56 -04:00
Geza Lore 818e6d3ebf Disable Vortex:sane:sgem pending fix
This design has a BLKANDNBLK warning which might or might not cause
problems depending on how the ordering ended up. See #6122.
2025-06-26 10:57:51 +01:00
Wilson Snyder 88d0d85ca6 Internals: Apply format-yaml. No functional change. 2025-06-24 18:29:38 -04:00
Wilson Snyder 5b410e9331
CI: Add actor to help cancel-in-progress group (#6097) 2025-06-16 17:44:06 -07: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
Geza Lore 07394fcafa
Automatically publish scheduled RTLMeter results (#6074)
Update RTLMeter workflow to automatically push the performance numbers
from scheduled (nightly) runs to verilator/verilator-rtlmeter-results
2025-06-10 13:06:05 +01:00
Geza Lore f74c67da46
CI: Add variable to explicitly enable some GitHub workflows (#6021)
To run scheduled instances of the RTLMeter or coverage workflows, the
ENABLE_SCHEDULED_JOBS variable must explicitly be set to 'true' in the
repository settings. This enables each fork to decide whether to run the
scheduled instances or not.
2025-05-18 21:13:37 -04:00
Wilson Snyder 3dfd53a549 CI: Move coverage + contributor actions to 24.04 2025-05-13 22:21:21 -04:00
Wilson Snyder aee5051526 CI: Reduce action permissions per best practices 2025-05-11 17:43:48 -04:00
Geza Lore 223bb9ba9a
Fix streaming to/from packed arrays (#5976)
bug from 6bb57e4630

Fixes RTLMeter OpenTitan. Fixes #5955.
2025-05-04 19:28:51 +01:00
Geza Lore 6ac2aa2d99
Add RTLMeter GitHub workflows (#5948)
Add the GitHub Actions workflows for running RTLMeter.

Runs start daily, at 02:00 UTC, on ubuntu-24.04. There are 2 runs:
- Using GCC, with default verilator options
- Using Clang, with "--threads 4"

Each run uses a maximum of 2 runners in parallel (so max 4 in total),
and takes slightly over 2 hours to complete.

The jobs will fail if a benchmark is broken, so this already serves as a
regression test for the included designs.

For now, performance metrics are recorded as artefacts of the run but
not otherwise published.

Performance metrics are always recorded for all successful jobs, even if
some cases are failing.
2025-04-19 15:42:33 +01:00
Wilson Snyder 3ecd58460f Internals: Apply make format-json format-yaml. No functional change. 2025-04-16 07:34:57 -04:00
Wilson Snyder e6a997e316
CI: Use reusable workflow, so tests start after build (#5901) 2025-03-29 15:09:32 -04:00
Wilson Snyder 610b2e75af CI: Add vltmt-2 to bring longpath test time down 2025-03-29 06:54:30 -04:00