Route the 40-net photonic floorplan with verified constructive candidates

This commit is contained in:
Jan Petykiewicz 2026-12-05 10:37:37 -08:00
commit 0183a91e9c

View file

@ -48,23 +48,43 @@ Run `PYTHONPATH=. python scripts/capture_legacy_routing.py /tmp/inire-parity.jso
## Catalog scale benchmarks
Use the aligned case for long-range profile changes. Use the constrained case for an obstacle detour among 40 connections on the same 5 × 5 mm board at 100 nm pitch. The script verifies the frozen reference routes independently before timing unseeded search.
The default `floorplan` case represents a synthetic single-layer photonic layout on a 5 × 5 mm die at 100 nm pitch. It uses 40 nets across seven port banks, with mixed approach directions, staggered fan-outs, and a short local connection. The 60 keepouts cover 11.0% of the die and represent clustered device and pad banks, larger electronics and thermal regions, and stepped block boundaries. Six reference routes pass through an 82 µm gap between two blocks. A separate keepout forces one aligned eastbound connection to detour. The frozen reference paths range from 0.33 to 2.52 mm. Each is verified against the board, keepouts, and the other reference paths before timing unseeded search. [Floorplan coordinates](../scripts/catalog_floorplan.py)
```sh
PYTHONPATH=. python scripts/benchmark_catalog_routing.py --case constrained --mode native
PYTHONPATH=. python scripts/benchmark_catalog_routing.py --case constrained --mode manhattan
PYTHONPATH=. python scripts/benchmark_catalog_routing.py --case constrained --mode typed
PYTHONPATH=. python scripts/benchmark_catalog_routing.py --case constrained --mode typed --no-refinement
PYTHONPATH=. python scripts/benchmark_catalog_routing.py --case constrained --mode octagonal
PYTHONPATH=. python scripts/benchmark_catalog_routing.py --case floorplan --mode native --no-refinement
PYTHONPATH=. python scripts/benchmark_catalog_routing.py --case floorplan --mode manhattan --no-refinement
PYTHONPATH=. python scripts/benchmark_catalog_routing.py --case floorplan --mode typed --no-refinement
PYTHONPATH=. python scripts/benchmark_catalog_routing.py --case floorplan --mode octagonal --no-refinement
```
Native uses the existing Manhattan API. Manhattan uses the catalog evaluator with a single profile and cardinal turns. Typed adds the centered transition. Octagonal also admits 45° bends. The diagonal-savings case keeps cardinal terminals and gives the octagonal search a shorter two-turn path. The diagonal case has a native diagonal terminal pair.
Native uses the Manhattan API. Catalog Manhattan uses the catalog evaluator with a single profile and cardinal turns. Typed adds the centered transition. Octagonal also admits 45° bends. All four modes receive the same floorplan and terminal pairs, with no supplied routes.
The floorplan defaults to `--net-order bank`, which groups nets by their terminal headings and routes the outside of a lateral fan-out first. Use `--net-order input` to route in fixture order. The native warm start defaults to `--native-jog-limit 48`. It verifies straight and single-turn links and samples two-turn launch positions around keepouts and peer routes. [Native search options](user/api-reference.md#searchoptions)
The catalog modes default to `--constructive` on this fixture. They verify straight, single-turn, and two-turn candidates before falling back to detailed search. After placing the routes, they try cheaper collinear profile changes with the installed routes in place. Every replacement must pass full path verification, meet the original terminal poses, and fit within the original physical length. With refinement enabled, the router also compares local replacements and can try another net order if coverage is incomplete. Use `--no-constructive` to run the detailed catalog strategy.
Use `aligned` to isolate long-range profile changes and `constrained` to reproduce the rectangular obstacle grid with a single blocked lane. The `diagonal-savings` case keeps cardinal terminals and gives the octagonal search a shorter two-turn path. The `diagonal` case has a native diagonal terminal pair.
Use `--guide-pitch 1000` and `--guide-pitch 10000` to compare coarse guidance against explicit routing. The off-coarse case exercises a displaced transition at 1 nm layout precision. On the same case `--auto-pitch 1000` selects 200 nm and verifies the same terminal poses. For a bounded failure control, use `--node-limit 0`. Use `--geometry` to retain the ordered moves and physical polygons with each report.
The report includes repeated wall times, peak resident memory from the operating system, and per-net cost and physical length. Compare costs on the intersection of the completed net sets. Catalog reports also include work from discarded search attempts and budgeted retries.
### Representative measurements
### Photonic floorplan measurements
The table gives medians of five unseeded runs per setting on an AMD Ryzen 9 5900X with a 1,000-node detailed-search limit. Routing time includes final verification. All four modes verified all 40 nets, including the six in the shared passage, with both refinement settings.
| Mode | Median without refinement | Median with refinement | Slowest run across both settings | Catalog cost |
| --- | ---: | ---: | ---: | ---: |
| Native Manhattan | 0.37 s | 0.37 s | 0.49 s | 8.0379 |
| Single-profile catalog Manhattan | 0.81 s | 0.74 s | 1.27 s | 8.0379 |
| Typed Manhattan | 1.50 s | 2.31 s | 2.40 s | 6.3917 |
| Octagonal | 2.00 s | 1.64 s | 2.47 s | 6.3881 |
Catalog cost was the same under both refinement settings. Compared with the prior 40-net results for each mode and setting, every route matched or improved its physical length and catalog cost, and the minimum clearances were unchanged. The typed and octagonal runs used profile changes on 26 nets each. The octagonal layouts retained their 45° bends.
Fresh Python invocations with refinement enabled and `--repeat 1` took 0.94–3.08 s across the four modes, including startup, reference verification, and JSON output.
### Controlled obstacle-grid measurements
The following constrained-case runs used an AMD Ryzen 9 5900X and a 1000-node detailed-search limit. Times are medians of three runs. The catalog Manhattan and typed configurations completed all 40 requests. Native Manhattan verified 39 within the same node limit.