Skip to content

Commit bdd9c4b

Browse files
oharboeclaude
andcommitted
docs: update bazel-orfs.md with all 46 working designs across 6 platforms
- Replace old 10-design list with full 46-design table across asap7, sky130hd, nangate45, gf180, ihp-sg13g2, sky130hs - Document blocked designs with specific bazel-orfs fixes needed: hierarchical sub-design targets, specific file references, platform-local verilog, generated verilog - Add performance notes on thread overcommitment and --jobs flag - Update known limitations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 3d53b5f commit bdd9c4b

1 file changed

Lines changed: 163 additions & 45 deletions

File tree

bazel-orfs.md

Lines changed: 163 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ This is an early integration of [bazel-orfs](https://github.com/The-OpenROAD-Pro
44
into OpenROAD-flow-scripts. It lets you build ORFS designs with Bazel
55
using the same `config.mk` files you already have.
66

7-
**Status**: beta -- all 8 asap7 designs build and pass QoR tests.
8-
The full patch set lives out-of-tree in `bazel-orfs/orfs/` to minimize
9-
churn; this PR wires up the minimum needed for developers to kick the
10-
tires.
7+
**Status**: beta -- 46 designs across 6 public PDK platforms build and
8+
pass QoR tests. Platforms without public PDK files (gf12, gf55,
9+
rapidus2hp) are not wired up.
1110

1211
## Quick Start
1312

@@ -51,51 +50,153 @@ Each enabled design gets these targets automatically from its `config.mk`:
5150
Each stage depends on the previous one, so building `_final` runs the
5251
entire flow.
5352

54-
## Working Designs
53+
## Working Designs (46 passing tests)
54+
55+
All designs below have `orfs_design()` enabled and pass
56+
`bazelisk test` with QoR regression checks.
57+
58+
### asap7 (16 designs)
59+
60+
| Design | DESIGN_NAME | Notes |
61+
|--------|-------------|-------|
62+
| `gcd` | gcd | smoketest, ~1 min |
63+
| `gcd-ccs` | gcd | CCS lib model |
64+
| `aes` | aes_cipher_top | medium |
65+
| `aes-block` | aes_cipher_top | block variant |
66+
| `aes-mbff` | aes_cipher_top | MBFF |
67+
| `aes_lvt` | aes_cipher_top | LVT cells |
68+
| `ethmac` | ethmac | Ethernet MAC |
69+
| `ethmac_lvt` | ethmac | LVT cells |
70+
| `ibex` | ibex_core | RISC-V core (slang) |
71+
| `jpeg` | jpeg_encoder | JPEG encoder |
72+
| `jpeg_lvt` | jpeg_encoder | LVT cells |
73+
| `uart` | uart | UART |
74+
| `riscv32i` | riscv_top | RISC-V RV32I |
75+
| `mock-cpu` | mock_cpu | mock CPU with FIFO |
76+
| `swerv_wrapper` | swerv_wrapper | SweRV EH1 |
77+
| `cva6` | cva6 | CVA6 RISC-V (~63 min) |
78+
79+
### sky130hd (7 designs)
80+
81+
| Design | DESIGN_NAME | Notes |
82+
|--------|-------------|-------|
83+
| `gcd` | gcd | smoketest |
84+
| `aes` | aes_cipher_top | medium |
85+
| `ibex` | ibex_core | RISC-V core |
86+
| `jpeg` | jpeg_encoder | JPEG encoder |
87+
| `riscv32i` | riscv | RISC-V RV32I |
88+
| `chameleon` | soc_core | SoC with macros |
89+
| `microwatt` | microwatt | POWER ISA core |
90+
91+
### nangate45 (7 designs)
92+
93+
| Design | DESIGN_NAME | Notes |
94+
|--------|-------------|-------|
95+
| `gcd` | gcd | smoketest |
96+
| `aes` | aes_cipher_top | medium |
97+
| `ibex` | ibex_core | RISC-V core |
98+
| `jpeg` | jpeg_encoder | JPEG encoder |
99+
| `dynamic_node` | dynamic_node_top_wrap | NoC router |
100+
| `swerv` | swerv | SweRV EH1 |
101+
| `tinyRocket` | RocketTile | RISC-V Rocket |
102+
103+
### gf180 (5 designs)
104+
105+
| Design | DESIGN_NAME | Notes |
106+
|--------|-------------|-------|
107+
| `aes` | aes_cipher_top | medium |
108+
| `aes-hybrid` | aes_cipher_top | hybrid variant |
109+
| `ibex` | ibex_core | RISC-V core |
110+
| `jpeg` | jpeg_encoder | JPEG encoder |
111+
| `riscv32i` | riscv | RISC-V RV32I |
112+
113+
### ihp-sg13g2 (6 designs)
114+
115+
| Design | DESIGN_NAME | Notes |
116+
|--------|-------------|-------|
117+
| `gcd` | gcd | smoketest |
118+
| `aes` | aes_cipher_top | medium |
119+
| `ibex` | ibex_core | RISC-V core |
120+
| `jpeg` | jpeg_encoder | JPEG encoder |
121+
| `riscv32i` | riscv | RISC-V RV32I |
122+
| `spi` | spi | SPI controller |
123+
124+
### sky130hs (5 designs)
125+
126+
| Design | DESIGN_NAME | Notes |
127+
|--------|-------------|-------|
128+
| `gcd` | gcd | smoketest |
129+
| `aes` | aes_cipher_top | medium |
130+
| `ibex` | ibex_core | RISC-V core |
131+
| `jpeg` | jpeg_encoder | JPEG encoder |
132+
| `riscv32i` | riscv | RISC-V RV32I |
133+
134+
## Designs Blocked on bazel-orfs Changes
135+
136+
These designs have BUILD.bazel with a commented-out `orfs_design()`
137+
and a `TODO(bazel-orfs)` note. They need changes in bazel-orfs before
138+
they can be enabled.
139+
140+
### Hierarchical sub-design targets (riscv32i-mock-sram)
141+
142+
`asap7/riscv32i-mock-sram` uses `include designs/asap7/riscv32i/config.mk`
143+
in its config.mk and has a `fakeram7_256x32/` sub-design directory.
144+
The `orfs_designs` rule generates spurious `riscv_top_*` targets in
145+
the sub-design package from the parent config. This causes a build
146+
failure because the sub-design lacks the parent's `rules-base.json`.
147+
148+
**Fix**: `orfs_designs` should only generate targets from config.mk
149+
files that are directly in the scanned directory, not from included
150+
configs resolved at Make-time.
151+
152+
### Specific file references in VERILOG_FILES
153+
154+
Several designs list individual files in `VERILOG_FILES` from directories
155+
other than the design's own `src/` tree (e.g. `$(DESIGN_HOME)/src/ariane133/ariane.sv2v.v`
156+
or `$(DESIGN_HOME)/src/$(DESIGN_NAME)/pickled.v`). The `orfs_designs`
157+
rule resolves `$(wildcard ...)` patterns but does not handle explicit
158+
file paths that use `$(DESIGN_NAME)` or `$(DESIGN_NICKNAME)`.
159+
160+
**Affected**: nangate45: ariane133, ariane136, black_parrot, bp_be_top,
161+
bp_fe_top, bp_multi_top, bp_quad, mempool_group, swerv_wrapper.
162+
163+
**Fix**: Extend the `orfs_designs` config.mk parser to resolve
164+
`$(DESIGN_NAME)` and `$(DESIGN_NICKNAME)` variable references in
165+
explicit file paths, not just in `$(wildcard ...)` patterns.
166+
167+
### VERILOG_FILES from non-matching src directory
168+
169+
`gf180/uart-blocks` references `src/uart-no-param/*.v` -- a different
170+
src directory than its own name.
55171

