Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Routing
Robust Channel Router
Figures taken from S. Gerez, “Algorithms for VLSI Design Automation”, Wiley, 1998
Channel Routing Algorithms Previous algorithms we considered only work
when one of the types of constrains is present Horizontal or Vertical
Dealing with a case where both constraints are present is a challenge
In fact in such a situation, the problem becomes NP-complete
Robust Channel Router Many heuristic algorithms were proposed to
address this issue One of them is the algorithm proposed by
Yoeli and is called robust channel router Performs well in practice and is easier to
understand but is quite involved Uses the concept of dynamic programming
Optimal solution of some problem can be efficiently defined in terms of problem instances of smaller size
Robust Channel Router First we identify the number of nets present in the
channel and identify them by numbering them Then a weight wi is assigned to each net i This is done using a set of rules; to define these
rules, we need to define a term called “current side” The algorithm iterates over rows; once on the top
and then on the bottom The “side” that the algorithm is presently in is called
the “current side”
Rules for assigning weights The weights wi for each net i are assigned based
on the following rules 1. For all nets i whose intervals contain the columns
of maximal density, add a large number B to the weights wi
2. For each net i that has a current side terminal at the column position x, add to wi the local density d(x)
3. For each column x for which an assignment of some net i to the current side will create a vertical constraint violation, subtract Kd(x) from wi
Rules ..
Typical “rules” of thumb like this are heuristics
The performance of this algorithm is realtively insensitive to minor modifications of these rules
Hence this algorithm gets the name “robust” router
Maximal-weight subsets The algorithm then finds the maximal-weight subset
of nets that can be assigned to the same row In doing so there must not be any horizontal constraint
violations This problem can be formulated using the interval
graph discussed previously This is an NP-complete problem Fortunately, we don’t need to solve this problem for
general graphs For intervals, there is a way of solving this problem
using dynamic programming
Dynamic Programming
Define a subinstance identified by a single parameter And
Definition of subinstance with From a list of all intervals, remove intervals that
extend beyond column c
Subinstance Example
Interval 0 empty 1 empty 2 empty 3 empty 4 i1 5 i1
6 i1, i6
Consider a set of intervals
i1=[1,4] i2=[12,15] i3=[7,13] i4=[3,8] i5=[5,10]
i6=[2,6] i7=[9,14]
So on and so forth
Cost of Optimal Solutions
Cost of optimal solution for Stored in total[c] Can be derived from optimal costs of
subinstances with and the weights of nets that have their right most
terminals at position c Let’s call one such net as net n Net n is part of the optimal solution if:
Selection of nets If any net satisfies the prev condition it is stored in
an array selected_net[c] In this manner the array total[] is filled up; while
entries in selected_net[] array are entered if nets are found to satisfy the condition
The right-most selected_net is always included in the solution
Moving left, all the other selected_nets that do not overlap are considered in the solution for the first row
The nets assigned in the first row are removed from the list and this procedure is repeated
Rip-up and reroute Using this procedure
Horizontal constraints will be met Some vertical constraints might not be met (most of them
will be met) If vertical constraints are not met
Rip up and reroute Selectively undo the assignment of some nets Reroute through area routing (also called maze routing) If that also does not give a solution; add another row and
run the algorithm again
41 32 30 5
(a) (b)41 2
41 32 3
41 2(c)
41 32 3
41 2
Example 4 nets; numbered Local densities
d(1) = 1 d(2) = 2 d(3) = 2 d(4) = 3 d(5) = 2
B = 1000 K = 5
Example – 1st iteration w1 = (0) + (1) + (-5*2) = -9
w2 = (1000) + (2) + (-5*3) = 987 w3 = (1000) + (2+2) + (0) = 1004
w4 = (1000) + (3) + (-5*2) = 993
total[1] = 0
total[2] = max(0,0-9) = 0
total[3] = 0
total[4] = max(0,0+987) = 987
total[5] = max(987,0+1004,0+993)=1004
selected_net[1] = 0
selected_net[2] = 0
selected_net[3] = 0
selected_net[4] = 2
selected_net[5] = 3 Net 3 only will occupy row 1
Example – 2nd iteration We switch the current
side to the bottom row Net 3 is left out of the
list of nets Calculate densities
again d(1) = 1 d(2) = 2 d(3) = 1 d(4) = 2 d(5) = 1
41 32 30 5
(a) (b)41 2
41 32 3
41 2(c)
41 32 3
41 2
Example – 2nd iteration w1 = (1000) + (2) + (0) = 1002
w2 = (1000) + (2) + (-5*2) = 992
w4 = (1000) + (1) + (-5*2) = 991
total[1] = 0
total[2] = max(0,0+1002) = 1002
total[3] = 1002
total[4] = max(1002,0+992) = 1002
total[5] = max(1002,1002+991)=1993
selected_net[1] = 0
selected_net[2] = 1
selected_net[3] = 0
selected_net[4] = 0
selected_net[5] = 4
Net 4 and net 1 will occupy bottom row
Solution 3rd iteration is trivial; Net 2 is assigned to a single
row; the second one This is not a solution (net 4 obstructs) so rip up and
reroute Shift net 4 to middle row and area route net 2
41 32 30 5
(a) (b)41 2
41 32 3
41 2(c)
41 32 3
41 2
Global Routing Precedes local routing and follows placement Detailed routing is not done at this stage Roughly determines the wiring channels a
connection will run
(a) (b)
6 (= n)1 2 3 40 5 6 (= n1 2 3 40 50
1
2
3
4
5 (= m)
Global Routing Application to standard cells Characterized by rows of cells seperated by wiring channels If terminals are in same channel facing each other; local
routing is performed; otherwise global routing is used Compute a minimum rectilinear Steiner tree; connect centers
(a) (b)
Feedthrough wires Steiner trees have vertical segments that cross rows
of standard cells They are realized in the following ways
By using a wiring layer not used by standard cells Using feedthrough cells; non-functional cells inserted to
realize vertical connections Such cells are used in conjunction with placement
Using feedthrough wires available within standard cells
We refer to all these vertical connections as feedthrough cells; they have to be minimized
Feedthrough wires Detailed routing such as channel routing will be
used to fix exact locations of vertical connections The vertical wires might have to be shifted to be
aligned with exact feedthrough connections Segments at approx same positions can be
permuted to reduce densities in channels If feedthrough resources are scares a Steiner tree
with vertical connections having a higher cost can be made
Alternative solution (b)
Timing The minimal length Steiner tree might not be what
we are for all nets after considering timing issues For timing; critical path is important
Critical path determines the system’s operation speed
Cells connected to critical nets get priority to be placed together during placement
Better delay models required than length of wires Length of wire metric: equivalent to 1R and 1C Long wires behave as transmission lines In practice Elmore delay or better delay models are used
Timing Steiner trees are constructed to optimize lengths of
critical connections If Steiner tree of one wire is constructed before the
other; it prevents others from being laid out optimally Global routers should optimize the overall cost
functions In std-cell layout the overall area is minimized if the
sum of all channel widths is minimized Width of the channel is estimated by the density of
the channel
Building block layout More complex than std
cells Use slicing floorplans The “channels” are
picked from the slicing tree
To assign channels Do a depth-first search Start numbering from the
deepest channel
Building block layout Channel routing is used to wire up within the
channels Steiner trees are used to wire-up connections not
restricted to channels If additional wiring layer is not available
All Steiner trees run along wiring channels A graph is constructed to represent the structure of routing
area Channels are edges; their meeting points vertices Problem now is to find a Steiner tree within the graph as
opposed to a plane
Problem Definition
Local vertical density dv(i,j) Number of wires crossing vertical line j between horizontal lines
i-1 and i Local horizontal density dh(i,j)
Number of wires crossing horizontal line i between vertical lines j-1 and j
(a) (b)
6 (= n)1 2 3 40 5 6 (= n1 2 3 40 50
1
2
3
4
5 (= m)
Problem Definition The density of the channel between grid lines i-1 and i is
The goal of global routing is to minimize total channel density:
Subject to
is the maximum feedthroughs that can be accomodated per horizontal grid segment
Algorithms for global routing Solve sequentially; one net after another using Lee’s
algorithm Con: Strong dependency on net ordering
Construct Steiner trees for all nets Such that the trees avoid congested areas
Other way is to construct all Steiner trees And modify shapes of wires that cause overcongestion
We will follow the last method Hierarchical approaches can be followed for
simplicity
Steiner trees
Start with spanning trees Flip the L shape to get (b); s1 is Steiner point Flip the L shape again to get (c); s2 is another Steiner point s1 is a redundant Steiner point; it has only two connections A Steiner point has three or more connections Steiner trees are usually 2/3 of the length of spanning trees
p1
p2p3
p1
p2
p3s1 s2
(a) (b) (c)
p1
p2
p3
s1
Prim - min spanning tree
O(n2)
v3v1
v2
v4
v51
2
3
1
22
5
2
4 v3v1
v2
v4
v51
(a) (b)
21
2
vi .distance, vi .via edge, for i =iteration u 1 2 3 4 50 v1 2, (v1, v2) 4,(v1, v3) 3,(v1, v4) +∞,?1 v2 1, (v2, v3) 2,(v2, v4) 5,(v2, v5)2 v3 1, (v3, v4) 2,(v3, v5)3 v4 2, (v3, v5)4 v5
1-Steiner tree problem
Finding minimal Steiner tree for a set of points in NP-complete
Define 1-Steiner problem Say you have the minimum spanning tree for set
of points P (Prim’s algorithm; in P complexity) Add one Steiner point (called s) to this and find
the minimum spanning tree Steiner tree heuristic is to solve the 1-Steiner
problem repeatedly
1-Steiner tree problem Implementation
Visit all candidate points to get the minimum spanning tree for points in P union s
Pick the point that lead to the cheapest spanning tree
Two issues 1. Identify the candidate points 2. Efficient method to incrementally construct a new
spanning tree without calling Prim’s algorithm again
Candidate points- Hanan Points Hanan solved this in 1966 Proved that an optimal rectilinear Steiner tree can
be embedded in the grid composed of grid lines having points in P
(a) (b)
Updating the spanning tree
Addressed by Griffith et al 1. Select candidate point 2. Divide grid into 4 parts diagonally 3. Find closest points in each part 4. Connect to candidate point; avoid (remove)
cycles; to get a spanning tree 5. Repeat for all candidate points 6. Pick the one with minimum length
Example of updating
Steiner tree heuristic 1. Find minimum spanning tree 2. Use 1-Steiner algorithm to add one point 3. If gain in step 2 is positive accept the new tree 4. Goto step 2; repeat as long as gain is positive
p1
p2
p3
p4p5
st
Global routing Generate Steiner trees
for all nets Congested areas have
to be cleaned up Use local
transformations of Steiner trees for clean up
Transformations may increase tree length but decrease total area