Commit Graph

28 Commits

Author SHA1 Message Date
Geza Lore da1bca5c9b
CI: Add BlackParrot to RTLMeter runs (#6615) 2025-10-30 20:34:31 +00:00
Geza Lore 1f04cd868c
CI: Run some RTLMeter cases with --hierarchical (#6605) 2025-10-28 20:48:08 -04:00
dependabot[bot] 151b17ac82
CI: Bump actions/upload-artifact from 4 to 5 (#6600) 2025-10-27 13:46:11 -04:00
dependabot[bot] fafe3737a2
CI: Bump actions/download-artifact from 5 to 6 (#6599) 2025-10-27 13:04:36 -04:00
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
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
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] 2a09114dc7
Bump actions/download-artifact from 4 to 5 (#6367) 2025-09-03 18:50:12 -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 b0044da8a7
Internals: Upload published nightly RTLMeter results artifact (#6346)
First half of #6301
2025-08-30 16:08:44 +01: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
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
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
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 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