inire/docs/topological-routing.md

51 lines
4.4 KiB
Markdown
Raw Normal View History

<a id="topological-routing-and-benchmarks"></a>
# Topological routing
`guide` suggests a passage for detailed search. `seed` tries to build a starting path through that passage first.
## Corridor planning and realization
![Three views of the offset-gates fixture. The first highlights proposed triangle edges to cross, the second connects chosen crossing points, and the third shows the solid verified path beside the dashed suggestion.](figures/corridor-realization.png)
Read the panels from top to bottom. Follow the crossed triangle edges, the suggested crossing points, then the S-bend in the verified route.
1. **Find space for centerlines.** Inset the board by half the widest guide's width. Expand obstacles by that amount plus clearance. Try a straight port lead to reach the mesh, or use the port itself. A flush port can reach the inset mesh via a lead whose flat end fits on the board. Nets can reuse shared corridors when the mesh has open space around both ports and the area between them. A narrower mesh can recover missing corridors and add passages near keepouts or board edges. If a shared guide fails and a reserved route occupies that shared space, the worker can build a narrower mesh on demand. A straight path that fits in the shared mesh can supply its own alternate guide.
<a id="design-background"></a>
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).
2. **Choose a passage and a lane.** Rank passages by distance and competing nets. Assign lanes jointly by reserving space on shared triangle edges as each net is planned.
- [Lane scoring](../inire/router/_topology.py#L255)
3. **Turn the sketch into a path.** Guide mode suggests moves and adds a soft cost. Seed mode searches within a corridor and checks the resulting seed against obstacles and earlier seeds. With alternatives, it allocates at least half the seed budget to the first corridor. With at least two iterations and positive guidance strength, an explicit guided run that leaves unresolved nets can retry with the guidance cost disabled. Guide and seed modes can verify a complete supplied layout before building corridors.
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, `run.topology.corridor_counts` shows how many passages the planner found per net. In seed mode, `run.topology.seeded_net_ids` shows which nets received a generated starting path.
- **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 fail clearance checks.** Use the [conflict trace](routing-diagnostics.md#find-components-in-conflict) to identify the pair and locate the components. If they share an opening, check which lanes the routes used and where they turned. A turn inside the opening may leave too little room for the neighboring route.
<a id="moved-benchmark-sections"></a>
## Reproduce a routing comparison
<a id="reproduce-a-comparison"></a>
Compare expansions and seeded IDs on offset gates at the same search budget.
- [Matched-budget command](benchmarks.md#compare-routing-modes)
### Benchmark fixtures and prior runs
- <a id="benchmark-corpus"></a>[Benchmark cases](benchmarks.md#choose-a-case)
- <a id="imported-fixtures"></a>[Fixture sources and regeneration](benchmark-fixtures.md)
- <a id="probe-budget-and-coverage"></a><a id="retry-experiments"></a><a id="experiment-archive"></a>[Probe and retry experiments](benchmark-results.md#near-port-probe-and-retry-experiments)