File size: 1,569 Bytes
784ee2c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | # bazel-orfs
Bazel front-end for the ORFS Make flow. Designs declared via
`config.mk` are exposed as Bazel targets through
[bazel-orfs](https://github.com/The-OpenROAD-Project/bazel-orfs).
## Targets
For a design at `flow/designs/<platform>/<design>/` with `DESIGN_NAME =
<n>`:
| Target | Output |
|---|---|
| `<n>_synth` | Yosys synthesis |
| `<n>_floorplan` | Floorplan + I/O placement |
| `<n>_place` | Placement |
| `<n>_cts` | Clock tree synthesis |
| `<n>_grt` | Global routing |
| `<n>_route` | Detailed routing |
| `<n>_final` | Final + fill |
| `<n>_generate_abstract` | LEF/LIB abstract |
| `<n>_test` | Full flow + QoR check against `rules-base.json` |
| `<n>_update` | Rebuild and write thresholds back to `rules-base.json` |
Stages depend on the previous, so `_final` runs the whole flow.
```bash
bazelisk build //flow/designs/asap7/gcd:gcd_synth
bazelisk test //flow/designs/asap7/gcd:gcd_test
bazelisk run //flow/designs/asap7/gcd:gcd_update
bazelisk query //flow/designs/asap7/...:*
```
## Adding a design
```starlark
# flow/designs/<platform>/<design>/BUILD.bazel
load("//flow/designs:design.bzl", "design")
design()
```
If `flow/designs/src/<n>/BUILD.bazel` is missing, add:
```starlark
load("//flow/designs:design.bzl", "files")
files("verilog")
```
A design counts as CI-tested iff `rules-base.json` exists; without it
the generated targets get `tags = ["manual"]`.
## Parallelism
Each OpenROAD invocation takes `-threads <nproc>`. A wildcard
`bazelisk test` runs designs in parallel and overcommits the host. Cap
with `--jobs=N`.
|