Problemcore
Channel routing problem
Also called two-layer channel routing.
Connect the pins on the top and bottom edges of a rectangular channel with trunks on one layer and branches on the other, in the fewest tracks.
The channel routing problem is the classical form of detailed routing in chip layout. A channel is a rectangle between two rows of cells. Pins lie on its top and bottom edges, and each pin belongs to a net. The task is to connect the pins of every net inside the channel, with horizontal wires (trunks) on one layer and vertical wires (branches) on another, so that wires of different nets never share a point of the same layer. The width of the channel is the number of horizontal tracks, and it is the objective: fewer tracks give a smaller chip. Unlike a switchbox, a channel can always grow, so the question is how many tracks are needed, not whether a routing exists. The channel density is a lower bound, and the decision version is NP-complete, with or without doglegs.
In plain words
Picture a long corridor with doors on the north wall and on the south wall. Each door has a color, and all doors of the same color must be joined by rope. Ropes that run along the corridor lie on the lower floor, in lanes. Ropes that run across the corridor lie on the upper floor, and a rope can go between the floors through a hole.
Ropes of different colors may not touch on the same floor. The goal is to use as few lanes as possible, since each lane makes the corridor wider.
Two things make this hard. Where two colors meet at the same spot along the corridor, they need different lanes. Where one door on the north wall faces a door of another color on the south wall, the north rope must use a lane closer to the north wall.
Definition
Input.
- A number of columns , and for each column a top pin and a bottom pin . Each pin is the label of a net, or 0 for no pin.
- A net is a label that appears on at least two pins. Its interval runs from its leftmost to its rightmost pin column. Nets with all pins in one column are routed by a straight branch and are left out.
Routing grid in the reserved two-layer model. For tracks, the grid has the points with and . Track is the row , numbered from the top. Row 0 is the top edge and row the bottom edge.
- Layer H holds trunks: edges from to for .
- Layer V holds branches: edges from to .
- A via joins the two layers at one point .
- The top pin of column is the point on layer V, and the bottom pin is on layer V. The edge rows hold no other wire.
Feasible solution. For each net, a set of points on the two layers, with edges and vias, that is connected and holds all the pins of the net. No point of a layer belongs to two nets. This is the Manhattan model: wires run only horizontally and vertically.
Objective. Minimize . The decision version asks, for a given , whether a feasible routing with exists.
Constraints that every routing meets.
- Horizontal. Two nets whose intervals meet need different tracks in each column that both cross.
- Vertical. If column has top pin and bottom pin , the branch of comes down from row 0 and the branch of comes up from row in the same column. So the point where leaves the column must be above the point where leaves it. These constraints form the vertical constraint graph.
Variants
- No doglegs. Each net uses exactly one trunk on one track. A solution is a map from nets to tracks. This is the model of the left-edge algorithm and of the Yoshimura-Kuh algorithm.
- Doglegs at pin columns. A net may change track only in a column where it has a pin. This is the model of dogleg channel routing.
- Unrestricted doglegs. A net may change track in any column, if the branch layer is free there. The greedy channel router works in this model.
- Extension columns. Wires may leave the channel through its open left and right ends. The greedy router uses this to finish every channel.
- Unreserved layers. Both layers carry wires in both directions, and wires may cross on different layers at a point. The knock-knee model, where two nets may bend at the same point, is a further relaxation.
- More layers. Three-layer channels use HVH or VHV, with two trunk layers or two branch layers.
- Secondary objectives. Among routings with the fewest tracks, minimize the total wire length or the number of vias.
- One layer. With one layer, no crossings are possible at all, and the pins must be in the same order on both sides. This is river routing.
Examples
Four nets in two tracks. Take with
| column | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| top | 1 | 0 | 2 | 1 | 3 | 0 | 4 | 0 |
| bottom | 0 | 2 | 0 | 3 | 0 | 4 | 0 | 3 |
The intervals are , , and , and the density is 2. The only vertical constraint comes from column 4: net 1 is on top and net 3 at the bottom, so net 1 must be on a higher track than net 3. One optimal routing is
| track | trunks |
|---|---|
| 1 | net 1 on columns 1 to 4, net 4 on columns 6 to 7 |
| 2 | net 2 on columns 2 to 3, net 3 on columns 4 to 8 |
and each pin gets a branch from its edge to the trunk of its net. In column 4, the branch of net 1 runs from row 0 to track 1, and the branch of net 3 from row 3 to track 2, so they do not meet. One track is not enough, because columns 2 and 3 hold two nets each.
A channel with no routing without doglegs. Take , with top pins and bottom pins . Column 1 needs net 1 above net 2, and column 2 needs net 2 above net 1. No map from nets to tracks meets both, for any number of tracks. With jogs in any column and one extra column past the right end, three tracks are enough. The page on channel density shows that two tracks are never enough, so the optimum in that model is 3, while the density is 2.
Deutsch's difficult example. A channel published by Deutsch in 1976 became the standard test case of the field. Its density is 19. Burstein and Pelavin reported in 1983 that their hierarchical router routed it in 19 tracks, and that the routers known to them needed 20 or more. These are measured results on one instance, not proved bounds for a method.
Known algorithms
| Method | Model | What is known |
|---|---|---|
| Left-edge algorithm (Hashimoto and Stevens 1971) | no doglegs | optimal, with tracks, when there are no vertical constraints; with constraints a heuristic that fails on a cycle |
| Dogleg channel routing (Deutsch 1976) | doglegs at pin columns | heuristic; breaks some cycles of the constraint graph |
| Yoshimura-Kuh algorithm (1982) | no doglegs, with a dogleg form | heuristic that merges nets to keep the longest constraint path short |
| Greedy channel router (Rivest and Fiduccia 1982) | unrestricted doglegs, extension columns | always finishes; the track count is measured, not bounded |
| Hierarchical channel router (Burstein and Pelavin 1983) | doglegs | heuristic; measured on Deutsch's difficult example |
| Exhaustive search, branch and bound, integer programming | any | exact; exponential in the worst case |
What is proved: the density bound, the constraint graph bound in the model without doglegs, the optimality of left-edge without vertical constraints, the completion of the greedy router, and the NP-completeness results below. What is only measured: the track counts of every heuristic on channels with vertical constraints.
| Algorithm | Time | Space | Properties | Code |
|---|---|---|---|---|
| Dogleg channel routing | O(n + P log P + T (P + n)) worst | Θ(P + n) extra | deterministicnot exactiterative | 1 language |
| Greedy channel router | O((n + E) T^2) worst | Θ(T + N) extra | deterministicnot exactiterative | 1 language |
| Left-edge algorithm | O(n + N log N + T (N + n)) worst | Θ(N + n) extra | deterministicnot exactiterative | 1 language |
| Yoshimura-Kuh algorithm | O(n N^2 (N + n)) worst | Θ(N + n) extra | deterministicnot exactiterative | 1 language |
Bounds
Lower bounds.
- Density. Every routing in the reserved two-layer model uses at least tracks, with or without doglegs. The proof is on the page on channel density.
- Longest constraint path. Without doglegs, if the vertical constraint graph has a path through nets, those nets lie on different tracks in a fixed order, so . Doglegs can beat this bound, so it does not hold in the dogleg models.
Feasibility without doglegs. A routing without doglegs exists if and only if the vertical constraint graph has no cycle. If there is a cycle , the tracks would have to satisfy . If there is no cycle, put the nets on tracks in a topological order, one net per track. Every horizontal constraint holds because no two nets share a track, and every vertical constraint holds because of the order. So tracks always suffice for an acyclic channel with nets.
Feasibility with extension columns. With jogs in any column and wires allowed past the ends, every channel can be routed. The greedy channel router is a proof by construction.
Hardness. Deciding whether a channel can be routed in tracks is NP-complete without doglegs (LaPaugh 1980) and with doglegs (Szymanski 1985). The statements and the proof outline are on the page on the NP-completeness of channel routing. So no polynomial algorithm is known that always finds the fewest tracks, and none exists unless P = NP.
Polynomial cases. With no vertical constraints, the problem without doglegs is interval partitioning, solved exactly in time, and the optimum is . If every two intervals meet, each net needs its own track, so the optimum without doglegs is when the constraint graph is acyclic.
Reductions
- To interval partitioning. Without vertical constraints and without doglegs, a track is a set of disjoint intervals, and the problem is to partition the intervals into the fewest such sets.
- To switchbox routing. A channel with tracks is a switchbox of height with no pins on its left and right sides. So hardness results for channels carry over to switchboxes.
- From detailed routing. Flows of the 1970s and 1980s cut the routing area into channels and switchboxes. A global router chose the channel of each net, and the channel router then fixed the tracks.
- One layer. With one layer instead of two, the problem becomes river routing, which has exact linear-time tests.
Applications
- Standard-cell and gate-array layout. In layouts with two or three metal layers, the cells sit in rows with routing channels between them. The total area depends on the sum of the channel widths.
- Building-block layout. Between large blocks, the free space is cut into channels and switchboxes, and each channel is routed on its own.
- Teaching and analysis. In designs with many metal layers, most routing runs over the cells, and gridded area routers replaced channel routers. The channel model stays the simplest setting in which the density bound, constraint graphs and NP-hardness of routing can be stated exactly.
References
- Andrew B. Kahng, Jens Lienig, Igor L. Markov and Jin Hu, VLSI Physical Design, From Graph Partitioning to Timing Closure, second edition, Springer, 2022, Chapter 6, Detailed Routing, the section on channel routing (the channel model, horizontal and vertical constraints, the left-edge, dogleg and greedy routers; general locator)
- Naveed A. Sherwani, Algorithms for VLSI Physical Design Automation, third edition, Kluwer, 1999, the chapter on detailed routing, the part on channel routing (routing models, the constraint graphs and the classical channel routers; general locator)
- A. S. LaPaugh, Algorithms for Integrated Circuit Layout, An Analytic Approach, PhD thesis, MIT, report MIT/LCS/TR-248, 1980, the NP-completeness of channel routing without doglegs (general locator)
- Thomas G. Szymanski, Dogleg channel routing is NP-complete, IEEE Transactions on Computer-Aided Design 4(1), 31 to 41, 1985, the NP-completeness of channel routing in a given number of tracks when nets may dogleg
- D. N. Deutsch, A dogleg channel router, Proceedings of the 13th Design Automation Conference, 425 to 433, 1976, the dogleg router and the large test channel that later papers call Deutsch's difficult example (general locator)
- M. Burstein and R. Pelavin, Hierarchical channel router, Integration, the VLSI Journal 1, 1983, the hierarchical router and its result on Deutsch's difficult example (general locator)
Where this leads
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 8FNZ68 Edit this page History Report an error Markdown