verilator/.github/workflows
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
..
build.yml CI: Reduce action permissions per best practices 2025-05-11 17:43:48 -04:00
contributor.yml CI: Move coverage + contributor actions to 24.04 2025-05-13 22:21:21 -04:00
coverage.yml CI: Add variable to explicitly enable some GitHub workflows (#6021) 2025-05-18 21:13:37 -04:00
docker.yml CI: Reduce action permissions per best practices 2025-05-11 17:43:48 -04:00
format.yml CI: Reduce action permissions per best practices 2025-05-11 17:43:48 -04:00
msbuild.yml CI: Reduce action permissions per best practices 2025-05-11 17:43:48 -04:00
reusable-build.yml CI: Use reusable workflow, so tests start after build (#5901) 2025-03-29 15:09:32 -04:00
reusable-rtlmeter-build.yml Add RTLMeter GitHub workflows (#5948) 2025-04-19 15:42:33 +01:00
reusable-rtlmeter-run.yml Automatically publish scheduled RTLMeter results (#6074) 2025-06-10 13:06:05 +01:00
reusable-test.yml Internals: Apply make format-json format-yaml. No functional change. 2025-04-16 07:34:57 -04:00
rtlmeter.yml Add DFG binToOneHot pass to generate one-hot decoders (#6096) 2025-06-16 23:14:24 +01:00