44
22年 3年 25年 1 VLSI Physical Design Automation Prof. David Pan [email protected] Office: ACES 5.434 Lecture 18. Global Routing (II)

2015-07-03 1 VLSI Physical Design Automation Prof. David Pan [email protected] Office: ACES 5.434 Lecture 18. Global Routing (II)

Embed Size (px)

Citation preview

23年 4月 19日 1

VLSI Physical Design Automation

Prof. David Pan

[email protected]

Office: ACES 5.434

Lecture 18. Global Routing (II)

223年 4月 19日

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

323年 4月 19日

Sequential Approach

Algorithm: 1. Graph modeling of the routing regions 2. For each net k:

2.1 Find a route r for net k on the graph. 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)

We can use differentmethods to do this.

423年 4月 19日

Maze Routing for Multi-Terminal Nets

523年 4月 19日

Maze Routing on Weighted Graph

623年 4月 19日

Example of Weighted Graph

723年 4月 19日

Mikami & Tabuchi’s Algorithm

823年 4月 19日

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

Tslist

tlist

Intersection

923年 4月 19日

Line Probing

• We can use all the grid vertices on the line segments as escape points:

• Always find a path but may not be optimal.

S

T 0

0

1

1

1 1

1

1111

11

1 1

0

0

Escape point

Iteration number

1023年 4月 19日

Hightower’s Algorithm

1123年 4月 19日

Line Probing

• We can pick just one escape point from each line segment.

• May fail to find a path even if one exists.

S

T

1

1

0

0

1

0

0

Escape point

Iteration number

1223年 4月 19日

1323年 4月 19日

Comparison of Algorithms

1423年 4月 19日

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!

1523年 4月 19日

Maze vs A* routing (I)

1623年 4月 19日

Maze vs A* routing (II)

1723年 4月 19日

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.

1823年 4月 19日

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.

1923年 4月 19日

Dijkstra’s Algorithm: Example

00

8888

8888

1010

5522

22 33 44 66

11

99

77SS

BB TT

AA CC

00

1010

55

8888

1010

5522

22 33 44 66

11

99

77SS

BB TT

AA CC

00

88

55

1414

77

1010

5522

22 33 44 66

11

99

77SS

BB TT

AA CC

00

88

55

99

77

1010

5522

22 33 44 66

11

99

77SS

BB TT

AA CC

00

88

55

99

77

1010

5522

22 33 44 66

11

99

77SS

BB TT

AA CC

00

88

55

1313

77

1010

5522

22 33 44 66

11

99

77SS

BB TT

AA CC

P (Permanently Labeled)P (Permanently Labeled) Min. Label VertexMin. Label Vertex

2023年 4月 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)

2123年 4月 19日

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.]

2223年 4月 19日

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:

2323年 4月 19日

Wirelength Vector (WV)

• WL can be expressed as a vector of the coefficients• Called Wirelength Vector

321

321

22

vvvhhhWL

321

321

32 vvvhhhWL

321

321 2vvvhhhWL

(1, 2, 1, 1, 1, 2) (1, 1, 1, 1, 2, 3) (1, 2, 1, 1, 1, 1)

• Observation: WL can be written as a linear combination of edge lengths with positive integral coefficients

2423年 4月 19日

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, 1)

• Potentially Optimal Wirelength Vector (POWV) is a WV that may produce the optimal wirelength

(1, 2, 1, 1, 1, 2) (1, 2, 1, 1, 1, 1)

2523年 4月 19日

# 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,1,1)

POWV(1,1,1,1,2,1)

2623年 4月 19日

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:

2723年 4月 19日

Grouping by Vertical Sequence

• Define vertical sequence s1s2…sn to be the list of pin indexes sorted in y-coordinate

• 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

Vertical sequence= 3142

2823年 4月 19日

Steps in FLUTE WL Estimation1. Input a net 2. Find hi’s and vi’s

3 2 5262

3. Find vertical sequence

3142

3

2

14

4. Get POWVs from LUT

(1,2,1,1,1,1)

(1,1,1,1,2,1)

5. Find WL for each POWV and return the best

HPWL + h2 = 22 returnHPWL + v2 = 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

2923年 4月 19日

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

B first (Good order)

A

AB

B

A first(Bad order)

3023年 4月 19日

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

AB

B

B is in A’s BR

Which one should be routed firstand why? (Note that this rule ofthumb is not always applicable.)

3123年 4月 19日

Net Ordering (cont’d)

3223年 4月 19日

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 re-

route technique can be applied:

A

B

C

A

B

C

A

B

C

A

B

C

A

B

C

A

B

C

Cannot route C So rip-up Band route C first.