56-
These designs have `orfs_design()` enabled and pass `bazelisk query`:
172+
**Fix**: The parser already handles `$(DESIGN_NICKNAME)` in wildcard
173+
patterns; verify it also resolves when the source directory name
174+
differs from the design directory name.
57175

58-
### asap7
176+
### Platform-local verilog in VERILOG_FILES
59177

60-
- `gcd` -- smoketest, builds in ~1 minute
61-
- `gcd-ccs` -- gcd with CCS lib model
62-
- `aes` (aes_cipher_top) -- medium design
63-
- `aes-block` -- aes as a block
64-
- `aes-mbff` -- aes with MBFF
65-
- `aes_lvt` -- aes with LVT cells
66-
- `ethmac` -- Ethernet MAC
67-
- `ethmac_lvt` -- ethmac with LVT cells
178+
`ihp-sg13g2/i2c-gpio-expander` adds `$(PLATFORM_DIR)/verilog/sg13g2_io.v`
179+
to VERILOG_FILES and also references verilog from its own platform
180+
design directory (`$(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/*.v`).
68181

69-
### sky130hd
182+
**Fix**: Support `$(PLATFORM_DIR)/...` file references in VERILOG_FILES
183+
by resolving them against the PDK target.
70184

71-
- `gcd` -- smoketest
72-
- `aes` (aes_cipher_top) -- medium design
185+
### Generated verilog (mock-alu)
73186

