Commit Graph

129 Commits

Author SHA1 Message Date
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 6f87443da5 Commentary 2025-03-30 11:02:21 -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
Luca Colagrande b9a571916c
ci: Enable manual Docker image build and push (#5885) 2025-03-26 09:46:36 -04:00
Wilson Snyder b54f897090
Tests: Fix Ubuntu24.04 clang test issues, and enable action (#5824) 2025-03-02 16:53:59 -05:00
Wilson Snyder d31bce915c
Actions: Turn off Ubuntu 20.04 (#5774) (#5823) 2025-03-02 12:33:36 -05:00
Wilson Snyder 951f5eaa82 Commentary 2025-01-02 08:09:02 -05:00
Wilson Snyder 3a69dd4a43 Commentary 2025-01-02 08:07:57 -05:00
Wilson Snyder 99a29acca0 CI: One-time yamlfix cleanups. No functional change intended. 2024-09-15 14:37:09 -04:00
Wilson Snyder 07bb8c701d
Convert test driver to Python (#5427) 2024-09-08 13:00:03 -04:00
Wilson Snyder b21117091b CI: Add Ubuntu 24.04 GCC; combine reloc with GCC-10 runs 2024-09-07 13:43:47 -04:00
Wilson Snyder 8707c88787 Tests: Close misc internal code coverage holes 2024-07-28 14:18:24 -04:00
Wilson Snyder 7f40dd8b5b CI: Fix codecov upload 2024-07-28 13:58:26 -04:00
Wilson Snyder 216fc8a212 CI: Fix codecov upload 2024-07-27 07:18:50 -04:00
Wilson Snyder 5136ea1082 CI: Fix codecov upload 2024-07-27 07:02:18 -04:00
Wilson Snyder 5b931faf2b CI: Fix codecov upload 2024-07-27 06:31:20 -04:00
Wilson Snyder a2496e041e CI: Change to action-based codecov upload 2024-07-26 14:07:53 -04:00
Wilson Snyder 550d47b7f4 CI: Change to action-based codecov upload 2024-07-26 10:27:00 -04:00
Wilson Snyder 83878325a7 Commentary: Update git issue templates. 2024-07-08 08:12:58 -04:00
Wilson Snyder 94f789b677 Update issue template 2024-05-18 17:41:36 -04:00
Wilson Snyder 953249aa43 CI: Add dist-vlt-3 to avoid out of disk space 2024-03-12 07:49:01 -04:00
Geza Lore f56f318217
Make installation relocatable, and the installation testable (#4927)
Fixes #4893
2024-03-01 00:08:28 +00:00
Wilson Snyder 6f92c9c974
CI: Update upload-artifacts/download-artifacts version (#4875) 2024-02-04 10:29:34 -05:00
Wilson Snyder f0d010d9c5
Github: Update actions (#4852) 2024-01-22 22:32:00 -05:00
Wilson Snyder 3eaed3b6f5
Remove deprecated 32-bit pointer mode (#4791). 2024-01-01 10:16:48 -05:00
Wilson Snyder 9882c4c761 Github: Commentary 2023-12-24 10:35:12 -05:00
Wilson Snyder 27102ea0fb
CI: Combine lint and build workflows (#4671) 2023-11-06 07:13:00 -05:00
Wilson Snyder c1c8b30a35
CI: Add lint-py action (#4640) 2023-10-30 08:02:54 -04:00
Wilson Snyder afaa02709c CI: Increase CCACHE_MAXSIZE (#4595) 2023-10-21 10:38:46 -04:00
Wilson Snyder d2c72a7f21 CI: Disable m32 runs 2023-09-25 12:30:25 -04:00
Wilson Snyder a9256d4758 CI: Disable m32 runs 2023-09-25 11:28:44 -04:00
Anthony Donlon d64c023099
CI: Cancel previous runs for pull requests automatically (#4512) 2023-09-23 11:50:05 -04:00
Jose Loyola 6c80457262
CI: Refactor docker build action to define DOCKER_HUB_NAMESPACE as repo variable (#4419) 2023-08-15 06:45:07 +02:00
Wilson Snyder 776d4e6ac2 CI: Build 20.04 on pull requests 2023-06-23 07:08:04 -04:00
Wilson Snyder ff324625e4 CI: Disable m32 on g++ 2023-05-23 23:04:24 -04:00
Wilson Snyder 607f853bc7 CI: Disable m32 on g++ 2023-05-23 22:35:07 -04:00