Connectivity Verification in VLSI Layout
-
Upload
dora-sellers -
Category
Documents
-
view
85 -
download
3
description
Transcript of Connectivity Verification in VLSI Layout
May 2012 1
Connectivity Verification in VLSI Layout
Shmuel Wimer
Bar Ilan Univ., School of Engineering
May 2012 2
Outline
• Modeling connectivity
• Finding connected components in graphs
– Directed graphs by DFS
– Non directed graphs by UNION_FIND
• Intersection of rectangles
– Interval Tree
– Priority search tree
• Intersection of non rectilinear shapes
May 2012 3
Modeling Physical Connectivity
N-diff
P-diff
poly
contact
metal1
via1
metal2
Vcc
OUT
Xn
OUT
Xn
Vcc
May 2012 4
Vcc
OUT
Xn
Xn
Vcc
Polygon in layout and its corresponding graph vertex are labeled
with net name.
A short occurs when two polygons of different nets are physically
connected, hence connected component has more than one label.
May 2012 5
Vcc
OUT
Xn
OUT
An open occurs when a polygon is missing from layout, hence several connected component have same label.
Algorithm for physical connectivity check will:
1. First construct G(V,E) by reporting pair-wise polygon intersections.
2. Then find connected components and check labeling consistency
May 2012 6
• Layout polygons are labeled with net name
• A connectivity graph G(V,E) is defined where vertices correspond to
layout polygons.
• An arc e(u,v) in E is defined for vertex pair whose corresponding
polygons are intersecting and physically connected by process
technology.
• Consequently, every net has corresponding connected component
in G(V,E), labeled uniquely by net name.
• A short occurs when a connected component has more than one
label.
• An open occurs when two or more connected components have
same label.
May 2012 7
Intersection of Rectangles
1 2 1 2
1 1 2
1 1 2
Given two intervals , and , , iff one
of the following mutually exclusive conditions is satisfied:
or .
I y y I y y I I
y y y
y y y
1 2 1 2 1 2 1 2
1 2 1 2 1 2 1 2
Given two rectangles , , and , , ,
, iff , , and , , .
R x x y y R x x y y
R R x x x x y y y y
1 Given a set of isothetic rectangles , report all
their pairwise intersections.
n
i in R
Problem :
May 2012 8
1 1 2y y y
1 1 2y y y
2y
1y
1 2 1 2
Solution is implemented by scan-line algiorithm. Thecondition
, , is satisfied by definition for all rectangles
currently intersected by scan-line (active rectangles).
x x x x
1 2 1 2, , can be checked by data structures called
or .
y y y y
Interval Tree Priority Search Tree
May 2012 9
Interval Tree
Introduced by McCreight 1981, Edelsbrunner 1980. We study
a static version, although dynamic version is possible.
1 1
1 2 2
Given rectangles , , are the bottom and
top ordinates of . , , , are the sorted ordinates.
nn
i i ii i
i n
R I b e
R y y y
1 2 2
1
The interval tree has a primary skeletal structure defined
staticaly in memory for , , , , handling the set
of vertical edges.
n
n
i i
T
y y y I
R
May 2012 10
2
1
3
4
5
LLIST w
1
2
3
4
5
RLIST w 1 2n nw y y
1
is dynamically storing a subset , called active
subset. is defined by scan-line position in ordinary
manaer, by those of it intersects at abscissa .
active
active
n
i i
T I x I
I x
R x
May 2012 11
1The root of has a discriminator 2
and two dynamic secondary lists and .
n nw T w y y
LLIST w RLIST w
stores lower ends of those intervals
containing , sorted in ascending order.
activeLLIST w I
w
left1 2 active active
leftactive active
Left sub-tree of rooted at is an interval tree
of , , , and | ,
are intervals whose right end fall left to .
n
w LSON w
y y y I I e w
I I w
I I
stores upper ends of those intervals
containing , sorted in descending order.
activeRLIST w I
w
May 2012 12
is calassified as if (and
hence ) or trees rooted at
and both contain active nodes. Otherwise
is .
v T LLIST v
RLIST v LSON v
RSON v
v
active
inactive
right1 2 2 active active
rightactive active
Right sub-tree of rooted at is an interval tree
of , , , and | ,
are intervals whose left end fall right to .
n n n
w RSON w
y y y I I b w
I I w
I I
May 2012 13
1 2 13
0,2 , 1,3 , 2,3 , 4,7 , 5,13 , 6,9 , 8,10 , 11,12
, , , 0,1,2,3,4,5,6,7,8,9,10,11,12,13
I
y y y
4 5 76321 108 90 11
12 13
0 1 2 3 8 10
5 6 9 13 3.5 11.5
7 8 2 7.5
1.5 9.5 5.5
4 7
11 12
May 2012 14
Properties of Interval Tree
1 2 2 is balanced binary tree. Its leaves are the ordered sequence , , , . nT y y y
The lists and associated with an internal node must
support effective insertion and deletion, hence realized by balanced binary tree.
LLIST v RLIST v v T
The active nodes of are connected in a binary tree imposed on as a
super structure. Thus, a primary node has two pointers and
. If is inactive and . if
the s
T T
v T LPTR v
LPTR v v LPTR v RPTR v LPTR v
T
ub-tree rooted at has an active node. Similarly,
if the sub-tree rooted at has an active node.
LSON v RPTR v
RSON v
May 2012 15
4 5 76321 108 90 11
12 13
0 1 2 3 8 10
3.5 5 6 9 13
11.5
7 8 2 7.5
1.5 9.5 5.5
4 7
11 12
May 2012 16
4 5 76321 108 90 11
12 13
0 1 2 3 8 10
5 6 9 13 3.5 11.5
7 8 2 7.5
1.5 9.5 5.5 11 12
By definition of active nodes, all leaves of have non-empty lists. It stems
from being binary tree that of its nodes have non-empty lists.at least half
T
T
May 2012 17
Insertion and Deletion in Interval Tree
2
Both and all and
are binary trees of
depth log .
T LLIST
RLIST
O n
*
*
Insertion of interval ,
starts at root and traverses
or nodes
until first satisfying
is found. A
path is thus defined.IN
b e
LSON RSON
v T
b v e
P
May 2012 18
*
*
The lower ordinate of ,
is inserted into and
the upper ordinate of ,
is inserted into .
b b e
LLIST v
e b e
RLIST v
*If was active is unchanged.
If it was inactive then by going
upward to first active node, with
constant work at node, can be
updated appropriately.
v T
T
*Two paths and are issued from , ending at leaves and , respectively.L R v b eP P
May 2012 19
Intersections Report
*
Intersection reports can occur with intervals allocated to nodes along
and intervals allocated to nodes in the sub-tree rooted at and bounded
between and .
IN
L R
P
v
P P
ib v
ie
b e
1
For either or . Let . , may intersect
with intervals of , . Since is ascending sorted, starting at
intersection is reported as long as . raversal stops at
f
IN
i i i
i
v P e v b v e v b e
b e LLIST v
b LLIST v b e T
irst time . Total work is linear in number of intersections. is
similar.
ib e b v
May 2012 20
1
Let (similarly ). There exist two cases. If , , may
intersect with intervals of , . Since is descending sorted,
starting at , intersection is reported as long as .
L R
i i i
i
v P v P v b b e
b e RLIST v
e RLIST v b e
raversal
stops at first time . Total work is linear in number of intersections.i
T
b e
ib v
ie
b e
ib v
ie
b e
Let .b v
May 2012 21
* *
Consider now any right sub-tree along (terminating at a leaf ). Since such
sub-trees are contained in left sub-tree of , there exists .
Hence, all intervals allocated to right sub-tr
LP b
v b v v e
ees along must be reported. This
is done efficiently by traversing only nodes of , at least half nodes of it have
non-empty lists. Consequrntly, amount of time is linear in report size.
LP
T
, intersects with all intervals of since all share (and with
). Intersections report is obtained by lists traversal without overhead.
b e LLIST v v
RLIST v
*
* *
Deletion of , finds first same as insertion did and deletes ,
from and . Intersections reports are not required since
insertion did it already. Update of is in order.
b e v b e
LLIST v RLIST v
T
May 2012 22
Performance of Algorithm
Storage is since there are 2 end points of
intervals and 4 1 nodes in , and 2 end points
at most are simultaneously stored in and
.
O n n
n T n
LLIST
RLIST
2Construction of takes log time at least
since sorting of the 2 end points is required.
T O n n
n
May 2012 23
2
2
Intervals are inserted or deleted in time log ,
including treatment of and and the
maintenance of active nodes connected in . and
traversal takes log .L
R
O n
LLIST RLIST
P
P O n
T
Less than half of visited nodes for intersection
report with and are empty, and
intersections of intervals are reported from
and with no overhead.
LLIST RLIST
LLIST
RLIST
May 2012 24
2 2
Given isothetic rectangles having
intersecting pairs, interval tree algorithm reportes
intersections in log time, log
pre processing time and space .
n s
O n n s O n n
n
:Theorem
2
2
Is it possible to perform better than
log ?
Evidently, is mandatory (cannot perform
better than report size). So can we do better than
log ?
O s n n
O s
O n n
: Question
May 2012 25
1 2Given a set , , , , the problem called
ELEMENT_UNIQENESS is aiming at answering
whether the set has two identical elements.
nz z z R
2log is a lower bound of it. Define
rectangles , , , and apply
intersection report algorithm, which now will
solve the ELEMENT_UNIQENESS problem.
i i i
n n n
R a b z z
2
Consequently, no faster algorithm is possible,
and interval intersection runs in log .n n s
May 2012 26
Priority Search Tree
• Introduced by McCreight 1981 / 1985.
• Transform reporting rectangle intersections into point
inclusion problem.
• Paradigm is scan-line, abscissa of vertical edges are
sorted in ascending order {x1, x2,…, x2n}.
• Vertical edges [y1, y2] are associated with opening and
closing rectangle property.
May 2012 27
2y
1y
2y
1y
1 2 1 2
Intersection occurs if
and .y y y y
Unlike Interval Tree where intersection conditions were
checked explicitely, intersection problem is transformed
into a point containment problem as follows.
May 2012 28
p
q
2 1,y y
21 2
Every living rectangle (i.e., it is already opened and exists in memory)
is transformed into a point in 2D plane , , .y y p q R
1 2
22 1
A newly inserted left edge , is transformed into infinite
quadrant of 2D plane, , , .
y y
Q p q p y y q
R
1 2
1 2
1 2
New rectangle ,
intersects with a living
rectangle , iff
, .
y y
y y
y y Q
1 2,y y
May 2012 29
Priority Search Tree is a data structure supporting queries of point
containment very efficiently. maintains coordinates as a search
tree and it is a heap for maintaining coordinates.
T
T p
q
coordinate must be unique for rectangles in order to maintain
consistent insertion and deletion. This can be done by attaching to
the identifier (e.g., memory pointer) of its originating rectangle.
p
p
* *,p q
p
q * *The pair , with maximal
is attached to the root of .
p q
q T
range is then divided by a
vertical line .
p
p const
May 2012 30
The above steps are applied recursively for the
resulting left and right sub ranges. Resulting
trees are attached to and nodes
of . How to decide on the
vertical line ?
p
LSON RSON
root T
p const
Question :
* *If , is used, a data structure maned
results in. It has good average
performance but can be a linear list in worst
case.
p q
Cartesian Tree
May 2012 31
Since the entire data is known apriori, the
range of , is known too. Since
all the values of are distinct, bisection at
median is possible.
min maxp p p
p
2For , pairs the depth of is log .
successive bisections result in a stripe in
having one unit width in .
n p q T O n
O n
q p
May 2012 32
jhdb
niea
of
m
k p
c g l
da
b eh
g
cj
l
mf
i
k
o
p
n
p
q
A priority search tree is a heap in q and a radix search tree in p.
May 2012 33
Implementing Priority Search TreeAs other scan-line algorithms, vertical edges are first sorted in ascending
order of abscissa. Abutments are considered as intersection and therefore
opening edges preceed closing ones having same abscissa.
Along scan-line progression a
vertical edge , in
plane is translated into a point
, in plane.
b e xy
p q pq
( p , q ) = ( b , e )
e
b
Denote by , = , the key coresponding to a currently inserted
edge , and by , the key of an edge stored in a node
(recall that is unique).
E E
v v
p q b e
E b e p q v T
p
May 2012 34
A node stores a range , of values in plane. It has
two sub trees rooted at and .
v T B v E v p pq
LSON v RSON v
We'll present a code for edge insertion. Deletion is more complicated and
discussed briefly. See details in E. M. McCreight, "Priority search trees",
SIAM J. Comput., Vol. 14, pp. 257 - 276, 1985.
Unlike segment and interval trees which are static, priority search tree is
dynmic, storing only currently opened rectangles. This is an advantage
for typical VLSI data (why?).
Most of VLSI layout objects are relatively very small compared to chip / block
size. It means that at each insertion or deletion of an edge, rectangles
are opened, consuming storage.
O n
O n
May 2012 35
INSERT ( , , ) {
( ) {
// heap maintenance
// r
( ) { , ; , , ; }
2;
( ) { ;
adix bisection
E E
E v E E v v E E
E
void key p q int b, int e, node v
while v
if q q p q v p q p q
m b e
if p m e m v LSON v
; }
{ ; ; }
}
allocate son node
// left search
// right search
// leaf re to ; , ;
ached
;
}
E E
else b m v RSON v
u v p q v
LSON u RSON u
May 2012 36
Deletion operates in two phases. In the first finds in the key , of
the deleted edge by ordinary search of a radix search tree. is compared
with 2. If search takes left to and if v
T p q
p
m b e p p LSON v
search takes right to . If then , is found.
v
v
p p
RSON v p p p q
A second phase starts at the node where , was found. "Knock out
tournament" starts, at which two sons compete on the vacant key at their
parent. The key of son having larger wins. Competition proc
p q
q eeds with
the position of the victor son, Tournament stops when a node with less
than two sons is reached. This maintains the heap property of . (Only
lowest internal nodes may have single son.)
T
May 2012 37
Reporting Intersections Report takes place prior to edge insertion. If , is the edge aimed
at insertion, an infinite quadrant is defined as follows:
E b e
( p , q ) = ( e , b )
e
b
By definition, all the rectangles corresponding to nodes whose , keys
are contained in the quadrant are intersecting with the rectangle of edge .
p q
E
Exploration of these points is done by first checking whether .
If test fails, it follows from heap property of that entire subtree can
be discarded ( for all its nodes).
v E
v E
q q
T
q q
May 2012 38
1
For a node satisfying , a radix search in the subtree rooted at
takes place, aiming at finding all points satisfying , . Given
an edge : , , define ( ), min and ( )
v E
v E
r E l i n i E
v q q v
p p
E b e p p e p b q q b
.
REPORT( , , , ) {
( ) {
( , ) { report intersection }
2 ;
// check heap propery
// apply radix
(( ) ( )) { R
search
EPO
l r
v
v l r
l r
r
void int p int p int q node v
if q q
if p p p
m p p
if m p and RSON v
RT( , , , ) }
( ) { REPORT( , , , ) }
}
}
r
l
m p q RSON v
if LSON v p m q LSON v
May 2012 39
2
REPORT( , , , ) correctly reports all points in
quadrant , , in log time, where is report size.
l r
r
p p q root T
p q O n k k
Lemma :
A reported point is correst. REPORT first verifies , ,
as otherwise it returns. Satisfaction of , is also explicitely
checked before reporting.
v
v r
q q
p p
Proof :
Conversely, if , , , it must first be approached
by ( ) query in REPORT which implements a search in a heap,
hence finding all nodes satisfying the ( ) query. Then the query
, must
v v r
v
v
v r
p q p q
q q
q q
p p
be positively answered.
May 2012 40
2
2
is a heap in and binary search tree in , whose depth is bounded by
log . REPORT implements a radix search in , . Without
( ) query, this was an ordinary search of log , where
is the
r
v p p
T q p
O n p
q q O n k k
2
number of nodes satisfying , . ( ) query prevents
overheads of quering wrong nodes, yielding log time.
v r vp p q q
O n k
Q.E.D
2
2
A priority search tree for a set of points uses storage
and can be built in log time. Reporting of all points in quadrant
, , takes log time, where is report size.r
n O n
O n n
p q O n k k
Theorem :
May 2012 41
1
1 2 2
1
FIND_ALL_INTERSECTIONS ( ) {
sort vertical edges of retngles in ascending order , , , ;
set min ; initialize root of priority search tree ;
( 1 ; 2
n
i i
n
l i n i
void rectangles R
x x x
p b T
for i i n
; ) {
( is openning ) {
REPORT_INTERSECTIO
// report
N ( , , , ) ;
INSERT ( , , ) ;
intersections only for openning ed
}
{ DEL
gei
l i i
i i i i
i
if x
p e b root T
b e b , e , root T
else
ETE ( ) ; // clo}
}
}
sing edgei ib , e , root T
May 2012 42
Layout Connectivity Graph
• Geometric intersection algorithms detected pair-wise
physical connectivity of polygons (labeled by net name),
yielding a connectivity graph G(V,E).
– V: polygons
– E: physical connections
• Connected components (CC) of G(V,E) represent parts
of layout having same electric potential.
– Short occurs when CC has more than one label
– Open occurs when multiple CCs have same label
May 2012 43
Disjoint Sets and Connected Components
MAKE_SET creates a set of single element .x x
UNION , applies . The new set is represented by
an element of either or , which are then destroyed from .
x y
x y
x y S S
S S
S
1 2 1
Invariants of connected component algorithm is a collection of
, , , of dynamic set , , ,
Every set is represented (identified) by one of its objects.
is supplamented by
kk i i i i j jS S S s S S S S S
S operations defined for every .x S
FIND_SET returns a pointer to where belongs to.xx S x
May 2012 44
What is the maximal number of UNION operations?
We measure performance by , the number of
MAKE_SET operations and , the total number
of MAKE_SET, UNION and FIND_SET.
n
m
CONNECTED_COMPONENTS( , ) {
( ) { MAKE_SET( ) }
( , ) {
(FIND_SET( ) FIND_SET( )) { UNION( , ) }
}
}
void graph G V E
foreach v V v
foreach e u v E
if v u u v
May 2012 45
UNION ( c , f )
Linked-List Data Structure of Disjoint Sets
a dcb
e gf
a cb gf
What is run-time complexity ?
MAKE_SET is O(1) FIND_SET is O(1)
What about UNION ?
May 2012 46
x1 x2 x3 Xn-1 xn
Let CONNECTED_COMPONENT do the following sequence
MAKE_SET(X1)
MAKE_SET(Xn)
UNION(X1,X2)
UNION(Xn-1,Xn)
n
2n
2n
Average time per operation is θ(n)
Question: How to improve run-time ?
May 2012 47
Time is consumed in UNION for updating the pointers to set’s
representative
Use weighted-UNION heuristics
• maintain size of set
• Always merge smaller set to larger one
Theorem: Given G(V,E) with |V|=n and |E|=m, finding connected
components by weighted-UNION heuristics takes O(m+nlog2n) time.
Proof: Pointer of vertex to the representative of its set may change log2n times at most !
Therefore, the time consumed by UNION is O(nlog2n).
There are O(m) operations of MAKE_SET and FIND_SET. Q.E.D
May 2012 48
UNION ( c , f )
Disjoint-Set Forests
a
d
c
b
e
g
f
a
d
c
b g
f
e
Sets are represented by rooted trees instead of linked lists.
This by itself doesn’t improve run-time. A sequence of n-1
UNION operations may result a tree that is just a linear
list. Two heuristics improve performance significantly: Union
by Rank and Path Compression.
May 2012 49
Similar to weighted UNION heuristics. Make the root of the deeper
tree the root of the new tree (hang the shallower tree on the root of
the deeper one).
It requires to maintain the depth of the tree, called rank, at the root.
Rank approximates the log2 of tree size.
Path compression: Implemented as a part of FIND_SET. It
consumes time proportional to the distance from root. It maintains
set trees as shallow as possible.
ba
cd
e
ba
c d
eFIND_SET ( b )
May 2012 50
Disjoint-Set Forests Implementation
Associate with every node an integer , which
is the longets path (edge count) to leaf in subtree rooted
at . points to parent node.
x rank x
x parent x
MAKE_SET( ) {
; 0 ;
}
void node x
parent x x rank x
UNION( , ) {
LINK(FIND_SET( ) , FIND_SET( ))
}
void node x node y
x y
May 2012 51
Disjoint-Set Forests Implementation
// and are roots, hence only their ra
LINK( , , ) {
( ) {
= ;
}
{
nk may chang
=
e
;
( ) {
++ }
}
}
void node x node y
if rank x rank y
parent y x
else parent x y
if rank x rank y
ra k y
x
n
y
May 2012 52
// Check whether is the root. If so, return it.
// Otherise, it is connected directly to tree
// representative (root), thus implementing path
F
/
IND_SET( ) {
/ compressio
(
n.
node node
if
x
x
) {
FIND_SET( );
}
;
}
x parent x
parent x parent x
return parent x
May 2012 53
FIND_SET is a two-pass process. It first goes
upward to root along find path to find set
representative. It then goes downward (exit
of recursion) and connects to root each node
along the path.
Run time is almost linear in . For proof see:
.
m
Introduction to Algorithms,
T.H. Cormen, C.H. Leiserson and R.L. Rivest
May 2012 54
Implementation Comments
• Connectivity graph edges are not required explicitly.
Instead, connected component finding algorithm is
invoked into the various intersection report algorithms.