Commit Graph

180 Commits

Author SHA1 Message Date
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 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
Wilson Snyder 09fb1174f1 CI: Disable m32 on g++ 2023-05-23 22:34:27 -04:00
Wilson Snyder 542eaab3dd CI: Disable m32 on g++ 2023-05-23 22:28:40 -04:00
Wilson Snyder a301a498f5 CI: Disable m32 on g++ 2023-05-23 22:27:10 -04:00
Wilson Snyder c8ca54ea31 CI: Disable m32 on g++ 2023-05-23 22:24:47 -04:00
Jose Loyola d693dc85e4
Add Github action to build and push docker images (#4163) 2023-05-04 07:44:55 -04:00
Wilson Snyder c039a5229d github: Remove 18.04 2023-01-05 07:25:34 -05:00
Kritik Bhimani a86ded97c9
CI: Add ci for cmake on windows (#2681) (#3819) 2022-12-23 18:12:17 -05:00
Kamil Rakoczy 79e0fa3327
CI: Switch building pull requests to ubuntu 22.04 (#3753) 2022-11-16 10:14:12 -05:00
Wilson Snyder ca8ef7ce73 github: upload-artifacts/download-artifacts/cache@v3 (#3700) 2022-10-20 20:23:04 -04:00
Wilson Snyder 23d538fdaf github: upload-artifacts/download-artifacts/cache@v3 2022-10-20 20:04:45 -04:00
Wilson Snyder aaadc3def7 github: Use checkout@v3 (#3700) 2022-10-20 19:57:50 -04:00
Wilson Snyder 4db998d357 CI: coverage on 22.04 2022-10-01 10:09:14 -04:00
Wilson Snyder 75a70bee6d Update to clang-format-14 on Ubuntu22.04 2022-09-27 21:47:45 -04:00
Wilson Snyder 42283150d7 Actions: Use 22.04 for contrib action 2022-09-07 22:13:02 -04:00
Geza Lore c64a07fd09 CI: fix cache keys in test jobs 2022-05-30 18:35:59 +01:00
Geza Lore 694919b9d1 CI: add ubuntu-22.04 regressions 2022-05-30 18:34:41 +01:00
Krzysztof Bieganski 561eaa311d
Tests: Enable CI testing with GCC 10 (#3432)
This is a pre-PR to #3363.

Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-05-17 09:19:06 -04:00
Wilson Snyder 3b1371124e Update bug template. 2022-01-02 14:03:20 -05:00
Wilson Snyder 4184ad1921 Commentary 2021-11-23 18:27:40 -05:00
Wilson Snyder deebfa3239 Tests: Remove Ubuntu 16.04 as github removes in a month. 2021-07-25 11:22:25 -04:00
Geza Lore c75a686081
Internals: Update to clang-format-11 (#3021) 2021-06-14 14:50:40 -04:00
Geza Lore 2705715bb1 CI: set CI_M32 to 0 in coverage workflow 2021-06-14 01:30:50 +01:00
Geza Lore 208f1504fb CI: Add -m32 build 2021-06-14 00:37:59 +01:00
Geza Lore 01a54d6960 CI: Build opt and dbg together, archive whole source tree
Prep for adding more CI targets. Building dbg and opt in the same job
(as standard) simplifies caching, debugging and artifact handling. With
ccache it should not take much longer either. Also removes the need to
re-configure in the test job.
2021-06-13 22:45:57 +01:00
Geza Lore 23fc08bdf9 CI: swap order of platforms
GitHub Actions starts the jobs earlier in the list first. This change
has the effect of starting the few longer running jobs (those on ubuntu
20.04) first.
2021-06-13 22:45:57 +01:00
Geza Lore 18cabc369b CI: fix error in coverage workflow file 2021-06-13 03:16:58 +01:00
Geza Lore cd871ca79e CI: Increase cache sizes slightly 2021-06-13 03:16:56 +01:00
Geza Lore 2d2bd5b95e CI: Upload separate named artifacts, only fetch ones that are needed 2021-06-13 01:05:42 +01:00
Geza Lore 02835f199b CI: Improve caching
GitHub Actions allow a total 5 GB of cache storage space per repository,
after which it will evict old caches. Tweaked cache sizes so master + a
few PRs can fit at the same time. Don't cache coverage builds as they
run weekly and with additional compiler options, so their caches would
likely be state anyway.
2021-06-13 00:19:40 +01:00
Geza Lore 1abd339863 CI: fix caching in coverage build 2021-06-10 01:04:43 +01:00
Geza Lore d22df4e907 CI: Add extra dist-vlt shard for better load balancing 2021-06-09 23:51:03 +01:00
Geza Lore ac19d552b1 CI: Change name and commit message of formatting job
The format job actually runs more than just clang-format these days.
Change message to hint more directly towards what it does. Change job
name to 'format'.
2021-06-09 22:45:25 +01:00
Geza Lore 58b4ed0995 CI: Do not limit parallelism
Free accounts can run up to 20 jobs, pro ones 40. There does not seem to
be a reason to limit ourselves to 8.
2021-06-09 22:45:25 +01:00
Geza Lore 7ef9b32faa CI: Use separate ccache instances for each job 2021-06-09 22:21:32 +01:00
Wilson Snyder 014bffdf5e CI: Run coverage with SystemC 2021-03-28 12:47:35 -04:00
Wilson Snyder f39318bde5 CI: Run coverage with SystemC 2021-03-28 11:47:45 -04:00
Wilson Snyder 0b17d4f059 CI: Run coverage with SystemC 2021-03-28 11:14:44 -04:00
Wilson Snyder 64802f6f3d CI: Run coverage with SystemC 2021-03-28 09:55:56 -04:00
Wilson Snyder 9a39c69cb9 CI: Run coverage with SystemC 2021-03-28 09:54:50 -04:00
Wilson Snyder c99f01b7fe Converted Asciidoc documentation into reStructuredText (RST) format. 2021-03-12 13:52:47 -05:00
Wilson Snyder ac171f16fd Github: Use 10+10 runners for coverage. 2021-03-07 16:41:46 -05:00
Wilson Snyder 4592724c1f Remove sonarCloud 2021-03-07 15:11:57 -05:00
Wilson Snyder 878a75c0f3 Add sonarcloud 2021-03-07 14:57:12 -05:00
Wilson Snyder d4d9e12b66 CI: Fix coverage action (install systemc) 2021-01-10 19:45:43 -05:00
Wilson Snyder 6060acc73d CI: Fix coverage action 2021-01-10 19:15:39 -05:00
Wilson Snyder e972668169 CI: Fix coverage action 2021-01-10 18:55:56 -05:00
Unai Martinez-Corral 6e3de7bfd1
CI: exploit concurrency (#2687)
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
2020-12-23 18:53:05 +01:00
Wilson Snyder 457e926168 Use yapf3 and add to CI 2020-12-18 22:54:06 -05:00
Yutetsu TAKATSUKASA e4eab56495
Add a workflow that calls clang-format and commit. (#2713)
* Add a workflow that calls clang-format and commit.
2020-12-17 23:41:10 +09:00