Lecture17 Routing
Lecture17 Routing
10/18/08 1
Introduction to Routing
10/18/08 2
Routing in design flow
B
A C
Netlist
INV
Routing
AND
OR
Floorplan/Placement
3
The Routing Problem
• Apply it after floorplanning/placement
• Input:
– Netlist
– Timing budget for, typically, critical nets
– Locations of blocks and locations of pins
• Output:
– Geometric layouts of all nets
• Objective:
– Minimize the total wire length, the number of vias, or just
completing all connections without increasing the chip area.
– Each net meets its timing budget.
4
The Routing Constraints
• Examples:
– Placement constraint
– Number of routing layers
– Delay constraint
– Meet all geometrical constraints (design rules)
– Physical/Electrical/Manufacturing constraints:
• Crosstalk
• Process variations, yield, or lithography issues?
5
Steiner Tree
• For a multi-terminal net, we can construct a
spanning tree to connect all the terminals
together.
• But the wire length will be large.
• Better use Steiner Tree:
A tree connecting all terminals and some Steiner
additional nodes (Steiner nodes). Node
• Rectilinear Steiner Tree:
Steiner tree in which all the edges run horizontally
and vertically.
6
Routing Problem is Very Hard
7
Kinds of Routing
• Global Routing
• Detailed Routing
– Channel
– Switchbox
• Others:
– Maze routing
– Over the cell routing
– Clock routing
8
Approaches for Routing
• Sequential Approach:
– Route nets one at a time.
– Order depends on factors like criticality, estimated wire length, and
number of terminals.
– When further routing of nets is not possible because some nets
are blocked by nets routed earlier, apply ‘Rip-up and Reroute’
technique (or ‘Shove-aside’ technique).
• Concurrent Approach:
– Consider all nets simultaneously, i.e., no ordering.
– Can be formulated as integer programming.
9
Classification of Routing
10
General Routing Paradigm
Two phases:
11
Extraction and Timing Analysis
12
Global Routing
13
Region Definition
Divide the routing area into routing regions of simple shape
(rectangular):
Switchbox
Channel
14
Routing Regions
15
Routing Regions in
Different Design Styles
Feedthrough Cell
16
Region Assignment
Assign routing regions to each net. Need to consider timing
budget of nets and routing congestion of the regions.
17
Graph Modeling of
Routing Regions
18
Grid Graph
19
Checker Board Graph
capacity
1 1 1
2 2 1 1
1 1 1
20
Channel Intersection Graph
21
Approaches for Global Routing
Sequential Approach:
– Route the nets one at a time.
– Order dependent on factors like criticality, estimated wire
length, etc.
– If further routing is impossible because some nets are
blocked by nets routed earlier, apply Rip-up and Reroute
technique.
– This approach is much more popular.
22
Approaches for Global Routing
Concurrent Approach:
– Consider all nets simultaneously.
– Can be formulated as an integer program.
23
Pin Assignment
Assign pins on routing region boundaries for each net.
(Prepare for the detailed routing stage for each region.)
24
25
Maze Routing
10/18/08 26
Maze Routing Problem
• Given:
– A planar rectangular grid graph.
– Two points S and T on the graph.
– Obstacles modeled as blocked vertices.
• Objective:
– Find the shortest path connecting S and T.
• This technique can be used in global or detailed
routing (switchbox) problems.
27
Grid Graph
S S
S
T X X
T
X X T
28
Maze Routing
29
Lee’s Algorithm
30
Basic Idea
• A Breadth-First Search (BFS) of the grid graph.
• Always find the shortest path possible.
• Consists of two phases:
– Wave Propagation
– Retrace
31
An Illustration
S
0 1 2 3
1 2 3
3 4 5
T
5 4 5 6
32
Wave Propagation
• At step k, all vertices at Manhattan-distance k from S
are labeled with k.
• A Propagation List (FIFO) is used to keep track of the
vertices to be considered next.
S S S
0 0 1 2 3 0 1 2 3
1 2 3 1 2 3
3 3 4 5
T T T
5 4 5 6
After Step 0 After Step 3 After Step 6 33
Retrace
• Trace back the actual route.
• Starting from T.
• At vertex with k, go to any vertex with label k-1.
S
0 1 2 3
1 2 3
3 4 5
T
5 4 5 6
Final labeling
34
How many grids visited using Lee’s algorithm?
13 121110 7 6 7 7 9 10
12 1110 9 6 5 6 7 8 9 101112
1110 9 8 7 6 5 4 7 8 9 1011
10 9 8 7 6 5 4 3 6 7 8 9 10
7 6 54 3 2 1 2 3 4 5 67 8 9
6 5 4 3 2 1 S1 23 4 5 6 7 8
9 8 7 6 3 2 1 2 3 4 5 6 78 9
10 9 8 7 3 5 6 7 8 9 10
1110 9 8 9 10 76 7 8 9 1011
12 11 10 11121110 9 8 9 101112
13 12 11121312 1110 9 10111213
12 13 1312 1110 111213
13 13 1211 1213
1312 T 13
13
35
Time and Space Complexity
36
Improvement to Lee’s Algorithm
• Improvement on memory:
– Aker’s Coding Scheme
• Improvement on run time:
– Starting point selection
– Double fan-out
– Framing
– Hadlock’s Algorithm
– Soukup’s Algorithm
37
Aker’s Coding Scheme
to Reduce Memory Usage
10/18/08 38
Aker’s Coding Scheme
39
Aker’s Coding Scheme
S Sequence:
...… (what sequence?)
T S
S T
S S
T T
41
Hadlock’s Algorithm
to Reduce Run Time
10/18/08 42
Detour Number
For a path P from S to T, let detour number d(P) = #
of grids directed away from T, then
L(P) = MD(S,T) + 2d(P)
length
shortest Manhattan distance
D D
D: Detour
D
S d(P) = 3
MD(S,T) = 6
T L(P) = 6+2x3 = 12
43
So minimizing L(P) and d(P) are the same.
Hadlock’s Algorithm
• Label vertices with detour numbers.
• Vertices with smaller detour number are expanded
first.
• Therefore, favor paths without detour.
3 2 2 2 2 2 2
2 1 1 2 2
1 S 0 2
1 0 0
1 0 0 2 T
2 1 1 2 2
3 2 2 2 2 2
44
Soukup’s Algorithm
to Reduce Run Time
10/18/08 45
Basic Idea
• Soukup’s Algorithm: BFS+DFS
– Explore in the direction towards the target without changing
direction. (DFS)
– If obstacle is hit, search around the obstacle. (BFS)
• May get Sub-Optimal solution.
2
2 1
1 S 1
1 1
1 T
2 1 1
2 2
46
How many grids visited using Hadlock’s?
47
How many grids visited using Soukup’s?
48
Multi-Terminal Nets
49
Multi-Terminal Nets
50
Extension to Multi-Terminal Nets
S S
0 1 2 T3 0 S0 S0 S0
2 3 1 1 1
T T
3 2 2 2
51