VLSI Physical Design Automation Lecture 18 Global Routing
VLSI Physical Design Automation Lecture 18. Global Routing (II) Prof. David Pan dpan@ece. utexas. edu Office: ACES 5. 434 2020 -10 -26 1
Global Routing Approaches • Sequential Approach (Rip-up and Re-route) – – Maze Routing Line probing Shortest Path Based Algorithms Steiner Tree Based Algorithms • Concurrent Approach – Integer Programming 2020 -10 -26 2
Sequential Approach Algorithm: 1. Graph modeling of the routing regions 2. For each net k: We can use different 2. 1 Find a route r for net k on the graph. methods to do this. 2. 2 For each edge e in r: 2. 2. 1 capacity(e) = capacity(e) - 1 2. 2. 2 if capacity(e) < 0 then cost(e) = cost(e) 2020 -10 -26 3
Maze Routing for Multi-Terminal Nets 2020 -10 -26 4
Maze Routing on Weighted Graph 2020 -10 -26 5
Example of Weighted Graph 2020 -10 -26 6
Mikami & Tabuchi’s Algorithm 2020 -10 -26 7
Line Probing • Keep two lists of line segments, slist and tlist, for the source and the target respectively. • If a line segment from slist intersects with one from tlist, a route is found; else, new line segments are generated from the escape points. S T slist 2020 -10 -26 Intersection tlist 8
Line Probing • We can use all the grid vertices on the line segments as escape points: 1 0 1 1 1 1 Escape point S T 1 0 1 1 Iteration number 1 0 1 • Always find a path but may not be optimal. 2020 -10 -26 9
Hightower’s Algorithm 2020 -10 -26 10
Line Probing • We can pick just one escape point from each line segment. 0 1 0 S T Iteration number 0 Escape point 1 1 0 • May fail to find a path even if one exists. 2020 -10 -26 11
2020 -10 -26 12
Comparison of Algorithms 2020 -10 -26 13
BFS based Maze Routing (A*) • Need to search whole space? – Guide the search to the goal explicitly • A* search is faster if you need “good path”, not “perfect path” – Use priority queue – C(n) = F(n)+H(n) • F(n) is a computed cost from source to current location. • H(n) is a predicted cost from current location to target. • If H(n)=0, it becomes maze routing! – Optimal (shortest path) when H(n) <= H’(n) (no overestimation) • H’(n) is the exact cost • H(n)=0 never overestimates! 2020 -10 -26 14
Maze vs A* routing (I) 2020 -10 -26 15
Maze vs A* routing (II) 2020 -10 -26 16
Shortest Path Based Algorithms • For 2 -terminal nets only. • Use Dijkstra’s algorithm to find the shortest path between the source s and the sink t of a net. • Different from Maze Routing: – The graph need not be a rectangular grid. – The edges need not be of unit length. 2020 -10 -26 17
Dijkstra’s Shortest Path Algorithm • Label of vertices = Shortest distance from S. • Let P be the set of permanently labeled vertices. • Initially, – P = Empty Set. – Label of S = 0, Label of all other vertices = infinity. • While (T is not in P) do – Pick the vertex v with the min. label among all vertices not in P. – Add v to P. – Update the label for all neighbours of v. 2020 -10 -26 18
Dijkstra’s Algorithm: Example Min. Label Vertex B 1 T T 8 14 10 8 8 8 P (Permanently Labeled) B 1 T B 1 10 10 10 B 1 T 8 9 10 2 3 94 6 0 7 S 5 5 2 7 C A B 1 T 8 13 10 2 3 94 6 0 7 S 5 5 2 7 C A A C 8 2 3 94 6 0 7 S 5 5 2 7 8 2 3 94 6 0 7 S 5 5 2 8 2 3 94 6 0 7 S 5 2 A 2020 -10 -26 C C A 19
Steiner Tree Based Algorithms • For multi-terminal nets. • Find Steiner tree instead of shortest path. • Construct a Steiner tree from the minimum spanning trees (MST) 2020 -10 -26 20
FLUTE Overview • Solve Rectilinear Steiner minimal tree (RSMT) problem: – Given pin positions, find a rectilinear Steiner tree with minimum WL • Basic idea: – LUT to handle small nets – Net breaking technique to recursively break large nets • Handling of small nets (with a few pins) is extremely well: – Optimal and extremely efficient for nets up to 7 pins • So FLUTE is especially suitable for VLSI applications: – Over all 1. 57 million nets in 18 IBM circuits [ISPD 98] • Average error is 0. 72% • Runtime faster than minimum spanning tree algorithm – Open source available http: //home. eng. iastate. edu/~cnchu/flute. htm [courtesy of Prof. Chris Chu, Iowa State Univ. ] 2020 -10 -26 21
Preliminary • • A net is a set of n pins Degree of a net is the number of pins in it Consider routing along Hanan grid Define edge lengths hi and vi: 2020 -10 -26 22
Wirelength Vector (WV) • Observation: WL can be written as a linear combination of edge lengths with positive integral coefficients (1, 2, 1, 1, 1, 2) (1, 1, 2, 3) (1, 2, 1, 1) • WL can be expressed as a vector of the coefficients • Called Wirelength Vector 2020 -10 -26 23
Potentially Optimal WV (POWV) • To find optimal wirelength, can enumerate all WVs • However, most WVs can never produce optimal WL – (1, 2, 1, 1, 1, 2) is redundant as it always produces a larger WL than (1, 2, 1, 1) (1, 2, 1, 1, 1, 2) (1, 2, 1, 1) • Potentially Optimal Wirelength Vector (POWV) is a WV that may produce the optimal wirelength 2020 -10 -26 24
# of POWVs is Very Small • For any net, – # of possible routing solutions is huge – # of WVs is much less – # of POWVs is very small • For example, only 2 POWVs for the net below: POWV (1, 2, 1, 1) POWV (1, 1, 2, 1) 2020 -10 -26 25
Sharing of POWVs Among Nets • To find optimal WL, we can pre-compute all POWVs and store them in a lookup table • However, there are infinite number of different nets • We try to group together nets that can share the same set of POWVs • For example, these two nets share the same set of POWVs: 2020 -10 -26 26
Grouping by Vertical Sequence • Define vertical sequence s 1 s 2…sn to be the list of pin indexes sorted in y-coordinate Vertical sequence = 3142 • Lemma: The set of all degree-n nets can be divided into n! groups according to the vertical sequence such that all nets in each group share the same set of POWVs 2020 -10 -26 27
Steps in FLUTE WL Estimation 1. Input a net 2. Find hi’s and vi’s 2 6 2 3 2 4. Get POWVs from LUT (1, 2, 1, 1) (1, 1, 2, 1) 5 3. Find vertical sequence 2 4 3142 1 3 5. Find WL for each POWV and return the best HPWL + h 2 = 22 return HPWL + v 2 = 26 Remark: • One RSMT topology can also be pre-computed and stored for each POWV • Impractical for high-degree nets (degree >= 9) – Other technique to break down high-degree nets 2020 -10 -26 28
Net Ordering • In sequential approach, we need some net ordering. • A bad net ordering will increase the total wire length, and may even prevent com-pletion of routing for some circuits which are indeed routable. A A B B A B first (Good order) 2020 -10 -26 B B A A first (Bad order) 29
Criteria for Net Ordering • Criticality of net - critical nets first. • Estimated wire length - short nets first since they are less flexible. • Consider bounding rectangles (BR): A B B A B is in A’s BR Which one should be routed first and why? (Note that this rule of thumb is not always applicable. ) 2020 -10 -26 30
Net Ordering (cont’d) 2020 -10 -26 31
Rip-Up and Re-route • It is impossible to get the optimal net ordering. • If some nets are failed to be routed, the rip-up and reroute technique can be applied: Cannot route C So rip-up B and route C first. Finally route B. A A A B B B C C C 2020 -10 -26 32
Concurrent Approach • Consider all the nets simultaneously. • Formulate as an integer program. • Given: Nets Set of possible routing trees net 1 T 11, T 12, . . . , T 1 k 1 : : net n : : Tn 1, Tn 2, . . . , Tnkn Lij = Total wire length of Tij Ce = Capacity of edge e • Determine variable xij s. t. xij = 1 if Tij is used xij = 0 otherwise. 2020 -10 -26 33
Integer Program Formulation 2020 -10 -26 34
Concurrent Approach: Example 2 1 1 3 3 1 2 2 1, 2 b a 2, 3 c 1, 3 Possible trees: d net 1: 2 3 3 1, 2 net 2: 2 3 3 net 3: 2 2 Ca= Cb= Cc= Cd= 2 Solution 2 1 1 What are the constraints for edge capacity? 3 3 1 2 2 2020 -10 -26 35
Integer Programming Approach · · Standard techniques to solve IP. No net ordering. Give global optimum. Can be extremely slow, especially for large problems. To make it faster, a fewer choices of routing trees for each net can be used. May make the problem infeasible or give a bad solution. · Determining a good set of choices of routing trees is a hard problem by itself. 2020 -10 -26 36
Hierarchical Approach to Speed Up Integer Programming Formulation For Global Routing M. Burstein and R. Pelavin, “Hierarchical Wire Routing”, IEEE TCAD, vol. CAD-2, pages 223 -234, Oct. 1983. 2020 -10 -26 37
Hierarchical Approach • Large Integer Programs are difficult to solve. • Hierarchical Approach reduces global routing to routing problems on a 2 x 2 grid. • Decompose recursively in a top-down fashion. • Those 2 x 2 routing problems can be solved optimally by integer programming formulation. 2020 -10 -26 38
Hierachical Approach: Example • Solving a 2 xn routing problem hierarchically. Level 1 Level 2 Level 3 Solution: 2020 -10 -26 39
Types of 2 x 2 Routing Problems Type 1 Type 7 Type 2 Type 8 Type 3 Type 9 Type 4 Type 10 Type 5 Type 11 Type 6 2020 -10 -26 40
Objective Function of 2 x 2 Routing Possible Routing Trees: T 11, T 12, T 21, T 22, . . . , T 11, 1, . . . , T 11, 4 # of nets of each type: n 1, . . . , n 11 Determine xij: # of type-i nets using Tij for routing. yi: # of type-i nets that fails to route. 2020 -10 -26 41
Constraints of 2 x 2 Routing Cb Bab Ca Bda a b d Cd c Constraints on Edge Capacity: Bbc Cc Bcd Constraints on # of Bends in a Region: 2020 -10 -26 42
Pop Quiz • If you two nets, one with 2 pins, the other with 4 pins with a zero capacity edge C=1 C=0 – What is going to be the result? Type 11 2020 -10 -26 43
ILP Formulation of 2 x 2 Routing • Only 39 variables (28 xij and 11 yi) and 19 constraints (plus 38 non-negative constrains). • Problems of this size are usually not too difficult to solve. 2020 -10 -26 44
- Slides: 44