Finally route B.

3323年 4月 19日

Concurrent Approach

• Consider all the nets simultaneously.• Formulate as an integer program.• Given:

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.

Tn1, Tn2, ... , Tnknnet n

::

::

T11, T12, ...... , T1k1net 1

Set of possible routing treesNets

3423年 4月 19日

Integer Program Formulation

jix

eCx

nix

xL

ij

eijTeji ij

ik

j ij

n

i

ik

j

ijij

,1or 0

edge allfor

,,1 allfor 1 s.t.

Min.

s.t. ,

1

1 1

3523年 4月 19日

Concurrent Approach: Example

1,21,2

2,32,3

1,31,3

1,21,2

CCaa= = CCbb= = CCcc= = CCdd= 2= 2

bb

aa

cc

dd

Possible trees:Possible trees:

net 1:net 1: 22 33 33

net 2:net 2: 22 33 33

net 3:net 3: 22 22

1122

3322

11331122

SolutionSolution

1122

3322

11331122

;,1or 0

;1

;1

;1

s.t.

22332332 Min.

3231

232221

131211

3231232221131211

jix

xx

xxx

xxx

xxxxxxxx

ij

What are the constraintsfor edge capacity?

aCxxxxx 3123211312

3623年 4月 19日

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.

23年 4月 19日 37

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.

3823年 4月 19日

Hierarchical Approach

• Large Integer Programs are difficult to solve.• Hierarchical Approach reduces global routing to routing

problems on a 2x2 grid.• Decompose recursively in a top-down fashion.• Those 2x2 routing problems can be solved optimally by

integer programming formulation.

3923年 4月 19日

Hierachical Approach: Example• Solving a 2xn routing problem hierarchically.

Level 1Level 1

Level 2Level 2

Level 3Level 3

Solution:Solution:

4023年 4月 19日

Types of 2x2 Routing Problems

Type 1Type 1 Type 7Type 7

Type 2Type 2

Type 3Type 3

Type 4Type 4

Type 5Type 5

Type 6Type 6

Type 8Type 8

Type 9Type 9

Type 10Type 10

Type 11Type 11

4123年 4月 19日

Objective Function of 2x2 Routing

Possible Routing Trees: Possible Routing Trees: TT1111, T, T1212, T, T2121, T, T2222,....., T,....., T11,111,1,..., T,..., T11,411,4

# of nets of each type: n# of nets of each type: n11, ..., n, ..., n1111

Determine xDetermine xijij: # of type-i nets using T: # of type-i nets using T ijij for routing. for routing. yyii: # of type-i nets that fails to route.: # of type-i nets that fails to route.

. minimize Want to

11,,111

1

i i

ij iji

y

inxy

4223年 4月 19日

Constraints of 2x2 Routing

CCaa

CCbb

CCcc

CCdd

BBabab BBbcbc

BBcdcdBBdada

aabb

ccdd

dij

ij

cij

ij

bij

ij

aij

ij

Cx

Cx

Cx

Cx

Tdji

Tcji

Tbji

Taji

s.t. ,

s.t. ,

s.t. ,

s.t. ,

daij

ij

cdij

ij

bcij

ij

abij

ij

Bx

Bx

Bx

Bx

daTji

cdTji

bcTji

abTji

regionin bend a has s.t. ,

regionin bend a has s.t. ,

regionin bend a has s.t. ,

regionin bend a has s.t. ,

Constraints on Edge Capacity:Constraints on Edge Capacity:

Constraints on # of Bends in a Region:Constraints on # of Bends in a Region:

4323年 4月 19日

Pop Quiz

• If you two nets, one with 2 pins, the other with 4 pins with a zero capacity edge– What is going to be the result?

Type 1Type 1

. minimize Want to

11,,111

1

i i

ij iji

y

inxy

Type 11Type 11

C=0C=1

4423年 4月 19日

ILP Formulation of 2x2 Routing

• Only 39 variables (28 xij and 11 yi) and19 constraints (plus 38 non-negative constrains).

• Problems of this size are usually not too difficult to solve.

jiyxinxy

y

iij

ij iji

i i

,0,011,,1 s.t.

Min.11

1

dij

ij

cij

ij

bij

ij

aij

ij

Cx

Cx

Cx

Cx

Tdji

Tcji

Tbji

Taji

s.t. ,

s.t. ,

s.t. ,

s.t. ,

daij

ij

cdij

ij

bcij

ij

abij

ij

Bx

Bx

Bx

Bx

daTji

cdTji

bcTji

abTji

regionin bend a has s.t. ,

regionin bend a has s.t. ,

regionin bend a has s.t. ,

regionin bend a has s.t. ,