Tie routing documentation to user and developer workflows
This commit is contained in:
parent
2d77877fff
commit
2c7a7ea90a
18 changed files with 309 additions and 148 deletions
13
DOCS.md
13
DOCS.md
|
|
@ -9,9 +9,9 @@ If you're new to Inire, start with the [single-net quick start](README.md#route-
|
|||
|
||||
## Describe a layout
|
||||
|
||||
- [Route a layout](docs/user/route-a-layout.md) covers units, port headings, widths, and keepouts.
|
||||
- [Route between placed crossings](docs/user/route-a-layout.md#route-between-placed-crossings) uses the cell footprints, port access, and external connections from your layout.
|
||||
- [Reuse an existing route](docs/user/route-a-layout.md#reuse-an-existing-route) explains fixed routes and movable seeds.
|
||||
- [Set units, port headings, and keepouts](docs/user/route-a-layout.md#define-the-inputs) before routing.
|
||||
- [Route between placed crossings](docs/user/route-a-layout.md#route-between-placed-crossings) using the cell footprints and local port openings.
|
||||
- [Reuse an existing route](docs/user/route-a-layout.md#reuse-an-existing-route) when a later net must avoid it or when search could benefit from a movable seed.
|
||||
|
||||
<a id="read-the-result"></a>
|
||||
<a id="topological-routing"></a>
|
||||
|
|
@ -21,7 +21,8 @@ If you're new to Inire, start with the [single-net quick start](README.md#route-
|
|||
|
||||
## Check and improve a route
|
||||
|
||||
- [Check the result](docs/user/tune-and-troubleshoot.md#read-the-result) before exporting physical paths.
|
||||
- [Check the result](docs/user/tune-and-troubleshoot.md#read-the-result) to see whether each net reached its port and cleared obstacles.
|
||||
- [Export verified geometry](docs/user/route-a-layout.md#export-verified-geometry) to use the physical polygons in your layout.
|
||||
- [Diagnose an unfinished net](docs/user/tune-and-troubleshoot.md#why-a-net-stopped-short) to decide whether to change the layout or spend more search time.
|
||||
- [Choose a routing mode](docs/user/tune-and-troubleshoot.md#choose-a-routing-mode) when your layout calls for a specific planner.
|
||||
- [Adjust a setting](docs/user/tune-and-troubleshoot.md#choose-the-next-setting) if routes collide, take too long, or use too many bends.
|
||||
|
|
@ -36,7 +37,9 @@ If you're new to Inire, start with the [single-net quick start](README.md#route-
|
|||
|
||||
## API reference
|
||||
|
||||
For call signatures, result fields, and option defaults, see the [public API reference](docs/user/api-reference.md).
|
||||
- Look up the call and progress callback in the [`route()` signature](docs/user/api-reference.md#route-a-problem).
|
||||
- Find the fields that describe arrival, collisions, and physical geometry in the [result reference](docs/user/api-reference.md#results).
|
||||
- Check accepted values and defaults in the [option tables](docs/user/api-reference.md#options-and-defaults).
|
||||
|
||||
## Examples
|
||||
|
||||
|
|
|
|||
10
README.md
10
README.md
|
|
@ -33,15 +33,13 @@ else:
|
|||
|
||||

|
||||
|
||||
The example prints `200.0` in the layout's coordinate unit. Both ports have heading 0 because the path travels east as it leaves the source and enters the target.
|
||||
The example prints `200.0` in the layout's coordinate unit. Both ports use heading 0 because the path leaves the source and enters the target travelling east. Use this result to try [exporting the physical path](docs/user/route-a-layout.md#export-verified-geometry).
|
||||
|
||||
## Route your own layout
|
||||
|
||||
- [Define your ports and keepouts](docs/user/route-a-layout.md), including access to preplaced crossing cells.
|
||||
- [Choose what to try after a partial route](docs/user/tune-and-troubleshoot.md#why-a-net-stopped-short).
|
||||
- [Browse visual examples](examples/README.md) of multi-net routing, locked paths, and bend geometry.
|
||||
|
||||
For the full workflow and API reference, start with the [user guide](DOCS.md).
|
||||
- For your own ports and keepouts, follow the [layout workflow](docs/user/route-a-layout.md#define-the-inputs).
|
||||
- If a path stops short, work through the [partial route checks](docs/user/tune-and-troubleshoot.md#why-a-net-stopped-short).
|
||||
- To find examples and look up fields as you work, use the [user guide](DOCS.md).
|
||||
|
||||
## Develop Inire
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,29 @@
|
|||
# Routing development archive
|
||||
|
||||
Historical plans, run captures, and raw measurements live here. For current workflows, start with the [developer guide](../../docs/development.md) or [benchmarks](../../docs/benchmarks.md).
|
||||
Use these records to recover the rationale for a routing decision or compare a fresh capture with an earlier run.
|
||||
|
||||
- **Plans.** [Original routing goal](routing-policy-goal.md), [routing refactor plan](routing-refactor-plan.md), and [documentation improvement plan](documentation-improvement-plan.md).
|
||||
- **Performance records.** [Example baseline](performance.md) and its [JSON](performance_baseline.json), [optimization log](optimization_pass_01_log.md), and [pair-local characterization](pair_local_characterization.md).
|
||||
- **Recorded diagnostics.** [Iteration](iteration_trace.md), [conflict](conflict_trace.md), [frontier](frontier_trace.md), and [pre-pair](pre_pair_frontier_trace.md) traces. Each report has a companion JSON file with the raw data.
|
||||
## Recover earlier decisions
|
||||
|
||||
The baseline comparison tool reads `archive/routing/performance_baseline.json` by default. Capture tools write here by default and replace files with the same name. To save a scratch capture, pass `--output-dir` as shown in the [diagnostics guide](../../docs/routing-diagnostics.md#reproduce-and-compare).
|
||||
- For the original coverage target and retry priorities, read the [routing policy goal](routing-policy-goal.md).
|
||||
- For the reason a responsibility lives in a particular module, consult the [routing refactor plan](routing-refactor-plan.md).
|
||||
- For the original audience and page split, see the [first documentation reorganization plan](documentation-improvement-plan.md).
|
||||
|
||||
## Reproduce probe and retry experiments
|
||||
|
||||
- To recover the measured probe and holdout tables from November 26, 2026, run `git show 2b02c6e:docs/topological-routing.md`.
|
||||
- For the original retry triggers, budget sweeps, and authored Terminal-Bench lane comparisons, run `git show ea5cfe7:docs/topological-routing.md`. To rerun a retired policy, use that revision's driver in a separate worktree.
|
||||
- To see how these experiments inform the current probe and retry policy, read the [measurement summary](../../docs/benchmark-results.md).
|
||||
|
||||
## Compare performance or diagnose a trace
|
||||
|
||||
| What to recover | Archive record |
|
||||
| --- | --- |
|
||||
| Example coverage and timings | [Baseline report](performance.md) with a [machine-readable snapshot](performance_baseline.json) for comparisons. |
|
||||
| Work measured during the earlier optimization pass | [Optimization log](optimization_pass_01_log.md). |
|
||||
| Conditions under which repair succeeds in the fan-out fixture | [Pair-local characterization](pair_local_characterization.md) with [per-case measurements](pair_local_characterization.json). |
|
||||
| Work by net and iteration | [Iteration trace](iteration_trace.md). |
|
||||
| Overlapping components before and after repair | [Conflict trace](conflict_trace.md). |
|
||||
| Sampled prune reasons near remaining overlaps | [Frontier trace](frontier_trace.md). |
|
||||
| Reroute order and work immediately before repair | [Pre-pair frontier trace](pre_pair_frontier_trace.md). |
|
||||
|
||||
Each trace report has a companion JSON file with the same basename. The baseline comparison tool reads `performance_baseline.json` from this directory by default. Capture tools also write here by default and replace files with the same name. To preserve an earlier record while running a fresh capture, follow the [scratch output commands](../../docs/routing-diagnostics.md#reproduce-and-compare).
|
||||
|
|
|
|||
|
|
@ -1,32 +1,32 @@
|
|||
# Router architecture
|
||||
|
||||
An explicit routing mode runs one worker. Automatic routing can run several and compare their results. Each worker receives its own obstacles, locks, and seed hints. To trace how a worker gets its inputs and options, start at [`route_once()`](../inire/router/_stack.py).
|
||||
An explicit routing mode runs one worker. Automatic routing can run several and compare their results. To follow how the worker gets its obstacles, locks, and seed hints, start at [`route_once()`](../inire/router/_stack.py#L71).
|
||||
|
||||
## Automatic routing
|
||||
|
||||

|
||||
|
||||
The diagram shows the usual sequence for arc bends. A verified layout can reach the routing target early. When attempts run out, selection keeps the best verified coverage found. Custom physical bends, polygonal proxies, or missing constrained triangulation take a lattice-only path.
|
||||
Follow the left column down while the run is below its coverage target. Move right to selection when a verified candidate reaches that target or the attempts run out. Custom physical bends, polygonal proxies, and layouts routed without constrained triangulation take a lattice-only path.
|
||||
|
||||
1. **Set the coverage target.** Each disjoint pair of incompatible fixed ports rules out one route. At supported rectangular cuts, compute how many paths of the narrowest width can fit through the openings. The resulting upper bound can justify stopping with fewer routes than requested.
|
||||
1. **Set the coverage target.** Each disjoint pair of incompatible fixed ports rules out one route. At supported rectangular cuts, compute how many paths of the narrowest width can fit through the openings. To change which cuts can establish an upper bound, start with [`cut_capacity()`](../inire/router/_capacity.py#L27).
|
||||
2. **Try constructive planners.** Bundles assign ordered tracks through barriers. Column schedules place turns between openings. Compact planners fit short connections between constrained ports. Each produces seeds whose physical geometry the worker checks.
|
||||
3. **Start with a small search budget.** Lock verified straight links and search for the remaining nets. A different lock order or a small unlocked probe can free room for a turn. Promising guide and column attempts can run first.
|
||||
4. **Decide what to keep fixed.** If the remaining ports are connected, route around the locked geometry. If the locks disconnect them, pass the incumbents as movable seeds. A joint retry can assign different lanes through a shared portal. If recovery stalls, seed and lattice attempts can search the whole layout, with a final lattice retry up to the caller's ceiling.
|
||||
5. **Select a verified layout.** Prefer greater coverage and compare cost on identical verified net sets. A complete locked layout or an improving joint retry must pass its whole-layout check before selection. A refined candidate must preserve the verified net set.
|
||||
5. **Select a verified layout.** Prefer greater coverage and compare cost on identical verified net sets. A complete locked layout or an improving joint retry must pass its whole-layout check before selection. To see how a refined candidate must preserve the verified net set, follow [the refinement handoff](../inire/router/_automatic.py#L581).
|
||||
|
||||
The near-port attempt uses up to 100 nodes per search and two congestion iterations with the arc proxy. Alternate proxies use the configured iteration limit because a later shallow iteration can find a cheaper path. Wider lookahead uses up to 500 nodes per search and the configured iteration limit. Both attempts respect smaller caller limits. Follow those budget decisions in the [automatic routing sequence](../inire/router/_automatic.py).
|
||||
The near-port attempt uses up to 100 nodes per search and two congestion iterations with the arc proxy. Alternate proxies use the configured iteration limit because a later shallow iteration can find a cheaper path. Wider lookahead uses up to 500 nodes per search and the configured iteration limit. Follow the caps and early exits in [the initial search trials](../inire/router/_automatic.py#L480).
|
||||
|
||||
### Example of a poor lock
|
||||
|
||||
1. A straight trunk in `stress-retry-straight-decoy` fits on its own. Once locked, it divides the board and blocks two perpendicular nets.
|
||||
2. The probe can keep the branches and lower rail. A four-turn dogleg completes the trunk around them before wider search.
|
||||
3. If you change lock ordering or acceptance, rerun the case and check that all four nets still verify together. For the command and profile choices, see [Run a benchmark](benchmarks.md#run-a-benchmark).
|
||||
3. If you change lock ordering or acceptance, run the [single-case benchmark command](benchmarks.md#run-a-benchmark) with `--case stress-retry-straight-decoy`. Check that all four nets still verify and compare which stage finishes the trunk.
|
||||
|
||||
## Detailed search and congestion
|
||||
|
||||
- **Build and admit moves.** Weighted A* searches snapped positions and headings. Rays, visible corners, and corridor waypoints propose straight endpoints. Admission checks clearance, cost, and state dominance. To understand which endpoints a net can reach within the same node budget, start with [move generation](../inire/router/_astar_moves.py).
|
||||
|
||||
- **Recheck the installed set.** The driver raises the overlap penalty when successive routes collide. After an iteration it verifies the installed paths, since a later route can collide with one completed earlier. It ranks snapshots by completed nets, then by conflicts and dynamic collisions. To investigate which nets reroute next, read the [congestion policy](../inire/router/_congestion_policy.py).
|
||||
- **Recheck the installed set.** The driver raises the overlap penalty when successive routes collide. After an iteration it verifies the installed paths, since a later route can collide with one completed earlier. It ranks snapshots by completed nets, then by conflicts and dynamic collisions. To see when it reroutes just the conflicting nets, read [`next_reroute_net_ids()`](../inire/router/_congestion_policy.py#L93).
|
||||
|
||||
- **Repair a small conflict set.** The driver restores its best iteration and verifies it once for diagnostics and target selection. Pair-local search keeps the geometry outside an eligible pair fixed and can try either routing order. The driver checks replacements in the live world. To compare the restored set with the repaired paths, [follow a late conflict](routing-diagnostics.md#follow-a-late-conflict-into-pair-local-repair).
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
# Benchmark fixtures
|
||||
|
||||
The checked-in fixtures let you repeat comparisons offline. To find a board for the behavior you want to measure, use the [benchmark case guide](benchmarks.md#choose-a-case). To inspect the case groups and the options used for each profile, open the [corpus registry](../inire/tests/routing_corpus.py).
|
||||
Start with a board that exercises the behavior you want to measure. Use the [case guide](benchmarks.md#choose-a-case) to select it or the [corpus registry](../inire/tests/routing_corpus.py) to find its groups and effective profile settings.
|
||||
|
||||
## Automatic nine-net Terminal-Bench routing
|
||||
|
||||
Use `terminal-bench-point-terminals` to test heading inference and ordered tracks through shared openings. The bundle planner reserves room for the outer return and bend tangencies. Use `terminal-bench` to test automatic routing with fixed headings.
|
||||
|
||||
Export the nine routes from the unseeded point-terminal input.
|
||||
To measure the bundle planner on the unseeded point-terminal input, export its routes.
|
||||
|
||||
```sh
|
||||
python -m scripts.route_terminal_bench --output /tmp/inire-terminal-bench.json
|
||||
```
|
||||
|
||||
The unseeded export passed the checker's cost and geometry requirements in the [pinned Terminal-Bench task](https://github.com/harbor-framework/terminal-bench/tree/249d125b59c0a5352d9e132195cfead6d81446be/tasks/photonic-waveguide-routing). To check feasibility or compare lane assignments, use the CLI flags `--reference-lane-plan` and `--single-bottom-track` to replay the [authored lane plans](../inire/tests/terminal_bench_lane_plan.py).
|
||||
The export should report nine verified routes. The upstream input is board 1 in the [pinned layout specification](https://raw.githubusercontent.com/harbor-framework/terminal-bench/249d125b59c0a5352d9e132195cfead6d81446be/tasks/photonic-waveguide-routing/environment/layout_spec.json). The unseeded export passed the pinned checker's cost and geometry requirements.
|
||||
|
||||
To verify a known layout or compare lane assignments, pass `--reference-lane-plan` or `--single-bottom-track` to replay the [authored lane plans](../inire/tests/terminal_bench_lane_plan.py). Use the unseeded command above for planner coverage and timing.
|
||||
|
||||
## Preplaced crossings
|
||||
|
||||
|
|
@ -26,12 +28,14 @@ Use unseeded runs to evaluate routing policy. For a separate check of geometry a
|
|||
|
||||
The importer converts placed device outlines to keepouts with port openings and snaps optical ports to a 0.1 µm grid. The six converted layouts exercise routing between fixed devices. To inspect their ports and keepouts, open the [checked-in fixture data](../inire/tests/data/external_routing_benchmarks.json).
|
||||
|
||||
| Cases | Source | License |
|
||||
| Cases | Pinned source | License |
|
||||
| --- | --- | --- |
|
||||
| Splitter tree, ring modulator, and MZM | [PIC Routing Benchmark](https://huggingface.co/datasets/FLYR/pic-benchmark/blob/0c1f445792926d97fae01893c89e96b8a9393800/pic-benchmark/README.md) | CC BY 4.0 |
|
||||
| Toy layout and subsets of the Clements and MRR weight-bank layouts | [LiDAR benchmarks](https://github.com/ScopeX-ASU/LiDAR/tree/4e7004d32b0b80d959553797fb30f0737513de0c/src/picroute/benchmarks) | [LiDAR license](../inire/tests/data/LiDAR-LICENSE.txt) |
|
||||
| Splitter tree, ring modulator, and MZM | [FLYR PIC Routing Benchmark archive](https://huggingface.co/datasets/FLYR/pic-benchmark/resolve/0c1f445792926d97fae01893c89e96b8a9393800/pic-benchmark.zip) | FLYR's bundled `LICENSE` specifies [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). |
|
||||
| Toy layout and subsets of the Clements and MRR weight-bank layouts | [LiDAR benchmark inputs](https://github.com/ScopeX-ASU/LiDAR/tree/4e7004d32b0b80d959553797fb30f0737513de0c/src/picroute/benchmarks) | [ScopeX@ASU's MIT license](../inire/tests/data/LiDAR-LICENSE.txt). |
|
||||
|
||||
The importer checks both pinned archive hashes. It requires PyYAML when regenerating the fixtures.
|
||||
### Regenerate the converted inputs
|
||||
|
||||
The importer checks both archive hashes before converting geometry. It uses PyYAML to read the layout files. Generate a scratch copy and compare it with the checked-in fixture data.
|
||||
|
||||
```sh
|
||||
mkdir -p /tmp/inire-external-routing
|
||||
|
|
@ -41,5 +45,8 @@ curl -fL 'https://codeload.github.com/ScopeX-ASU/LiDAR/tar.gz/4e7004d32b0b80d959
|
|||
-o /tmp/inire-external-routing/lidar.tar.gz
|
||||
uv run --with 'pyyaml==6.0.3' python -m scripts.import_external_routing_benchmarks \
|
||||
--pic-archive /tmp/inire-external-routing/pic-benchmark.zip \
|
||||
--lidar-archive /tmp/inire-external-routing/lidar.tar.gz
|
||||
--lidar-archive /tmp/inire-external-routing/lidar.tar.gz \
|
||||
--output /tmp/inire-external-routing/fixtures.json
|
||||
cmp inire/tests/data/external_routing_benchmarks.json \
|
||||
/tmp/inire-external-routing/fixtures.json
|
||||
```
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@ Use these measurements when changing the automatic probe budget or retry order.
|
|||
|
||||
## Near-port probe and retry experiments
|
||||
|
||||
Results recorded on November 26, 2026. The probe decision compared the two-iteration cap with the full configured probe budget. The retry experiments used the pre-cap policy.
|
||||
|
||||
The two-iteration probe reduced public-default expansions by 23% on the regression corpus. Paths matched on both the corpus and holdouts. Check individual boards before changing the cap again.
|
||||
The November 26, 2026 comparison used the regression corpus and retry holdouts under the `public-defaults` and `corpus-regression` profiles. Against the full configured probe budget, a two-iteration cap reduced public-default corpus expansions by 23%. Verified paths and costs matched on both board sets. Check these individual cases before changing the cap again.
|
||||
|
||||
- The splitter tree benefited from fewer repeated shallow searches.
|
||||
- The mixed port bank did more work because the shorter probe passed its last net to the wider retry.
|
||||
|
|
@ -19,9 +17,9 @@ python -m scripts.benchmark_retry_order --case corpus --case retry-holdout \
|
|||
|
||||
### Early and late retries
|
||||
|
||||
Early retries can save time when they avoid a more expensive stage. Failed retries add work before the ordinary fallback. In one holdout, early incumbent recovery selected a higher-cost path at the same coverage. Use the trigger counts and commands in the [experiment archive](#experiment-archive) to compare failed-retry time and cost on common nets.
|
||||
The November 26, 2026 retry experiments used the pre-cap baseline. Failed early retries added work before the ordinary fallback. In one holdout, early incumbent recovery selected a higher-cost path at the same coverage. When comparing a change to retry order, measure the cost of failed attempts as well as the successful recoveries. For the trigger conditions and older driver, see the [archived retry measurements](../archive/routing/README.md#reproduce-probe-and-retry-experiments).
|
||||
|
||||
Use `late-residual-3000` to measure the cost of recovering one more net after the ordinary policy stalls. The policy needs room in the caller's budget and checks that the remaining ports are connected with the incumbents locked. It recovered the last net on two crossing boards and a return shelf in the pre-cap holdout sweep.
|
||||
In the `public-defaults` holdout sweep, `late-residual-3000` recovered the last net on two crossing boards and a return shelf while preserving the previously verified paths. It requires room in the caller's budget and connected ports with the incumbents locked. Use the current comparison below to measure the cost of that extra attempt.
|
||||
|
||||
```sh
|
||||
python -m scripts.benchmark_retry_order --case retry-holdout --profile public-defaults \
|
||||
|
|
@ -31,6 +29,4 @@ python -m scripts.benchmark_retry_order --case retry-holdout --profile public-de
|
|||
|
||||
## Experiment archive
|
||||
|
||||
- For the original retry experiments, budget sweeps, and manual Terminal-Bench lane comparisons, run `git show ea5cfe7:docs/topological-routing.md`. To rerun a retired policy, use the driver at that revision in a separate worktree.
|
||||
- For the probe and holdout measurement tables, run `git show 2b02c6e:docs/topological-routing.md`.
|
||||
- For earlier plans, traces, and performance baselines, see the [routing development archive](../archive/routing/README.md).
|
||||
To recover the recorded expansion counts or rerun an earlier driver, follow the revision and command listed with the [archived probe and retry experiments](../archive/routing/README.md#reproduce-probe-and-retry-experiments).
|
||||
|
|
|
|||
|
|
@ -11,17 +11,15 @@ python -m scripts.compare_topological_routing \
|
|||
--mode automatic
|
||||
```
|
||||
|
||||
- **Coverage.** Expect `3/4 valid`. The capacity report gives three tracks across the cut. This run reached the geometric bound.
|
||||
- **Path quality.** Compare the verified net IDs before comparing weighted length or native objective cost.
|
||||
- **Work.** Read A* expansions and median time together. The report can show work spent planning and verifying even when it reports zero expansions.
|
||||
Expect `3/4 valid` and a report of three tracks for four nets crossing the cut. The run reached the geometric bound. When trying another setting, check the bound and verified IDs before comparing cost. For a case whose bound comes from fixed ports, use `--case lidar-clements-8x8`.
|
||||
|
||||
## Choose a case
|
||||
|
||||
| If you are changing | Use `--case` |
|
||||
| --- | --- |
|
||||
| Overall coverage | `corpus` runs the regression suite. |
|
||||
| Ordered tracks, shared gates, and barrier layouts | `all` selects the original fixture group. |
|
||||
| Seeds, custom bend geometry, and fallback behavior | `broad` includes caller seeds, custom bends, imported layouts, and the first holdout set. |
|
||||
| Ordered tracks, shared gates, and barrier layouts | `all` exercises the original layouts, including fixed-heading Terminal-Bench. |
|
||||
| Seeds, custom bend geometry, and fallback behavior | `broad` includes caller seeds, custom bends, imported layouts, and held-out boards. |
|
||||
| Ports on placed devices | `crossings` exercises external legs to preplaced crossing cells. |
|
||||
| Lock ordering, tight turns, and competing passages | `stress` runs known-feasible folded returns, competing locks, and shared passages. |
|
||||
| A retry tuned on the regression corpus | `retry-holdout` tests related but separate return shelves, bypasses, and competing trunks. |
|
||||
|
|
@ -60,7 +58,7 @@ python -m scripts.compare_topological_routing \
|
|||
--json /tmp/inire-modes.json
|
||||
```
|
||||
|
||||
Guide and seed complete the offset net at the same cost. Guide does so with no corridor seed. If a change increases work in seed mode, inspect how the [corridor is realized as a path](topological-routing.md#corridor-planning-and-realization).
|
||||
At 100 nodes per search, `off` stops short. Guide and seed both finish the same net at the same cost. Guide takes 4 expansions. Seed takes 37, all in seed search. If seed work increases after a change, inspect how the [corridor is realized as a path](topological-routing.md#corridor-planning-and-realization).
|
||||
|
||||
### Test a retry on holdouts
|
||||
|
||||
|
|
@ -74,10 +72,10 @@ python -m scripts.benchmark_retry_order \
|
|||
--json /tmp/inire-residual.json
|
||||
```
|
||||
|
||||
Inspect verified IDs, paths, and time spent on failed attempts. The [prior retry experiments](benchmark-results.md#early-and-late-retries) show a case where earlier recovery increased cost at the same coverage.
|
||||
Check which holdouts gained a verified net, then compare previously verified paths and time spent on failed attempts. To see a case where an earlier retry increased cost at the same coverage, read the [retry results](benchmark-results.md#early-and-late-retries).
|
||||
|
||||
## Compare the results
|
||||
|
||||
1. **Coverage and bounds.** Check verified IDs, requested nets, and any bound. The overloaded gate exercises passage capacity. The imported LiDAR Clements layout exercises fixed-port conflicts. Verify any feasibility witness separately from the timed run.
|
||||
2. **Cost on matching net sets.** Benchmark-weighted length weights physical straights, 90-degree bends, and S-bends by 1, 4, and 13. Native objective cost uses the run's configured objective. Compare costs on identical verified IDs, and report coverage changes separately.
|
||||
3. **Search and time.** Compare expansions and repeated wall times at the same settings. To investigate a slow case or a change in the selected attempt, use the [stage reports and traces](routing-diagnostics.md).
|
||||
3. **Search and time.** Compare expansions and repeated wall times at the same settings. Constructive stages can spend time planning and verifying even with zero expansions. To locate work that moved to a different stage, use the [automatic reports](routing-diagnostics.md#automatic-reports).
|
||||
|
|
|
|||
|
|
@ -9,12 +9,15 @@
|
|||
|
||||
## Check a change
|
||||
|
||||
1. Run `uv sync` to install development dependencies. Activate `.venv` or prefix the commands with `uv run`.
|
||||
2. Run `python -m pytest` for the correctness suite. Use `python -m pytest -m "not routing_corpus"` for a shorter local check and `ruff check inire scripts` for lint.
|
||||
3. For a routing change, compare coverage, geometry, and work using a consistent [benchmark profile](benchmarks.md#choose-a-profile). If you expect exact paths, costs, and trace data to match, run an [exact parity comparison](routing-diagnostics.md#reproduce-and-compare).
|
||||
1. From the repository root, run `uv sync` to install development dependencies. Activate `.venv` or prefix commands with `uv run`.
|
||||
2. Run `python -m pytest` for the correctness suite and `ruff check inire scripts` for lint. Use `python -m pytest -m "not routing_corpus"` for a shorter local check.
|
||||
3. For a cleanup that should preserve paths, capture both revisions and run an [exact parity comparison](routing-diagnostics.md#reproduce-and-compare). Include callbacks or traces if the change affects them.
|
||||
4. For a policy or budget change, start with a case that exhibits the behavior. Compare verified IDs, cost, and work under the same [benchmark profile](benchmarks.md#choose-a-profile). Check the corpus and related holdouts before adopting the change.
|
||||
|
||||
For documentation figures, run `python -m scripts.render_documentation_figures` from the repository root. It writes the route plots and planner diagram under `docs/figures`. Pass `--output-dir` to render a scratch copy for comparison.
|
||||
### Check a documentation figure
|
||||
|
||||
Run `python -m scripts.render_documentation_figures --output-dir /tmp/inire-figures` to preview changes. Compare the port labels, keepouts, path, and caption against the published example. Run the script without `--output-dir` to regenerate the figures in `docs/figures`.
|
||||
|
||||
## Development history
|
||||
|
||||
See the [routing development archive](../archive/routing/README.md) for old plans, optimization logs, and recorded trace and performance data.
|
||||
To recover the inputs, metrics, or rationale behind an earlier routing decision, use the [routing development archive](../archive/routing/README.md).
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 45 KiB |
|
|
@ -31,24 +31,32 @@ Enable the `DiagnosticsOptions` flag for the question you want to answer.
|
|||
| Question | Flag and result |
|
||||
| --- | --- |
|
||||
| Which net consumed an iteration's budget? | `capture_iteration_trace` records `iteration_trace`. Inspect per-net `net_attempts` for expansions, pruning, congestion calls, and seed usage. |
|
||||
| Which two routes overlap after re-verification? | `capture_conflict_trace` records `conflict_trace`. Use the dynamic conflict edges to find the pair and the component indices to locate the overlap. |
|
||||
| Which two routes overlap after re-verification? | `capture_conflict_trace` records the conflicting net IDs and the indices of their overlapping path components. |
|
||||
| What pruning occurred near the final overlap? | `capture_frontier_trace` records `frontier_trace` for reached-but-colliding nets. Inspect the states and prune reasons sampled in that area. The diagnostic replay leaves the selected route fixed. |
|
||||
| What did the last unresolved iteration hand to pair-local repair? | `capture_pre_pair_frontier_trace` records `pre_pair_frontier_trace`. Check reroute order, conflict edges, and per-net attempt work immediately before repair. |
|
||||
| Where did the router explore? | `capture_expanded` records `expanded_nodes` for plotting. See the [fan-out example](../examples/07_large_scale_routing.py). |
|
||||
|
||||
### Find overlapping components
|
||||
|
||||
1. Enable `capture_conflict_trace` in the run's `DiagnosticsOptions`. In the returned `run.conflict_trace`, use the entry whose `stage` is `"final"` to inspect the paths the run returned.
|
||||
2. Find the two net IDs in `conflict_edges`. In the matching `nets` entry, read `component_conflicts` for `self_component_index`, `other_net_id`, and `other_component_index`.
|
||||
3. Index each net's `path` in `run.results_by_net` using those zero-based indices. Plot the components' `physical_geometry` on the board and check their spacing against the required clearance. See whether both components compete for the same opening.
|
||||
|
||||
For an earlier stage such as `restored_best`, read the net and component indices from that entry. The final paths may have changed during repair.
|
||||
|
||||
### Follow a late conflict into pair-local repair
|
||||
|
||||
Capture the no-warm-start fan-out scenario from the repository root.
|
||||
Capture the conflict trace for fan-out with warm starts disabled. The best congestion iteration leaves two disjoint pairs of nets competing for space.
|
||||
|
||||
```sh
|
||||
python -m scripts.record_iteration_trace --scenario example_07_large_scale_routing_no_warm_start \
|
||||
python -m scripts.record_conflict_trace \
|
||||
--scenario example_07_large_scale_routing_no_warm_start \
|
||||
--output-dir /tmp/inire-trace
|
||||
```
|
||||
|
||||
1. Compare the last iteration with the final result in `iteration_trace.md`. The last iteration had six completed nets and two conflict edges in the [recorded fan-out run](../archive/routing/iteration_trace.md#example_07_large_scale_routing_no_warm_start).
|
||||
2. Read the final result and pair-local counters in `iteration_trace.json`. All ten nets verified after repair in this run.
|
||||
3. Substitute `scripts.record_conflict_trace` in the command to locate the overlapping components. Compare `restored_best` with `final` as shown in the [recorded conflict trace](../archive/routing/conflict_trace.md).
|
||||
4. Substitute `scripts.record_pre_pair_frontier_trace` to see the reroute order and per-net work leading up to repair. Compare your run with the [recorded pre-pair trace](../archive/routing/pre_pair_frontier_trace.md).
|
||||
1. Open `conflict_trace.json` and find `restored_best`. Six nets are complete and the conflict edges are `net_02` with `net_03` and `net_06` with `net_07`. For example, the entry for `net_02` reports that its component 1 overlaps component 1 of `net_03`. See the stage summary in the [recorded conflict trace](../archive/routing/conflict_trace.md#example_07_large_scale_routing_no_warm_start).
|
||||
2. Compare with `final`. All ten nets verified and the conflict edges are empty. The staged trace shows that repair resolved conflicts remaining after the congestion iterations.
|
||||
3. To compare expansions and congestion work in the iterations leading up to repair, substitute `scripts.record_iteration_trace` in the command. If you need the reroute order and per-net work immediately before repair, substitute `scripts.record_pre_pair_frontier_trace` and compare with the [recorded pre-pair trace](../archive/routing/pre_pair_frontier_trace.md).
|
||||
|
||||
Use the returned result to count final successes. For live progress during routing, pass an [`iteration_callback`](user/api-reference.md#route-a-problem).
|
||||
|
||||
|
|
|
|||
|
|
@ -2,37 +2,46 @@
|
|||
|
||||
# Topological routing
|
||||
|
||||
Guide mode suggests routes through connected free space. Seed mode also tries to realize those suggestions as physical paths.
|
||||
Guide mode helps detailed search choose a passage through free space. Seed mode also tries to build a physical path through the passage before detailed search starts.
|
||||
|
||||
## Corridor planning and realization
|
||||
|
||||

|
||||
|
||||
The offset-gates fixture has two openings at different heights. The highlighted triangle edges form the corridor's portals. The dashed line shows the lane suggestion, and the solid S-bend shows the physical route that guide mode found.
|
||||
In offset gates, a route must change height between two openings. Read the panels from top to bottom. The highlighted triangle edges show the chosen portals, the dashed line joins the suggested crossing points, and the solid S-bend shows where detailed search fits a physical turn.
|
||||
|
||||
1. **Find connected space for centerlines.** Inset the board by half the widest net's width and expand obstacles by that half-width plus clearance. Shared edges of a constrained Delaunay triangulation act as portals. A short lead tries to attach each terminal to the mesh along its heading. Using the widest net gives the planner a common representation. Narrower nets may still find a path in lattice search through a passage this mesh excludes.
|
||||
2. **Choose a passage and a lane.** Rank portal sequences by distance, occupancy, and estimated overflow. Use lane samples and estimated turn room to select where to cross each portal without crowding another net's access. A different lane through the same portal can make space for a turn. Joint retries use that distinction to revise a shared passage assignment.
|
||||
3. **Turn the sketch into a path.** Guide mode adds soft costs and move suggestions, so detailed search can leave an awkward corridor. Seed mode first tries to find a physical path inside a corridor and verifies it against obstacles and earlier seeds. It gives the first corridor at least half the per-net budget when there are alternatives. Later detailed iterations can move an incumbent or try another guide. Final verification checks the actual routed geometry.
|
||||
1. **Find connected space for centerlines.** Inset the board by half the widest net's width and expand obstacles by that half-width plus clearance. A short lead tries to attach each terminal to the constrained Delaunay mesh along its heading. The common padding can exclude passages that a narrower net can still use in lattice search.
|
||||
|
||||
## When a corridor does not lead to a route
|
||||
<a id="design-background"></a>
|
||||
|
||||
- **No corridor reported.** Inspect `run.topology` from an explicit guide or seed run. Check snapped port access, mesh padding, and which passages remain connected.
|
||||
- **A corridor exists but seed search stalls.** Check terminal headings and the turn room around each chosen portal.
|
||||
- **Seeds reach their targets and the final routes overlap.** Inspect lane order and congestion before adding seed nodes. To locate each overlapping component, capture a [conflict trace](routing-diagnostics.md#traces).
|
||||
A portal is an edge shared by adjacent free-space triangles. For an earlier representation of a route by its crossings of triangle edges, see Section III-A and Figure 1 of [Hama and Etoh's curvilinear detailed-routing paper](https://www.cecs.uci.edu/~papers/compendium94-03/papers/1998/aspdac98/pdffiles/06c_3.pdf).
|
||||
|
||||
To investigate how passages and lane order are chosen, start with the [corridor planner](../inire/router/_topology.py).
|
||||
2. **Choose a passage and a lane.** Rank portal sequences by distance, occupancy, and estimated overflow. Along each chosen portal, sample crossing points and rank them by turn room and access reserved for other nets. A joint retry can move nets to different lanes through the same opening to make room for a turn. To change how candidate points are ranked, inspect [`assign_lanes()`](../inire/router/_topology.py#L214).
|
||||
|
||||
## Design background
|
||||
3. **Turn the sketch into a path.** Guide mode uses the corridor to suggest moves and add a soft cost, so search can leave it to make a turn. Seed mode first searches inside a corridor and checks any seed against obstacles and earlier seeds. With alternatives, the first corridor gets at least half the per-net seed budget. Later detailed iterations can move an incumbent or use another guide. Final verification checks the installed geometry.
|
||||
|
||||
- For the use of shared triangle edges in detailed routing, see [Curvilinear detailed routing](https://websrv.cecs.uci.edu/~papers/compendium94-03/papers/1998/aspdac98/pdffiles/06c_3.pdf).
|
||||
- For constraints specific to photonic waveguides, see [LiDAR 2.0](https://scopex-asu.github.io/files/publications/PD_TCAD2025_LiDARv2.pdf).
|
||||
A passage can be connected in the mesh and leave too little room to bend onto the target port's heading. For the bend-radius and port-alignment rules that constrain the physical route, see Section II-B of [LiDAR 2.0](https://arxiv.org/html/2505.17239v1#S2.SS2).
|
||||
|
||||
<a id="when-a-corridor-does-not-lead-to-a-route"></a>
|
||||
|
||||
## Diagnose a missing or colliding route
|
||||
|
||||
In an explicit guide or seed run, check `run.topology.corridor_counts` and `seeded_net_ids` when the worker returns a topology report.
|
||||
|
||||
- **No corridor is reported for the net.** Check that the snapped port can launch into free space along its heading. Inspect the keepouts and the padding at the suspected opening to see whether that passage is connected in the mesh.
|
||||
- **A corridor exists and the path stops short.** Look at the next turn from the end of the partial path. Compare the available space with the allowed radii and arrival heading. If the geometry fits, vary the [per-net seed budget](user/api-reference.md#topologyoptions) and compare whether seed mode reaches the target.
|
||||
- **The paths reach their ports and overlap.** Use the [conflict trace](routing-diagnostics.md#find-overlapping-components) to identify the nets and the overlapping components. Locate those components on the board. If both nets compete for the same opening, inspect their lane order and available turn room before increasing the seed budget.
|
||||
|
||||
<a id="moved-benchmark-sections"></a>
|
||||
|
||||
## Reproduce a routing comparison
|
||||
|
||||
- <a id="benchmark-corpus"></a>To select a board that exercises the behavior you are studying, use the [benchmark case guide](benchmarks.md#choose-a-case).
|
||||
- <a id="reproduce-a-comparison"></a>To compare off, guide, and seed on offset gates, run the [matched-budget example](benchmarks.md#compare-routing-modes).
|
||||
- <a id="probe-budget-and-coverage"></a><a id="retry-experiments"></a>To check a change to probe limits or retry order, see the [prior experiments](benchmark-results.md#near-port-probe-and-retry-experiments).
|
||||
- <a id="automatic-nine-net-terminal-bench-routing"></a><a id="imported-fixtures"></a>To reproduce an upstream workload, see the [Terminal-Bench and imported fixtures](benchmark-fixtures.md).
|
||||
- <a id="experiment-archive"></a>To recover prior measurements and their commands, consult the [experiment archive](benchmark-results.md#experiment-archive).
|
||||
<a id="reproduce-a-comparison"></a>
|
||||
|
||||
On offset gates, guide and seed can finish at the same cost. To see whether the seed saves search work at a shared node budget, compare expansions and seeded IDs in the [matched-budget example](benchmarks.md#compare-routing-modes).
|
||||
|
||||
### Benchmark fixtures and prior runs
|
||||
|
||||
- <a id="benchmark-corpus"></a>To repeat the comparison on a different geometry, pick a layout from the [benchmark case guide](benchmarks.md#choose-a-case).
|
||||
- <a id="automatic-nine-net-terminal-bench-routing"></a><a id="imported-fixtures"></a>For pinned inputs and regeneration commands, see the [Terminal-Bench and imported fixtures](benchmark-fixtures.md).
|
||||
- <a id="probe-budget-and-coverage"></a><a id="retry-experiments"></a><a id="experiment-archive"></a>For measured changes to probe limits or retry order and the commands that produced them, see the [prior experiments](benchmark-results.md#near-port-probe-and-retry-experiments).
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Public API reference
|
||||
|
||||
Import the types on this page from `inire`. The [layout guide](route-a-layout.md) shows how to assemble a problem and the [tuning guide](tune-and-troubleshoot.md) explains which settings to try.
|
||||
Import these types from `inire`. To see how the inputs fit together in a runnable design, start with the [layout guide](route-a-layout.md#define-the-inputs).
|
||||
|
||||
## Route a problem
|
||||
|
||||
|
|
@ -12,18 +12,23 @@ Omitting `options` uses `RoutingOptions()`. To observe live congestion iteration
|
|||
|
||||
## Layout inputs
|
||||
|
||||
- `Port(x, y, r)` snaps coordinates to the integer grid and normalizes the heading in degrees. Heading 0 points east and 90 points north. The heading must be a multiple of 90 after rounding.
|
||||
- `NetSpec(net_id, start, target, width=2.0)` uses a unique ID and two ports. The target heading is the direction of arrival.
|
||||
- `RoutingProblem` describes one routing layer. Use one unit for distances, coordinates, widths, and radii.
|
||||
### Ports and nets
|
||||
|
||||
| Input | Meaning |
|
||||
| --- | --- |
|
||||
| `bounds` | Board outline as `(xmin, ymin, xmax, ymax)`. |
|
||||
| `nets` | `NetSpec(net_id, start, target, width=2.0)` objects with unique IDs and `Port(x, y, r)` terminals. Defaults to an empty tuple. |
|
||||
| `static_obstacles` | Shapely polygons for keepouts. Defaults to an empty tuple. |
|
||||
| `initial_paths` | Mapping from net IDs to `PathSeed` objects. Defaults to an empty mapping. |
|
||||
| `clearance` | Required spacing between physical shapes. Defaults to `2.0`. |
|
||||
| `safety_zone_radius` | Tolerance for very small obstacle intersections at ports during search. Defaults to `0.0021`. |
|
||||
- `Port(x, y, r)` snaps coordinates to the integer grid and normalizes the heading `r` in degrees. Heading 0 points east and 90 points north. The heading must be a multiple of 90 after rounding.
|
||||
- `NetSpec(net_id, start, target, width=2.0)` uses a unique ID and two ports. The target heading is the direction of arrival.
|
||||
|
||||
### RoutingProblem
|
||||
|
||||
The fields below appear in constructor order. Use one layout unit for coordinates, widths, distances, and radii.
|
||||
|
||||
| Field | Default | Meaning |
|
||||
| --- | --- | --- |
|
||||
| `bounds` | Required | Board rectangle as `(xmin, ymin, xmax, ymax)`. |
|
||||
| `nets` | `()` | Sequence of `NetSpec` objects with unique IDs. |
|
||||
| `static_obstacles` | `()` | Shapely polygons that define keepouts. |
|
||||
| `initial_paths` | Empty mapping | Net IDs mapped to `PathSeed` objects. |
|
||||
| `clearance` | `2.0` | Required spacing between physical shapes. |
|
||||
| `safety_zone_radius` | `0.0021` | Tolerance for very small obstacle intersections at ports during search. |
|
||||
|
||||
## Path seeds
|
||||
|
||||
|
|
@ -36,12 +41,13 @@ Omitting `options` uses `RoutingOptions()`. To observe live congestion iteration
|
|||
| `RoutingRunResult.results_by_net` | A mapping from net ID to `RoutingResult`. |
|
||||
| `RoutingResult.is_valid` and `outcome` | Final validity and a status of `completed`, `colliding`, `partial`, or `unroutable`. |
|
||||
| `RoutingResult.path` | Ordered path components from the source to the last reached state. An unroutable result has an empty path. |
|
||||
| `RoutingResult.reached_target` and `report` | Arrival status, physical length, and collision details. |
|
||||
| `RoutingResult.reached_target` | Whether the path reached the target port with its required heading. |
|
||||
| `RoutingResult.report` | `total_length` in layout units plus static, dynamic, and self-collision counts. `out_of_bounds` records a board containment failure when checked. |
|
||||
| `RoutingResult.locked_geometry` and `as_seed()` | Physical polygons for export or fixed obstacles, and the move sequence for reuse as a seed. |
|
||||
| `RoutingRunResult.automatic` | In automatic mode, the selected planner, verified IDs, stage history, and any capacity or port-conflict bound. `None` for explicit modes. |
|
||||
| `RoutingRunResult.topology` and `metrics` | Corridor counts and seed work when reported by the selected worker, plus work counters across the run. |
|
||||
|
||||
Before using a route's physical polygons in your layout, follow the [export checks](tune-and-troubleshoot.md#read-the-result).
|
||||
To read a route's polygons and write them to a test file, follow the [geometry export steps](route-a-layout.md#export-verified-geometry).
|
||||
|
||||
## Options and defaults
|
||||
|
||||
|
|
@ -109,6 +115,8 @@ Increase the iteration limit when later reroutes might resolve conflicts. Adjust
|
|||
|
||||
### TopologyOptions
|
||||
|
||||
For a layout that repeatedly stops short at an opening, `guide` can suggest a passage while letting search choose where to turn. To compare this with realizing a physical starting path in `seed`, see the [routing mode choices](tune-and-troubleshoot.md#choose-a-routing-mode).
|
||||
|
||||
| Field | Default | Effect |
|
||||
| --- | --- | --- |
|
||||
| `mode` | `"automatic"` | Select a [routing mode](tune-and-troubleshoot.md#choose-a-routing-mode). |
|
||||
|
|
|
|||
|
|
@ -1,16 +1,14 @@
|
|||
# Route a layout
|
||||
|
||||
Start with the [first route](../../README.md#route-a-net), then replace the example ports and add your layout's constraints.
|
||||
To get a result you can experiment with, run the [single-net quick start](../../README.md#route-a-net). To route your own design, set up the board and connections in the order below.
|
||||
|
||||
## Define the inputs
|
||||
|
||||
1. **Choose a coordinate unit.** Inire snaps port coordinates to an integer grid. Choose a unit fine enough to preserve narrow gaps, and use it for widths, radii, clearance, and bounds too.
|
||||
2. **Set source and target headings.** Heading 0 points east and 90 points north. The source heading points along the launch. The target heading points along the arrival. If your device library labels the target port with its outward heading, reverse it by 180 degrees.
|
||||
3. **Add a net for each connection.** Give each `NetSpec` a unique ID and the guide width. Set your process limits through `SearchOptions` and choose the required clearance on `RoutingProblem`.
|
||||
4. **Add keepouts.** Supply Shapely polygons in `static_obstacles` and use `bounds` for the board rectangle. Leave enough access at the ports for the guide and its permitted bends.
|
||||
5. **Run and check.** Call `route(problem, options=options)`. Start with automatic mode for general layouts and [check each net before export](tune-and-troubleshoot.md#read-the-result).
|
||||
|
||||
For the constructor signatures and field defaults, see the [layout input reference](api-reference.md#layout-inputs).
|
||||
3. **Add a net for each connection.** Give each `NetSpec` a unique ID and the guide width. Use your process's allowed bend radii in [`SearchOptions`](api-reference.md#searchoptions).
|
||||
4. **Set the board and keepouts.** Pass the board rectangle as `bounds`, Shapely polygons as `static_obstacles`, and the required physical spacing as `clearance`. For the defaults and accepted inputs, see [`RoutingProblem`](api-reference.md#routingproblem).
|
||||
5. **Route and check.** Call `route(problem, options=options)` with automatic mode for a general layout. Before exporting, [check each net's result](tune-and-troubleshoot.md#read-the-result).
|
||||
|
||||
<a id="connect-a-preplaced-crossing"></a>
|
||||
|
||||
|
|
@ -22,9 +20,9 @@ For the constructor signatures and field defaults, see the [layout input referen
|
|||
|
||||

|
||||
|
||||
Dashed outlines show the complete device footprints. Shading shows the keepouts passed to Inire. The external route connects the two port markers. The arrow at each marker shows the heading.
|
||||
The dashed outlines show the full footprints of crossings A and B. The shaded keepouts leave a port opening on each facing edge. The external waveguide leaves A at `(80, 75)` and enters B at `(260, 115)`. Both arrows point east.
|
||||
|
||||
Inire applies `clearance` around the supplied keepout polygons. A straight approach of width `w` between two keepout edges needs at least `w + 2 * clearance` of open width. Leave room for any turn near the port and check the opening after snapping the port to the grid.
|
||||
Each opening is 12 units wide. A straight approach of width 2 with clearance 4 on each side needs `2 + 2 * 4 = 10` units between keepout edges. Leave extra room for any turn near a port, and check the opening after snapping the port to the grid.
|
||||
|
||||
```python
|
||||
from shapely.geometry import box
|
||||
|
|
@ -59,40 +57,61 @@ problem = RoutingProblem(
|
|||
search = SearchOptions(
|
||||
bend_radii=(25,), sbend_radii=(25,),
|
||||
)
|
||||
opts = RoutingOptions(search=search)
|
||||
run = route(problem, options=opts)
|
||||
options = RoutingOptions(search=search)
|
||||
run = route(problem, options=options)
|
||||
result = run.results_by_net[net_id]
|
||||
assert result.is_valid
|
||||
```
|
||||
|
||||
Before export, check the port joins and clearance against the actual placed-cell geometry. Inire verifies the external route against the keepouts you supplied.
|
||||
|
||||
## Export verified geometry
|
||||
|
||||
Use `result.locked_geometry` to pass a verified net's physical polygons to a layout writer. For a test file, continue from the quick start or the crossing example and write the polygons as WKT in the layout's coordinate unit.
|
||||
|
||||
```python
|
||||
from pathlib import Path
|
||||
|
||||
from shapely.geometry import GeometryCollection
|
||||
|
||||
if not result.is_valid:
|
||||
raise ValueError(f"{result.net_id}: {result.outcome}")
|
||||
|
||||
geometry = GeometryCollection(result.locked_geometry)
|
||||
Path("route.wkt").write_text(geometry.wkt + "\n", encoding="utf-8")
|
||||
```
|
||||
|
||||
For a multi-net layout, apply the validity check to every net you intend to export. If a route is short or colliding, use its outcome to choose the [next troubleshooting check](tune-and-troubleshoot.md#read-the-result).
|
||||
|
||||
## Reuse an existing route
|
||||
|
||||
- **Give the router a route it can move.** Put `result.as_seed()` in `initial_paths` under the net's ID. A seed uses the current start port, width, and geometry settings. A partial seed can suggest an approach. To build a hint from turns and straights, see the [path seed reference](api-reference.md#path-seeds).
|
||||
- **Hold a route fixed.** Add `result.locked_geometry` to `static_obstacles` while routing other nets. The next run applies its own clearance.
|
||||
|
||||
To reuse the verified routes from a first problem as fixed obstacles, add them to a second problem that contains the remaining nets.
|
||||
Route a straight net, then use its polygons as keepouts in a second routing problem. The second net has to detour around one end of the fixed route.
|
||||
|
||||
```python
|
||||
from dataclasses import replace
|
||||
from inire import route
|
||||
from inire import (
|
||||
NetSpec, Port, RoutingOptions,
|
||||
RoutingProblem, SearchOptions, route,
|
||||
)
|
||||
|
||||
first = route(first_problem)
|
||||
locked = tuple(
|
||||
polygon
|
||||
for result in first.results_by_net.values()
|
||||
if result.is_valid
|
||||
for polygon in result.locked_geometry
|
||||
bounds = (0, -50, 100, 50)
|
||||
options = RoutingOptions(search=SearchOptions(bend_radii=(10,)))
|
||||
first = RoutingProblem(
|
||||
bounds=bounds,
|
||||
nets=(NetSpec("fixed", Port(10, 0, 0), Port(90, 0, 0)),),
|
||||
)
|
||||
obstacles = (
|
||||
next_problem.static_obstacles
|
||||
+ locked
|
||||
fixed = route(first, options=options).results_by_net["fixed"]
|
||||
assert fixed.is_valid
|
||||
|
||||
second = RoutingProblem(
|
||||
bounds=bounds,
|
||||
nets=(NetSpec("detour", Port(50, -20, 90), Port(50, 20, 90)),),
|
||||
static_obstacles=fixed.locked_geometry,
|
||||
)
|
||||
second = route(replace(
|
||||
next_problem,
|
||||
static_obstacles=obstacles,
|
||||
))
|
||||
detour = route(second, options=options).results_by_net["detour"]
|
||||
assert detour.is_valid
|
||||
```
|
||||
|
||||
To see the second route detour around a fixed path, run the [locked-path example](../../examples/README.md#route-around-fixed-geometry).
|
||||
To compare the two paths on a plot, see the [fixed-route example](../../examples/README.md#route-around-fixed-geometry).
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
# Tune and troubleshoot a route
|
||||
|
||||
Check whether the layout can fit the connection before spending more search time. Start with the per-net result and change one setting at a time.
|
||||
Start with the net's outcome. It tells you whether to examine the port approach, an overlap, or the search budget.
|
||||
|
||||
## Read the result
|
||||
|
||||
| `result.outcome` | What to inspect |
|
||||
| --- | --- |
|
||||
| `completed` | The path reached its target and passed verification. Use `locked_geometry` for physical polygons and `report.total_length` for length. |
|
||||
| `colliding` | The path reached its target. Read `report` for static, dynamic, or self-collisions and any automatic board containment failure. |
|
||||
| `partial` | Inspect where the path ends. Check the next turn, available radius, and search limit. |
|
||||
| `unroutable` | No path was returned. Check the launch heading and room for the first straight or bend. |
|
||||
| `completed` | The path reached its target and passed verification. Read its length in `report.total_length` and follow the [geometry export steps](route-a-layout.md#export-verified-geometry). |
|
||||
| `colliding` | The path reached its target. Check the collision counts in `result.report` to see whether it overlaps a keepout, another route, or itself. For automatic routing, also check `report.out_of_bounds`. |
|
||||
| `partial` | Locate `result.path[-1].end_port` on the board and check the next turn and radius. If that approach fits, compare search limits. |
|
||||
| `unroutable` | The path is empty. Check the launch heading and room for the first straight or bend. |
|
||||
|
||||
Check `is_valid` before exporting. With explicit `off`, `guide`, or `seed` mode, also check that the physical polygons fit the board if your export requires containment. Automatic mode includes that check in candidate verification.
|
||||
|
||||
## Why a net stopped short
|
||||
|
||||
1. **Check for a geometric bound.** In an automatic run, `max_routed` is an upper bound. If it is below the requested count, read `capacity_limit` or `port_conflicts` to see where to widen a passage or move a port. A result below the bound can still leave feasible nets unfinished.
|
||||
2. **Check the port and turn geometry.** For static or self-collisions, inspect physical clearance and bend room. For dynamic collisions, inspect the routes that compete for the same space.
|
||||
3. **Check the search budget.** If the verified count is below the bound and the geometry looks feasible, try raising a small `search.node_limit`. The limit is per search. A run can try the same net several times.
|
||||
1. **Check whether automatic routing hit a bound.** Compare the verified count with `run.automatic.max_routed`. If the count reaches a bound below the requested total, use `capacity_limit` to locate the passage to widen or `port_conflicts` to find the ports to move.
|
||||
2. **Check the next approach.** Follow a partial route from its endpoint toward the target. Check the width, clearance, allowed turns, and final heading against the physical layout. When none of the allowed bends fits, change the port approach or the available space.
|
||||
3. **Compare two search limits.** If the geometry looks feasible, rerun with a larger `search.node_limit` and compare the path endpoint and verified count. The limit applies per search. One run can search the same net several times. Look up the default and related fields in [`SearchOptions`](api-reference.md#searchoptions).
|
||||
|
||||

|
||||
|
||||
The dashed route stops short at three nodes per search. To reproduce both outcomes, try 3 and 500 with the same layout and options in the [best-effort example](../../examples/09_unroutable_best_effort.py).
|
||||
At three nodes per search the dashed path ends before the first keepout. At 500 the solid path clears the obstacles and reaches the target with the required westbound heading. To reproduce the comparison, change `node_limit` from 3 to 500 in a copy of the [best-effort example](../../examples/09_unroutable_best_effort.py).
|
||||
|
||||
## Choose a routing mode
|
||||
|
||||
|
|
@ -43,9 +43,9 @@ Set `TopologyOptions(mode=...)` and pass it as `topology` in `RoutingOptions`.
|
|||
|
||||
| Observation | Next comparison |
|
||||
| --- | --- |
|
||||
| Multiple routes reach their ports and collide with one another | Try a different `congestion.net_order` or allow more `max_iterations`. Compare the unresolved IDs. |
|
||||
| Valid routes use too many small bends | Increase `objective.bend_penalty`. Compare bend counts and physical lengths to see whether a straighter path needs a longer detour. |
|
||||
| Refinement dominates runtime | Try `refinement.max_windows_per_net=1`. Compare the verified paths and cost before adopting the smaller limit. |
|
||||
| Multiple routes reach their ports and collide with one another | Change `net_order` or `max_iterations` one at a time. Compare which nets remain unresolved. See the accepted values in [`CongestionOptions`](api-reference.md#congestionoptions). |
|
||||
| Valid routes use too many small bends | Increase `bend_penalty`. Compare bend counts and physical lengths to see whether a straighter path needs a longer detour. See [`ObjectiveWeights`](api-reference.md#objectiveweights). |
|
||||
| Refinement dominates runtime | Try `max_windows_per_net=1`. Compare runtime, cost, and verified paths before adopting the smaller limit. See [`RefinementOptions`](api-reference.md#refinementoptions). |
|
||||
|
||||
For a shorter refinement pass, derive the new settings from the `options` already used for the layout.
|
||||
|
||||
|
|
@ -62,5 +62,3 @@ faster_refinement = replace(
|
|||
)
|
||||
run = route(problem, options=faster_refinement)
|
||||
```
|
||||
|
||||
For accepted values and defaults, use the [option reference](api-reference.md#options-and-defaults).
|
||||
|
|
|
|||
|
|
@ -29,13 +29,12 @@ def main() -> None:
|
|||
congestion=CongestionOptions(warm_start_enabled=False, max_iterations=1),
|
||||
)
|
||||
|
||||
print("Routing with a deliberately tiny node budget (should return a partial path)...")
|
||||
print(f"Routing with a node limit of {options.search.node_limit} per search.")
|
||||
run = route(problem, options=options)
|
||||
result = run.results_by_net["budget_limited_net"]
|
||||
if not result.reached_target:
|
||||
print(f"Target not reached as expected. Partial path length: {len(result.path)} segments.")
|
||||
else:
|
||||
print("The route unexpectedly reached the target. Increase difficulty or reduce the node budget further.")
|
||||
print(f"Outcome: {result.outcome}")
|
||||
if result.outcome == "partial":
|
||||
print(f"Partial path contains {len(result.path)} segments.")
|
||||
|
||||
fig, _ax = plot_routing_results(
|
||||
run.results_by_net,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Routing examples
|
||||
|
||||
Run these scripts from the repository root after [installation](../README.md#install). Each script saves a PNG alongside its source.
|
||||
After [installing Inire](../README.md#install), run the scripts from the repository root. Each saves a PNG beside its source.
|
||||
|
||||
```sh
|
||||
python examples/01_simple_route.py
|
||||
|
|
@ -8,31 +8,35 @@ python examples/01_simple_route.py
|
|||
|
||||
## Start with a connection
|
||||
|
||||
Use the [quick start](../README.md#route-a-net) to connect two ports with copyable code. For perpendicular and opposing headings, compare the [port orientations example](05_orientation_stress.py) with its [route plot](05_orientation_stress.png).
|
||||
| Script | What to look for | Preview |
|
||||
| --- | --- | --- |
|
||||
| [Simple route](01_simple_route.py) | One path leaves and enters its ports travelling east. | [Quick-start figure](../README.md#route-a-net) |
|
||||
| [Port orientations](05_orientation_stress.py) | Perpendicular and opposing headings require different approaches, even for nearby ports. | [Port approaches](05_orientation_stress.png) |
|
||||
|
||||
## Route around fixed geometry
|
||||
|
||||

|
||||
|
||||
The straight route is fixed, so the second route loops around its left end. Run the [locked-path example](03_locked_paths.py) to reproduce the detour. To pass a fixed route into your own layout, follow the [route reuse workflow](../docs/user/route-a-layout.md#reuse-an-existing-route).
|
||||
The second route loops around the left end of the fixed straight. To reproduce the detour, run [`03_locked_paths.py`](03_locked_paths.py). To supply your own fixed polygons, follow the [route reuse workflow](../docs/user/route-a-layout.md#reuse-an-existing-route).
|
||||
|
||||
## Fit bends to available room
|
||||
|
||||

|
||||
|
||||
The short path fits a small offset with an S-bend. The longer path has room for a pair of right-angle bends. Run [S-bends and radii](04_sbends_and_radii.py) to see both geometries.
|
||||
Follow the short offset to see a single S-bend. The larger shift has room for a pair of right-angle bends.
|
||||
|
||||
| Example | What to look for | Preview |
|
||||
| Script | What to look for | Preview |
|
||||
| --- | --- | --- |
|
||||
| [S-bends and radii](04_sbends_and_radii.py) | The shapes used for a short offset and for a larger shift. | Compare the two paths in the figure above. |
|
||||
| [Bend proxies](06_bend_collision_models.py) | How an arc, a box proxy for an arc, and a custom physical bend affect the route. | [Bend model comparison](06_bend_collision_models.png) |
|
||||
| [Custom bends](08_custom_bend_geometry.py) | A route whose search proxy and physical bend use different polygons. | [Custom bend overlay](08_custom_bend_geometry.png) |
|
||||
|
||||
## Diagnose congestion or an incomplete route
|
||||
|
||||
| Example | What to look for | Preview |
|
||||
| Script | What to look for | Preview |
|
||||
| --- | --- | --- |
|
||||
| [Congestion resolution](02_congestion_resolution.py) | How rerouting separates nets competing for the same space. | [Separated routes](02_congestion_resolution.png) |
|
||||
| [Best-effort result](09_unroutable_best_effort.py) | Where a path stops with a small node budget. Try `node_limit=500` to complete it. | [Budget comparison](../docs/user/tune-and-troubleshoot.md#why-a-net-stopped-short) |
|
||||
| [Fan-out](07_large_scale_routing.py) | How search states cluster around a bottleneck. The example adjusts the heuristic between iterations through the internal worker. | [Fan-out search overlay](07_large_scale_routing.png) |
|
||||
|
||||
In physical overlays, dashed outlines show search proxies and solid outlines show physical geometry. Inspect clearance using the solid outlines. For red paths, look up `result.outcome` in the [result guide](../docs/user/tune-and-troubleshoot.md#read-the-result).
|
||||
In the bend overlays, the dashed outline shows what search uses to screen candidate moves. The solid outline shows the physical bend you can measure for clearance. To interpret an incomplete or colliding path, read `result.outcome` using the [result guide](../docs/user/tune-and-troubleshoot.md#read-the-result).
|
||||
|
|
|
|||
87
plans/documentation-improvements.md
Normal file
87
plans/documentation-improvements.md
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
# Documentation improvement plan
|
||||
|
||||
Make each section answer a question its reader came to solve. A link should help the reader take the next step, find a needed detail, or verify a claim made in the text. A heading sets the scope for the material under it. Start with the corridor page, then apply the same review to the user guides, developer workflows, benchmark pages, and examples.
|
||||
|
||||
The existing [user guide](../DOCS.md) and [developer guide](../docs/development.md) provide the starting points. Continue using the user pages for layout tasks and the API contract, the developer pages for implementation and investigation, and the [routing archive](../archive/routing/README.md) for plans, captures, and development history.
|
||||
|
||||
## Review sections and links together
|
||||
|
||||
1. **Read the heading on its own.** Identify the question it promises to answer and who will ask it. Check every paragraph, figure, and link against that question. Move a source pointer to the mechanism it explains, a benchmark command to the measurement workflow, and a dated investigation to the archive.
|
||||
2. **Give the reader a usable answer in the section.** For troubleshooting, name an observable symptom, explain what to inspect, and show how that evidence changes the next action. For an algorithm, explain its inputs, decision, and output before pointing to the implementation. For a reference, put the field, default, and effect where the reader can scan them together.
|
||||
3. **Give each link a job in the sentence or table.** Name the command, subsection, implementation decision, or finding that the reader will reach. Place a citation immediately after the claim it supports. Use a table for source and license lookup when the columns make the relationship clear. Remove links whose destination adds no information the reader can use there.
|
||||
4. **Check the landing point.** Follow the link from the rendered page. A trace link should land on the relevant flag and how to read its output. A source link should reach the function or section that implements the behavior. A paper should come with the specific concept and section it supports. Preserve useful heading anchors and send inbound links directly to the section that now owns the material.
|
||||
5. **Tighten the layout after the content is in the right place.** Use numbered steps for a procedure, bullets for independent symptoms or choices, and tables for repeatable lookups. Use a short paragraph to explain why a choice follows from the evidence. Keep an illustration when it shows geometry or a state change the reader would otherwise have to infer.
|
||||
|
||||
| Reader needs | Link placement |
|
||||
| --- | --- |
|
||||
| Find an overlapping component | In the troubleshooting step that says which overlap fields to inspect and how to use them. |
|
||||
| Change how lanes are assigned | Beside the explanation of how the corridor planner chooses a crossing position. |
|
||||
| Read the research behind triangle-edge routing | At the claim about representing a route by a sequence of shared-edge crossings. |
|
||||
| Compare guide and seed on the same board | In the benchmark procedure with the case, profile, and expected comparison. |
|
||||
| Reproduce an earlier experiment | Beside the dated result that depends on it, with the matching code revision and command in the experiment record. |
|
||||
|
||||
## Rewrite corridor troubleshooting
|
||||
|
||||
The heading **When a corridor does not lead to a route** fits a missing corridor or a search that stalls. Paths that reach their ports and overlap also need a decision about verification and congestion. Use **Diagnose a missing or colliding route** and keep the existing heading anchor for bookmarks. Divide the actions by observed result.
|
||||
|
||||
| Symptom | What the reader should check |
|
||||
| --- | --- |
|
||||
| No corridor reported | Check that the port can enter free space along its heading after snapping. Inspect the keepouts and the mesh padding at the suspected opening. |
|
||||
| A corridor exists and the path stops short | Locate the first turn the path needs to make. Compare its available room with the allowed radii, then test the seed budget if the geometry fits. |
|
||||
| The paths reach their ports and overlap | Find the pair and component indices in the conflict trace. Compare the overlap with the layout to see whether the nets compete for the same opening. |
|
||||
|
||||
Proposed copy for the third symptom.
|
||||
|
||||
> **The paths reach their ports and overlap.** Use the [conflict trace](../docs/routing-diagnostics.md#traces) to identify the nets and the overlapping components. Locate those components on the board. If both nets compete for the same opening, inspect their lane order and available turn room before increasing the seed budget.
|
||||
|
||||
The conflict trace belongs in this step because it identifies the pair and where to look on the board. Put the implementation pointer under **Choose a passage and a lane** in the algorithm section. Give maintainers a reason to follow it, such as checking how crossing positions are sampled or how reservations affect another net's access. Point to the [mesh lane assignment](../inire/router/_topology.py#L214).
|
||||
|
||||
Use `run.topology` to check corridor counts and seeded net IDs when the selected worker reports them. The geometry and component indices supply the location of an overlap. Verify the finished wording against the [topology result fields](../inire/results.py).
|
||||
|
||||
## Explain why the research citations belong
|
||||
|
||||
Replace the generic introduction to earlier detailed-routing work with two specific references. Put the first beside the description of portals and the second beside the explanation of why a connected passage still needs a realizable waveguide. Each note should make sense to a developer who reads it and continues through the guide without opening the paper.
|
||||
|
||||
Proposed copy for the shared-edge representation.
|
||||
|
||||
> A portal is a shared edge between adjacent free-space triangles. For an earlier representation of a route by its crossings of triangle edges, see Section III-A and Figure 1 of [Hama and Etoh's curvilinear detailed-routing paper](https://www.cecs.uci.edu/~papers/compendium94-03/papers/1998/aspdac98/pdffiles/06c_3.pdf).
|
||||
|
||||
Proposed copy for physical constraints.
|
||||
|
||||
> A passage can be connected in the mesh and leave too little room to bend onto the target port's heading. For the bend-radius and port-alignment rules that constrain the physical route, see Section II-B of [LiDAR 2.0](https://arxiv.org/html/2505.17239v1#S2.SS2).
|
||||
|
||||
Use the first citation for the historical representation and the second for the photonic design constraints. Explain Inire's lane sampling, allowed bend geometry, and preplaced crossing workflow from Inire's own code and examples. In the benchmark fixture guide, keep the LiDAR dataset source and license beside the cases they document.
|
||||
|
||||
## Review the user path
|
||||
|
||||
| Page | What to improve | Reader check |
|
||||
| --- | --- | --- |
|
||||
| [README](../README.md) | Keep installation and the runnable connection close together. Identify the expected length and why the two headings are eastbound. Use the end of the quick start to lead into the layout workflow. | A new user can run a route and recognize success from the printed value and figure. |
|
||||
| [User guide index](../DOCS.md) | Group navigation around describing a layout, checking a result, changing a setting, and looking up an API field. Put commonly used reference links next to the tasks that need them. | A user with a partial route or a port-heading question can choose a destination from the link text. |
|
||||
| [Layout guide](../docs/user/route-a-layout.md) | Walk through coordinates, arrival headings, physical keepouts, and valid output in the order users supply them. In the placed-crossing example, label the two finite footprints, local port openings, and external net. Use the real opening width and clearance to explain why the approach fits. | A user can substitute their own crossing footprints and route between ports without needing a benchmark fixture. |
|
||||
| [Tuning and troubleshooting](../docs/user/tune-and-troubleshoot.md) | Lead with the observed outcome and the next check. Connect each adjustment to an observable difference in coverage, cost, or work. Place the reference link at the setting whose accepted values the user needs. | A user can distinguish a capacity limit, a clearance problem, and a route that needs more search. |
|
||||
| [API reference](../docs/user/api-reference.md) | Give canonical signatures, units, defaults, and result fields. Use a short use case for any option whose effect is hard to infer. Send readers to the worked workflow where they need a runnable example. | A user can look up an option or interpret a status without reading implementation code. |
|
||||
| [Examples gallery](../examples/README.md) | Show what to notice in each selected image and link its runnable source separately in the example table. Caption the difference between a physical route and a search proxy where both are drawn. | A reader can choose a relevant script and tell what its output demonstrates. |
|
||||
|
||||
## Review the developer path
|
||||
|
||||
| Page | What to improve | Reader check |
|
||||
| --- | --- | --- |
|
||||
| [Developer guide](../docs/development.md) | Route contributors to the task they need to perform. Put environment setup, correctness checks, and parity in the change workflow. Link archive material from the task where it matters. | A contributor can choose the right check for a policy change or a cleanup. |
|
||||
| [Architecture](../docs/architecture.md) | Explain the planner and worker decisions in execution order. Attach code pointers to the invariants they implement, such as preserving verified IDs during refinement. Use the architecture diagram to explain decisions and stop conditions. | A maintainer can find where to change lock order, bounds, or route acceptance and knows what to verify. |
|
||||
| [Topological routing](../docs/topological-routing.md) | Apply the troubleshooting and citation rewrites above. Use the three-panel figure to distinguish the portal sequence, lane suggestion, and verified physical path. Place the mode comparison link with its explanation of what a developer can learn from that run. | A developer can explain why a corridor can exist while seed realization or final routing still falls short. |
|
||||
| [Diagnostics](../docs/routing-diagnostics.md) | Move from a symptom to a field or a trace, then show what evidence to compare. In the fan-out walkthrough, identify the restored conflict and the final verified count. Keep detailed field lookups and scratch capture commands near their use. | A developer can collect a trace, identify the conflicting components, and tell what changed after repair. |
|
||||
| [Benchmarks](../docs/benchmarks.md) | Keep the first command and expected report at the top. Describe what each case or profile isolates and put the next comparison beside the example output. | A developer can run a case, compare the same verified net set, and choose a holdout for a retry. |
|
||||
| [Benchmark fixtures](../docs/benchmark-fixtures.md) | Put provenance, license terms, source pins, and regeneration under their relevant fixture family. State what unseeded routing and a reference path each establish. | A developer can reproduce the input and explain whether a run measures routing policy or checks a feasibility witness. |
|
||||
| [Benchmark results](../docs/benchmark-results.md) | Lead with the decision each measurement informs. Record its profile, baseline, and date near the finding. Put historical run detail beside the linked archive entry. | A developer can tell which decision the result supports and where to recover the original run. |
|
||||
| [Archive index](../archive/routing/README.md) | Describe the purpose of each group of historical plans, captures, and baselines. Link to the current capture workflow where a maintainer needs to reproduce results. | A developer can find the corresponding raw record and identify the workflow for a fresh capture. |
|
||||
|
||||
## Order of work and acceptance
|
||||
|
||||
1. Edit the corridor page first. Review its headings, the three troubleshooting actions, the placement of the lane implementation link, and the two citations together. Keep the original symptom heading's anchor and verify inbound navigation from architecture and benchmarks.
|
||||
2. Follow the new-user path from the README to an exported path, then repeat it with an incomplete route. Walk through a placed crossing with finite keepouts and verify that the diagram, code, and explanation use the same ports and clearances.
|
||||
3. Follow the developer path from a behavior change to the relevant algorithm, a benchmark case, and a diagnostic capture. Audit the references so that historical evidence, source code, and runnable instructions appear where they serve that workflow.
|
||||
4. Read the rendered pages at desktop and narrow widths. Review the heading outline first, then read each linked sentence and open its destination. Check local links, figures, legacy anchors, source pins, and the accessibility of cited sections. Check that figure captions explain what to inspect and that color has a label or line-style counterpart.
|
||||
5. Run the published quick start, locked-path and placed-crossing snippets, overloaded-gate smoke run, offset-gates comparison, and one fan-out diagnostic capture. Use scratch outputs for the commands. Verify the stated results and check field names and defaults against the implementation.
|
||||
|
||||
During review, read the sentence or task as though the link were plain text. It should still tell the reader what to do or understand. The destination should deliver the named detail, evidence, or command.
|
||||
|
|
@ -123,8 +123,12 @@ def _placed_crossing(directory: Path) -> None:
|
|||
_heading(ax, port, 10)
|
||||
ax.text(port.x + dx, port.y + dy, label, color=INK, fontsize=10, ha="left" if dx > 0 else "right")
|
||||
|
||||
for label, opening, label_position in (
|
||||
("A port opening", (76, 79), (94, 117)),
|
||||
("B port opening", (263, 111), (219, 77)),
|
||||
):
|
||||
ax.annotate(
|
||||
"Port access opening", xy=(76, 79), xytext=(94, 117), color=INK, fontsize=10,
|
||||
label, xy=opening, xytext=label_position, color=INK, fontsize=10,
|
||||
arrowprops={"arrowstyle": "->", "color": MUTED}, zorder=8,
|
||||
)
|
||||
ax.annotate(
|
||||
|
|
|
|||
Loading…
Reference in a new issue