Route the 40-net photonic floorplan with verified constructive candidates
This commit is contained in:
parent
ee41dc600a
commit
0183a91e9c
3 changed files with 555 additions and 55 deletions
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ After defining the Masque interface, construct the synthetic cells and record th
|
|||
|
||||
### Synthetic scale benchmark
|
||||
|
||||
- Use a 5 × 5 mm board at 100 nm pitch, approximately 40 nets, and 50–100 obstacles with a union covering approximately 10% of the routing area. One reproducible starting layout uses 72 rectangles of `250 × 140` µm, with lower-left corners at `(400 + 500i, 400 + 550j)` µm for `0 ≤ i < 9` and `0 ≤ j < 8`. The disjoint rectangles cover `2.52 mm²`, or `10.08%` of the board. Stagger or reshape selected obstacles while preserving the overall density to exercise constrained passages as well as open lanes.
|
||||
- Use a 5 × 5 mm board at 100 nm pitch, approximately 40 nets, and 50–100 obstacles with a union covering approximately 10% of the routing area. The primary floorplan fixture uses seven port banks, a six-net shared passage, and 60 clustered keepouts that cover 11.0% of the board. The original grid of 72 rectangular keepouts remains available for controlled comparisons. [Catalog scale benchmarks](benchmarks.md#catalog-scale-benchmarks)
|
||||
- Freeze 40 terminal pairs and independently verified reference paths. Include some direct lanes, obstacle detours, shared passages, and routes with a demonstrably cheaper legal typed or diagonal alternative. Start with terminals and catalog compatibility that permit a legacy Manhattan comparison on the same requested connections. Use a separate board variant or subset for terminals and profile changes that require the new capabilities. Keep the reference paths out of unseeded search runs. Record whether the router finds the planted improvements, plus the physical length and catalog cost on equal verified net sets. Look for additional examples of those improvements in the existing corpus.
|
||||
- Use the 100 nm explicit lattice as the principal comparison. At that pitch the board has about 2.5 billion lattice positions before headings or profiles. Check peak memory and use sparse search. For the grid prototype, compare explicit routing with coarse guidance at 1 µm and 10 µm followed by local refinement. Include a case containing a transition or a terminal position that cannot be represented at the coarse pitch. Report results after final verification at full layout precision.
|
||||
- Report native Manhattan, Manhattan through the evaluation boundary, typed Manhattan, and eight headings separately. Record verified and completed net IDs, geometry, catalog cost, expansions, proposals per expansion, exact geometry checks, cache entries, peak memory, and repeated wall times. Compare legacy runs under the same options and dependencies. Target at most a few minutes end to end for the representative 40-net run. Measure whether seconds are attainable. Record the machine, coverage, time to first verified layout and time to final result. Use profiles and repeated runs to set phase budgets and memory targets before stabilizing the public types. Record the diagnostics for both a successful run and a budget-limited run.
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ For structured logging, `dataclasses.asdict(run)` preserves the per-net fields.
|
|||
| `proximity_range` | `10.0` | Obstacle proximity scoring range in layout units. Scale it with the coordinates when changing units. Large perimeters use an exact boundary index once the sample budget is reached. |
|
||||
| `bend_physical_length` | `None` | Optional authored centerline length for the shared custom 90-degree template, including tangent extensions. Search, refinement, and reports use it when supplied. |
|
||||
| `distance_heuristic_weight` | `1.0` | Finite, nonnegative multiplier for the remaining-distance term only. Increase it to favor progress toward the target relative to estimated turn penalties. The routed path's objective stays the same. |
|
||||
| `terminal_jog_limit` | `0` | Enables verified straight and single-turn candidates during native greedy warm start without corridors. For parallel ports with a lateral offset, it also caps the number of two-turn launch positions checked per net. Zero skips this planning step. |
|
||||
|
||||
A custom S-bend outline uses local coordinates. Its input face is centered at `(0, 0)`, its output face at `(span, offset)`, and both ports face east. Use the same grid span as `SBendSeed(offset, radius)`, including any tangent extension to reach the output face. For example, an offset of `40` with radius `50` has its output at `(80, 40)`. The router rotates and translates the entire outline and uses it for collision checks and seed replay. Supply a separate outline to customize the opposite offset. Width matching allows a relative difference of `1e-12` to account for floating-point conversions. If multiple outlines apply to the same move, `route()` skips that move for the affected net and sets `sbend_template_error` in the final result and iteration callbacks. Direct calls to `SearchOptions.sbend_template()` and `sbend_outline()` raise `ValueError` for an ambiguous match. Moves with no matching outline use the circular S-bend. Set `SBendOutline.length` to use a process-specific centerline length for scoring, refinement, and reporting. The default is the nominal circular length. Automatic mode uses lattice search when an enabled outline matches a net width. Bundle mode requires circular bends for its nets.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue