Support whole custom S-bend outlines and recover routing detours

This commit is contained in:
Jan Petykiewicz 2026-11-28 10:57:01 -08:00
commit 3d7fc3a705

View file

@ -10,13 +10,13 @@ Guide mode suggests where a path can pass through free space and lets detailed s
In the offset-gates example, the two openings are at different heights. The top panel highlights the proposed sequence of triangle edges to cross. In the middle panel, the dashed line joins suggested crossing points. In the bottom panel, the solid route uses an S-bend to change height between the openings.
1. **Find connected space for centerlines.** Inset the board by half the widest guide's width and expand obstacles by that half-width plus clearance. To connect a port to the mesh, try a short straight along its departure or arrival heading, or use the port position itself. If the shared mesh finds no passage for a narrower net, retry with padding for its width.
1. **Find connected space for centerlines.** Inset the board by half the widest guide's width and expand obstacles by that half-width plus clearance. To connect a port to the mesh, try a short straight along its departure or arrival heading, or use the port position itself. A lead from a flush port can cross the inset boundary when its flat-ended footprint fits inside the board and clears the keepouts. If the shared mesh finds no passage for a narrower net, retry with padding for its width.
<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 a sequence of portals by distance and how many other nets want to use the same edges. A lane is a suggested position along an edge where a net can cross into the next triangle. Rank those positions by turn room and the lanes reserved for other nets. A joint retry can change the lane positions for several nets at the same opening. To see how the positions are scored, inspect [`assign_lanes()`](../inire/router/_topology.py#L214).
2. **Choose a passage and a lane.** Rank a sequence of portals by distance and how many other nets want to use the same edges. A lane is a suggested position along an edge where a net can cross into the next triangle. Rank those positions by turn room and the lanes reserved for other nets. A joint retry can change the lane positions for several nets at the same opening. To see how the positions are scored, inspect [`assign_lanes()`](../inire/router/_topology.py#L247).
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.