Skip to content

Commit fede39f

Browse files
oharboeclaude
andcommitted
bazel: enable 12 previously-blocked designs
Enable orfs_design() for designs that were blocked on bazel-orfs parser improvements. The bazel-orfs parser now correctly resolves $(DESIGN_NAME), $(DESIGN_NICKNAME), $(PLATFORM_DIR), and explicit file paths in VERILOG_FILES. Block sub-packages (uart_rx, I2cDeviceCtrl) get BUILD.bazel files for file exports. Newly enabled designs (need metric threshold tuning): - asap7: mock-alu - gf180: uart-blocks (with uart_rx block) - ihp-sg13g2: i2c-gpio-expander (with I2cDeviceCtrl block) - nangate45: ariane133, ariane136, black_parrot, bp_be_top, bp_fe_top, bp_multi_top, bp_quad, mempool_group, swerv_wrapper Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Øyvind Harboe <[email protected]>
1 parent bdd9c4b commit fede39f

15 files changed

Lines changed: 50 additions & 93 deletions

File tree

bazel-orfs.md

Lines changed: 26 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +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 -- 46 designs across 6 public PDK platforms build and
8-
pass QoR tests. Platforms without public PDK files (gf12, gf55,
7+
**Status**: beta -- 58 designs across 6 public PDK platforms have
8+
`orfs_design()` enabled. 46 pass QoR tests; 12 newly enabled designs
9+
need metric thresholds. Platforms without public PDK files (gf12, gf55,
910
rapidus2hp) are not wired up.
1011

1112
## Quick Start
@@ -50,12 +51,13 @@ Each enabled design gets these targets automatically from its `config.mk`:
5051
Each stage depends on the previous one, so building `_final` runs the
5152
entire flow.
5253

53-
## Working Designs (46 passing tests)
54+
## Working Designs (46 passing tests + 12 newly enabled)
5455

55-
All designs below have `orfs_design()` enabled and pass
56-
`bazelisk test` with QoR regression checks.
56+
All designs below have `orfs_design()` enabled. Designs marked
57+
**(new)** were recently unblocked and need metric threshold tuning
58+
before `bazelisk test` passes.
5759

58-
### asap7 (16 designs)
60+
### asap7 (17 designs)
5961

6062
| Design | DESIGN_NAME | Notes |
6163
|--------|-------------|-------|
@@ -75,6 +77,7 @@ All designs below have `orfs_design()` enabled and pass
7577
| `mock-cpu` | mock_cpu | mock CPU with FIFO |
7678
| `swerv_wrapper` | swerv_wrapper | SweRV EH1 |
7779
| `cva6` | cva6 | CVA6 RISC-V (~63 min) |
80+
| `mock-alu` | MockAlu | **(new)** mock ALU |
7881

7982
### sky130hd (7 designs)
8083

@@ -88,7 +91,7 @@ All designs below have `orfs_design()` enabled and pass
8891
| `chameleon` | soc_core | SoC with macros |
8992
| `microwatt` | microwatt | POWER ISA core |
9093

91-
### nangate45 (7 designs)
94+
### nangate45 (16 designs)
9295

9396
| Design | DESIGN_NAME | Notes |
9497
|--------|-------------|-------|
@@ -99,8 +102,17 @@ All designs below have `orfs_design()` enabled and pass
99102
| `dynamic_node` | dynamic_node_top_wrap | NoC router |
100103
| `swerv` | swerv | SweRV EH1 |
101104
| `tinyRocket` | RocketTile | RISC-V Rocket |
102-
103-
### gf180 (5 designs)
105+
| `ariane133` | ariane | **(new)** hierarchical |
106+
| `ariane136` | ariane | **(new)** hierarchical |
107+
| `black_parrot` | black_parrot | **(new)** hierarchical |
108+
| `bp_be_top` | bp_be_top | **(new)** BP back-end |
109+
| `bp_fe_top` | bp_fe_top | **(new)** BP front-end |
110+
| `bp_multi_top` | bp_multi_top | **(new)** BP multi-core |
111+
| `bp_quad` | black_parrot | **(new)** BP quad-core |
112+
| `mempool_group` | mempool_group | **(new)** MemPool group |
113+
| `swerv_wrapper` | swerv_wrapper | **(new)** SweRV wrapped |
114+
115+
### gf180 (6 designs)
104116

105117
| Design | DESIGN_NAME | Notes |
106118
|--------|-------------|-------|
@@ -109,8 +121,9 @@ All designs below have `orfs_design()` enabled and pass
109121
| `ibex` | ibex_core | RISC-V core |
110122
| `jpeg` | jpeg_encoder | JPEG encoder |
111123
| `riscv32i` | riscv | RISC-V RV32I |
124+
| `uart-blocks` | uart | **(new)** hierarchical with uart_rx block |
112125

113-
### ihp-sg13g2 (6 designs)
126+
### ihp-sg13g2 (7 designs)
114127

115128
| Design | DESIGN_NAME | Notes |
116129
|--------|-------------|-------|
@@ -120,6 +133,7 @@ All designs below have `orfs_design()` enabled and pass
120133
| `jpeg` | jpeg_encoder | JPEG encoder |
121134
| `riscv32i` | riscv | RISC-V RV32I |
122135
| `spi` | spi | SPI controller |
136+
| `i2c-gpio-expander` | I2cGpioExpanderTop | **(new)** I2C GPIO with I/O pads |
123137

124138
### sky130hs (5 designs)
125139

@@ -131,62 +145,7 @@ All designs below have `orfs_design()` enabled and pass
131145
| `jpeg` | jpeg_encoder | JPEG encoder |
132146
| `riscv32i` | riscv | RISC-V RV32I |
133147

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.
171-
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.
175-
176-
### Platform-local verilog in VERILOG_FILES
177-
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`).
181-
182-
**Fix**: Support `$(PLATFORM_DIR)/...` file references in VERILOG_FILES
183-
by resolving them against the PDK target.
184-
185-
### Generated verilog (mock-alu)
186-
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.
148+
## Designs Not Supported
190149

191150
### No VERILOG_FILES (minimal)
192151

@@ -317,7 +276,6 @@ where reviews stall.
317276
`MODULE.bazel`.
318277
- Platforms without public PDK files (gf12, gf55, rapidus2hp) are not
319278
supported.
320-
- Some designs are blocked on bazel-orfs parser improvements (see above).
321-
- `riscv32i-mock-sram` hierarchical flow does not work yet.
279+
- 12 newly enabled designs need metric threshold tuning (`rules-base.json`).
322280
- This is a beta -- expect rough edges. File issues at
323281
https://github.com/The-OpenROAD-Project/bazel-orfs/issues

flow/designs/asap7/mock-alu/BUILD.bazel

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@ load("@orfs_designs//:designs.bzl", "DESIGNS")
33

44
exports_files(glob(["*"]))
55

6-
# TODO(bazel-orfs): orfs_design(designs = DESIGNS)
7-
# Blocked: verilog is generated by src/mock-alu/generate_*.py scripts,
8-
# not static files. Needs a genrule to produce the .v before synthesis.
6+
orfs_design(designs = DESIGNS)

flow/designs/gf180/uart-blocks/BUILD.bazel

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ load("@orfs_designs//:designs.bzl", "DESIGNS")
33

44
exports_files(glob(["*"]))
55

6-
# TODO(bazel-orfs): orfs_design(designs = DESIGNS)
7-
# Blocked: config.mk references src/uart-no-param/*.v (different src dir than design name).
6+
orfs_design(designs = DESIGNS)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
load("@bazel-orfs//:openroad.bzl", "orfs_design")
2+
load("@orfs_designs//:designs.bzl", "DESIGNS")
3+
4+
exports_files(glob(["*"]))
5+
6+
orfs_design(designs = DESIGNS)

flow/designs/ihp-sg13g2/i2c-gpio-expander/BUILD.bazel

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ load("@orfs_designs//:designs.bzl", "DESIGNS")
33

44
exports_files(glob(["*"]))
55

6-
# TODO(bazel-orfs): orfs_design(designs = DESIGNS)
7-
# Blocked: config.mk references $(PLATFORM_DIR)/verilog/sg13g2_io.v and design-local verilog.
6+
orfs_design(designs = DESIGNS)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
load("@bazel-orfs//:openroad.bzl", "orfs_design")
2+
load("@orfs_designs//:designs.bzl", "DESIGNS")
3+
4+
exports_files(glob(["*"]))
5+
6+
orfs_design(designs = DESIGNS)

flow/designs/nangate45/ariane133/BUILD.bazel

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ load("@orfs_designs//:designs.bzl", "DESIGNS")
33

44
exports_files(glob(["*"]))
55

6-
# TODO(bazel-orfs): orfs_design(designs = DESIGNS)
7-
# Blocked: config.mk references specific file from src/ariane133/.
6+
orfs_design(designs = DESIGNS)

flow/designs/nangate45/ariane136/BUILD.bazel

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ load("@orfs_designs//:designs.bzl", "DESIGNS")
33

44
exports_files(glob(["*"]))
55

6-
# TODO(bazel-orfs): orfs_design(designs = DESIGNS)
7-
# Blocked: config.mk references specific file from src/ariane136/.
6+
orfs_design(designs = DESIGNS)

flow/designs/nangate45/black_parrot/BUILD.bazel

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ load("@orfs_designs//:designs.bzl", "DESIGNS")
33

44
exports_files(glob(["*"]))
55

6-
# TODO(bazel-orfs): orfs_design(designs = DESIGNS)
7-
# Blocked: config.mk references src/$(DESIGN_NAME)/pickled.v specific file.
6+
orfs_design(designs = DESIGNS)

flow/designs/nangate45/bp_be_top/BUILD.bazel

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ load("@orfs_designs//:designs.bzl", "DESIGNS")
33

44
exports_files(glob(["*"]))
55

6-
# TODO(bazel-orfs): orfs_design(designs = DESIGNS)
7-
# Blocked: config.mk references src/$(DESIGN_NAME)/pickled.v specific file.
6+
orfs_design(designs = DESIGNS)

0 commit comments

Comments
 (0)