74-
## Designs Not Yet Working
187+
`asap7/mock-alu` generates its verilog via `src/mock-alu/generate_*.py`
188+
scripts. Needs a Bazel `genrule` to run the Python generator before
189+
synthesis.
75190

76-
Each design directory has a `BUILD.bazel` with a commented-out
77-
`orfs_design()` call and a note explaining what's missing. The common
78-
blockers are:
191+
### No VERILOG_FILES (minimal)
79192

80-
**Missing `src/` BUILD.bazel**: The source directory (e.g.
81-
`flow/designs/src/jpeg/`) needs a `BUILD.bazel` with a `:verilog`
82-
filegroup and `exports_files`. Affected: jpeg, jpeg_lvt, uart,
83-
riscv32i, riscv32i-mock-sram, mock-cpu, chameleon, microwatt.
193+
`asap7/minimal` is a test design with no `VERILOG_FILES` in config.mk
194+
(empty SDC). Not expected to work with `orfs_designs`.
84195

85-
**Specific file references**: Some `config.mk` files reference
86-
individual source files instead of wildcards. These need
87-
`exports_files` in the source directory. Affected: ibex,
88-
swerv_wrapper.
196+
### Platforms without public PDK
89197

90-
**Complex source trees**: Designs like cva6 have deeply nested source
91-
trees that each need their own `BUILD.bazel`. Affected: cva6.
92-
93-
**Generated verilog**: mock-alu generates its verilog via Python scripts.
94-
Needs a `genrule`. Affected: mock-alu.
95-
96-
**No config.mk**: mock-array has no config.mk (test fixture only).
97-
98-
**No verilog**: minimal is a test design with no VERILOG_FILES.
198+
gf12, gf55, and rapidus2hp have design directories but no platform
199+
files in the open-source repo. These are skipped entirely.
99200

100201
## How to Add More Designs
101202

@@ -158,6 +259,25 @@ local_path_override(
158259
- **Parallel**: Independent designs build in parallel automatically.
159260
- **Reproducible**: Same inputs always produce the same outputs.
160261

262+
## Performance Notes
263+
264+
Each OpenROAD invocation uses `-threads <nproc>` (all available cores).
265+
When Bazel runs many designs in parallel, the machine becomes heavily
266+
overcommitted. On a 48-core machine, 50+ OpenROAD instances may run
267+
simultaneously during a full `bazelisk test ...`, each requesting 48
268+
threads.
269+
270+
To limit parallelism:
271+
272+
```bash
273+
# Limit to 4 concurrent OpenROAD invocations
274+
bazelisk test --jobs=4 ...
275+
```
276+
277+
A full test suite run (46 designs, 6 platforms) takes roughly 3-4 hours
278+
on a 48-core machine with default parallelism (overcommitted). Individual
279+
design times vary from ~1 minute (gcd) to ~63 minutes (cva6 on asap7).
280+
161281
## Updating Metric Thresholds
162282

163283
When OpenROAD or flow scripts change, metric thresholds in
@@ -191,15 +311,13 @@ Filing of PRs is throttled to avoid overwhelming maintainers --
191311
submitting too many at once just causes "maintainer packet dropping"
192312
where reviews stall.
193313

194-
Additional PDKs are throttled until asap7 and sky130hd are
195-
essentially clean and no longer need fix-up commits in this PR.
196-
197314
## Known Limitations
198315

199-
- Only asap7 and sky130hd PDKs are wired up (others can be added to
200-
`MODULE.bazel` platforms list and `flow/BUILD.bazel` orfs_pdk calls).
201316
- The Docker image is pinned; updating it requires changing
202317
`MODULE.bazel`.
203-
- Not all designs work yet (see above).
318+
- Platforms without public PDK files (gf12, gf55, rapidus2hp) are not
319+
supported.
320+
- Some designs are blocked on bazel-orfs parser improvements (see above).
321+
- `riscv32i-mock-sram` hierarchical flow does not work yet.
204322
- This is a beta -- expect rough edges. File issues at
205323
https://github.com/The-OpenROAD-Project/bazel-orfs/issues

0 commit comments

Comments
 (0)