Problemadvanced
Escape routing
Also called pin escape routing.
Route a wire from each pin of a dense pin array on a package or board to the array's boundary, without crossings, often solved by network flow.
Escape routing is the first routing step for a component with a dense array of pins, such as a ball grid array (BGA) package or a flip-chip die. Each pin that carries a signal must get a wire that leaves the pin array, so that the board router can continue it outside. The pins are close together, only a few wires fit between two neighbor pins, and on one layer the wires cannot cross. The problem asks for one wire per pin, from the pin to the boundary of the array, within these capacities. When any wire may end at any point of the boundary, the problem is a maximum flow problem with vertex capacities, and it is solved exactly in polynomial time. When the order of the wires on the boundary is fixed, or with several layers and pairs of wires that must stay together, the problem gets harder, and the methods are measured on industrial cases.
In plain words
Picture a crowded room with seats in a square pattern, and a person in each seat. Everyone must walk to a door on the outer wall. Between two neighbor seats there is room for only one person at a time, and no two people may use the same spot. The people in the front row walk straight out. The people in the middle must squeeze between the front-row seats, and there are only so many gaps.
Escape routing asks whether everyone can get out, and if not, how many can. On one layer the wires cannot cross.
If it does not matter which door each person uses, the question has an exact answer from network flow: each gap is a pipe of capacity one, and the largest flow from the seats to the doors is the largest number of people who get out.
Definition
Input.
- A routing graph drawn in the plane without crossings, for one routing layer. Its nodes are the routing points around and between the pins.
- A capacity for each node and for each edge: the number of wires that can pass there.
- A set of pins to escape, and a set of exits on the boundary of the array.
Feasible solution. A set of paths, one for each pin of a chosen subset , where the path of pin starts at and ends at an exit. At most paths use node and at most paths use edge , a pin node is used only by its own path, and the paths can be drawn without crossings.
Objective. The decision version asks whether is possible: can every pin escape? The optimization version maximizes , and among the solutions with the most escaped pins it minimizes the total wire length.
Grid model. The usual model, and the one in CLRS, is an grid with for every node. Then the paths are vertex-disjoint, and vertex-disjoint paths in a plane graph never cross, so the condition on crossings is automatic.
Variants
- Unordered and ordered. In the unordered version a wire may end at any exit. In the ordered version the wires must reach the boundary in a given order, the order of the pins on the next component, so that the board can be routed without crossing outside the array.
- Edge-disjoint escape. The paths may share nodes but not edges, as in the problem of Chan, Chin and Ting.
- Diagonal routing. Boards and packages often route at 45 degrees. Two pins on a diagonal are farther apart than two neighbor pins in a row, so more wires fit between them. This diagonal capacity must be part of the model.
- Multilayer escape. Each pin also chooses a layer, through a via under the pin, and the layers share the via sites.
- Differential pairs. Two wires of a pair must run side by side to the boundary.
- Missing pins and blockages. Some positions of the array have no pin, or hold power pins that need no escape wire, and they open more room.
Examples
All pins of a block, vertex-disjoint. Take the grid with nodes , , capacity 1 on every node, and the 16 border nodes as exits. The pins are the 9 inner nodes with . The 8 pins of the inner ring each have a border neighbor and escape in one step. The center pin has only pins as neighbors, and each of them is already used by its own path. So at most 8 of the 9 pins escape. If the pin at is removed, all 8 remaining pins escape: the center goes through the free node to .
A ball grid array with one track between balls. Take an array of balls and a routing grid in which one wire fits between two neighbor balls. In the grid coordinates, ball is at the point , the routing grid has points, the points of its outer ring are the exits, and every point that is not a ball has capacity 1. Wires run along the grid lines, with no diagonal steps. The maximum flow gives these counts of escaped balls:
| 5 | 6 | 7 | 8 | 9 | 10 | |
|---|---|---|---|---|---|---|
| balls | 25 | 36 | 49 | 64 | 81 | 100 |
| escaped, one track between balls | 25 | 36 | 44 | 52 | 60 | 68 |
| escaped, two tracks between balls | 25 | 36 | 49 | 64 | 81 | 96 |
A cut proves the count for with one track. The outer ring has balls, and each side of it has gaps, 24 gaps in all. A wire from an inner ball must leave through one of these gaps. At each corner, the two gaps next to the corner ball can be reached from the inside only through one grid point, the point diagonal to the corner ball, which has capacity 1. So at most inner balls escape, and at most balls in all. The flow reaches 44. The same count gives the bound for every , and the table shows that it is reached for .
With diagonal steps, the corner points are no longer a bottleneck of capacity 1, and the counts change. This is the reason why the diagonal capacity must be modeled.
Known algorithms
| Method | Version | What is known |
|---|---|---|
| Maximum flow with vertex capacities, for example by Dinic's algorithm | unordered, one layer, grid model | exact; the flow value is the largest number of escaped pins |
| Min-cost flow | unordered, one layer, grid model | exact; the most escaped pins with the least total length |
| Flow model with extra nodes inside each tile (Yan and Wong 2009) | unordered, one layer, with diagonal capacity | exact for this model; earlier flow models could violate the diagonal capacity or miss a legal routing |
| Rectangle test (Chan, Chin and Ting 2003) | edge-disjoint, grid | exact decision in quadratic time |
| Integer programming and SAT formulations | ordered, multilayer, differential pairs | exact with exponential worst-case time, or heuristic; measured on industrial designs |
What is proved: the unordered one-layer versions above are solved exactly in polynomial time by flow. What is only measured: the methods for the ordered, multilayer and pair versions, which are compared on test boards and packages.
Bounds
Cut bound. For a set of nodes that contains no exit, every path from a pin in leaves . So the number of pins in that escape is at most the capacity of any set of nodes that separates the pins of from the exits. By the max-flow min-cut theorem, in the grid model the least capacity of a separator between all pins and the exits equals the maximum number of escaped pins. With capacity 1 this is Menger's theorem for vertex-disjoint paths.
Rectangles are enough for edge-disjoint paths. In the edge-disjoint grid version, Chan, Chin and Ting showed that every pin escapes exactly when no rectangle of the grid holds more pins than outlets, the edges by which a path can leave the rectangle. So the cut bound needs to be checked only on rectangles.
One track between balls. As in the example, at most balls of an array escape in the rectilinear model with one track between balls. So beyond , a single layer cannot escape the whole array, and the other balls need more layers.
Running time. The flow network of an array with tracks between balls has nodes and edges, and at most units of flow. Augmenting paths give time , and faster flow algorithms do better.
Reductions
- To maximum flow. Add a source joined to every pin and a sink joined from every exit. Split each node into an in-node and an out-node joined by an arc of capacity , and give each edge its capacity in both directions. An integral maximum flow gives the escape wires, because a maximum flow with integer capacities can be chosen integral.
- To vertex-disjoint paths. In the grid model with capacity 1, an escape routing is a set of vertex-disjoint paths from the pins to a new node joined to all exits.
- Ordered version and river routing. With the order on the boundary fixed, the wires outside the array form a river routing problem, in which the wires on one layer keep their order.
Applications
- Package and board design. The balls of a BGA must escape to the board, and the bumps of a flip-chip die must escape to the package, before the rest of the board or package is routed.
- Layer count. The number of balls that escape on one layer decides how many board layers a component needs, which is a large part of the board cost.
- Teaching flows. The grid model is a standard exercise on maximum flow with vertex capacities.
References
- Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein, Introduction to Algorithms, third edition, MIT Press, 2009, Chapter 26, Problem 26-1, the escape problem (vertex-disjoint paths from given grid points to the boundary, solved with vertex capacities and maximum flow)
- Tan Yan and Martin D. F. Wong, A correct network flow model for escape routing, Proceedings of the 46th Design Automation Conference (DAC), 332 to 335, 2009, the failure of earlier flow models to capture the diagonal capacity between pins, and a flow model that captures it, which gives an optimal method for the unordered problem
- Wun-Tat Chan, Francis Y. L. Chin and Hing-Fung Ting, Escaping a grid by edge-disjoint paths, Algorithmica 36(4), 343 to 359, 2003, the condition that no rectangle holds more sources than outlets, which is necessary and sufficient for the edge-disjoint version, and a quadratic time test (general locator)
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag 5WDHQF Edit this page History Report an error Markdown