A Class of Min-Cut Placement Algorithms

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

A CLASS OF MIN-CUT

PLACEMENT by

ALGORITHMS %

Departments

M e l v i n A. B r e u e r o f E l e c t r i c a l E n g i n e e r i n g g~ C o m p u t e r U n i v e r s i t y of S o u t h e r n C a l i f o r n i a Los Angeles, California 90007

Science

Summa r y In t h i s p a p e r w e p r e s e n t a c l a s s of r a i n - c u t p l a c e ment algorithms for solving some assignment probl e m s r e l a t e d to t h e p h y s i c a l i m p l e m e n t a t i o n o f e l e c trical circuits. We discuss the need for abandoning classical objective functions based upon distance, and introduce new objective functions based upon "signalscut. " The number of signals cut by a line c is a lower b o u n d o n t h e n u m b e r of r o u t i n g t r a c k s w h i c h m u s t cross c in routing the circuit. Three specific objective functions are introduced and the relationship bet w e e n one of t h e s e and a c l a s s i c a l d i s t a n c e m e a s u r e based upon half-perimeter is presented. Two rain-cut placement algorithms are presented. T h e y a r e r e f e r r e d to a s C ) u a d r a t u r e a n d S l i c e / B i s e c t i o n . T h e c o n c e p t s of a b l o c k and cut line a r e i n t r o d u c e d . T h e s e two e n t i t i e s a r e the major constructs in developing any new min-cut placement algorithm. Mostofthe concepts presented have been implemented, and some experimental results are given. I. Introduction

This paper deals with a classical problem encountered in the physical implementation of circuit cards o r c h i p s , r e f e r r e d to a s t h e p l a c e m e n t p r o b l e m . The problem is defined, semi formally, as follows. Give n a s e t o f e l e m e n t s 8 = { e l , e~ . . . . . e~} a n d a s e t of s i g n a l s ,2= [ s u sm. . . . . s , } . W e a s s o c i a t e w i t h e a c h e l e m e n t e E ~ a s e t of s i g n a l s ,2e, w h e r e J~ = J . S i m i l a r l y w i t h e a c h s i g n a l s E we a s s o c i a t e a s e t of e l e m e n t s e,, w h e r e $ = { e l s e ,/,}. d~, is said to be a signal net. W e are also given a set of slots or locations ~ = [ L I , L m..... L ], w h e r e p g n . T h e placem e n t p r o b l e m is to assign each e l~ ~ to a unique location Lj such that s o m e objective is optimized. N o r mally each element is considered to be a point, and if e t is assigned to location L~ then its position is defined by the coordinate values (x],y~). Usually a subset of the elements in d~ are fixed, i.e., pre-assigned to locations, and only the remaining elements can be assigned to the remaining unassigned locations. N o n fixed elements are called m o v e a b l e elements, and those slots not pre-assigned elements are called open slots. E x a m p l e placement p r o b l e m s deal with polycell LSI chip design [2,4,5], P C card design, and assigning functions to previously placed IC's. F o r generality w e will refer to the area (such as a chip, card or board) containing the slots or locations as the carrier. After the elements are assigned to locations the resulting circuit configuration is routed. T h e automatic routing of 100% of the signals in ~ is one of the

m a i n o b j e c t i v e s of the p h y s i c a l i m p l e m e n t a t i o n p o r t i o n of a d e s i g n a u t o m a t i o n s y s t e m . Returning now tothe placement problem we see that o u r a c t u a l g o a l i s t o a s s i g n e a c h e l e m e n t to a l o c a t i o n i n s u c h a m a n n e r a s to m a x i m i z e t h e r o u t a b i l i t y of t h e resulting layout. However, this is a very intangible goal, s i n c e it i s h i g h l y d e p e n d e n t o n a n u m b e r o f f a c tors, one being the basic algorithmic method employed by the router. L e t d, b e a n e s t i m a t e of t h e t o t a l d i s t a n c e of r o u t e r e q u i r e d to i n t e r c o n n e c t n e t s , a n d s e t N a = ~ - ~ d . . T h e n Vs c l a s s i c a l p l a c e m e n t a l g o r i t h m s a t t e m p t to a s s i g n e l e m e n t s to l o c a t i o n s s u c h that N d i s m i n i m i z e d . By so d o i n g it i s f e l t t h a t r o u t a b i l i t y i s i n c r e a s e d . U s u a l l y d i s e i t h e r t h e l e n g t h of a m i n i m a l s p a n n i n g t r e e ( M S T ) f o r $,, o n e - h a l f t h e p e r i m e t e r of t h e m i n i m a l e n c l o s i n g r e c t a n g l e , d e n o t e d b y P, o r t h e S t e i n e r distance. The corresponding total distances using the M S T , P o r S t e i n e r l e n g t h a r e d e n o t e d b y N a ( M S T ) , N a ( P ) , a n d Nd(S) , r e s p e c t i v e l y . I n t h e p l a c e m e n t a l g o r i t h m to b e p r o p o s e d in t h i s paper we suggest a new objective function. This objective was motivated by two observations, n a m e l y (1) s u c c e s s f u l r o u t i n g of a c a r r i e r i s d e p e n d e n t o n t h e d e n sityof interconnections on the carrier, a n d (2) s o m e a r e a s of a c a r r i e r a r e m o r e d e n s e t h a n o t h e r s . Let c b e a h o r i z o n t a l l i n e c r o s s i n g t h e s u r f a c e of a carrier. F o r a n a r b i t r a r y s i g n a l s , if o n e o r m o r e e l e m e n t s i n d~, a r e a b o v e c , a r d o n e o r m o r e e l e m e n t s i s N, a r e b e l o w c, t h e n w h e n r o u t i n g s i g n a l n e t $, a t least one connection must cross line c [9]. We say t h a t l i n e c i s a c u t l i n e , and c i s s a i d t o c u t s i g n a l s . F o r a g i v e n p l a e m e n t , the v a l u e of c, d e n o t e d by v(c), is the totalnumber o f s i g n a l s c u t b y c. In g e n e r a l , v ( c ) is h i g h l y d e p e n d e n t on t h e l o c a t i o n of c a s w e l l a s the g e o m e t r y of t h e c a r r i e r . In t h i s p a p e r we e m p l o y a f a m i l y C,v a n d C~ o f v e r t i c a l a n d h o r i z o n t a l c u t l i n e s . O u r o b j e c t i v e f u n c t i o n is to m i n i m i z e s o m e f u n c t i o n f of the v a l u e s of e a c h c u t l i n e i n @ v a n d C~H. P l a c e m e n t p r o c e d u r e s w h i c h m i n i m i z e t h e v a l u e of s u c h a f u n c t i o n are called rain-cut placement algorithms. D r u f f e l a n d S c h m i d t [ 1 , 7] h a v e b r i e f l y r e f e r r e d to a placement procedure that falls into our category of rain-cut placement. Also a brochure [6] describing a proprietory DA s y s t e m m a k e s r e f e r e n c e to u s i n g t h i s c o n c e p t f o r p l a c e ment. II. D e v e l o p m e n t o f O b j e c t i v e F u n c t i o n s Min-Cut Placement Algorithms A. Classical Objective Function is (1) for

#This w o r k w a s supported in part by the National Science Foundation under Grant E N G 7 4 - 1 8 6 4 7 .

The first objective function one might consider the function N c (cr) = ~ v ( c ) 284

w h e r e t h e s u m i s o v e r a l l c E C~vL)C~. T o e v a l u a t e t h e properties of this function one must first define the loc a t i o n o f t h e c u t s i n d~v a n d ~HConsider a regular carrier geometry where elements are laid out in columns and rows, and where the distance between each column and row is one unit. We define a canonical set of cut lines as the collection of cut lines between each row and each column. Then the following result can be easily proven. Theorem 1: U s i n g a c a n o n i c a l s e t A o f c u t l i n e s , m i n i m i z i n g , t h e o b j e c t i v e f u n c t i o n Nc(~) -----~ v ( c ) , where the s u m i s t a k e n o v e r a l l c u t l i n e s , i s e q u i v a l e n t to m i n i mizing the objection function Na(P)=~d,, where the ~um is taken over all signal nets and the measure taken for d is P.I Hence, for an optimal placement N c (~) = N d ( P ) . Since minimizing t h e f u n c t i o n N c {o) i s equivalent to minimizing the function Nd(P), using the f u n c t i o n N(o) w o u l d n o t l e a d t o a n y n e w r e s u l t s w h i c h could not be obtained by existing techniques. B. Min-Max Objective Function such as polycell function is I c E C] )

crossing c is minimized, subject of course to the constraint that elements not in A cannot be moved. This new assignment of T-assigned elements is again considered to be aT-assignment.

---- YZ

i A1
i I

A Z Y1

I I I I I
X2

X I

For some LSI carriers,

carrier technologies, a suitable objective

Figure

1.

Carrier

and a Block

N
C

(re_M) = m i n ( M a x { v ( c )

(2)

w h e r e C is a set of cut lines. This objective function is m o s t useful in trying to reduce the m a x i m u m track usage in a channel. Such an objective function is difficult to satisfy, and will not be dealt with in this paper. C. Sequential Objective Function

T h e o r i g i n a l a r e a A, a l o n g w i t h t h e s l o t s a n d e l e ments within A is called a block, and is denoted by B. Note that a cut line divides a block into two new blocks. The process of dividing a block into two new blocks is called block division. A moveable element is not cons i d e r e d ~ l a c e d u n t i l t h e b l o c k it i s i n h a s o n l y o n e o p e n slot. A t t h i s t i m e it i s s a i d to b e p l a c e d o r a s s i g n e d to that slot. Let ~ be a set of disjoint blocks. Initially let the entire carrier b e b l o c k B1, a n d s e t ~ = { B 1 } . Then one form of a rain-cut placement algorithm for minicut placement algorithm for minimizing N(Sq) i s a s f o l l o w s, Algorithm 1: C u t o r i e n t e d i t h m f o r Nc(Sq). 1. 2. 3. rain-cut placement algor-

W e will next present an objective function, called a sequential objective function and denoted by Nc(Sq), w h o s e near m i n i m a l value is relatively easy to achieve and which also leads to good placements. The f o r m of this class of objective function is N c ( S q ) = m i n v ( c i )Iminv(c i )I''" Iminv(c. ) r r -I ' il (3)

w h e r e c i , c~ . . . . , c r i s a g i v e n s e t o f c u t l i n e s , (il, i~, . . . . i r) i s a p e r m u t a t i o n 0 o n (1, 2 . . . . . rJ, canbe read as "subject to," and the expression f o r N a(Sh) i s r e a d f r o m l e f t to r i g h t . H e n c e ct , c . . . . . . c I represents n ordered sequence of cut hnes, cilbelngthe first cut line processed and ci, the last. By appropriate selection of D we can specialize the placement algorithm to fit a specific carrier geometry.

4. 5.

In the remainder of this paper we will discuss and illustrate heuristic procedures for minimizing N=(Sq), as well as present several useful orderings for the cut lines.

Select a sequence (permutations) for processing the cut lines. Select next cut line c in sequence to process. Assume c cuts across a subset of blocks S'= {B, T B ~ . . . . . Bit ]. Re-assign T-assigned elements within these blocks such that v(c) is minimized. In a natural way, from two new blocks from each of the blocks cut by c. If t h e r e a r e n o m o r e c u t l i n e s t o p r o c e s s , or if every block contains at most one moveable element, t h e n e x S t , e l s e r e t u r n t o s t e p Z. to b e p r o c e s s e d

The sequence in which cut lines are can be either fixed or adaptive.

Ill. B a s i c

Structure

of Min-Cut

Placement

Algorithms

Consider the carrier shown in Fig. l, where some arbitrary assignment of elements to slots has occurred. W e r e f e r to s u c h a n a s s i g n m e n t of moveable elements to s l o t l o c a t i o n s a s a t e m p o r a r y assignment, denoted by T-assignment. A rectangular subarea A of the board is shown along with a cut line c. Line c div i d e s A i n t o a r e a s A 1 a n d A~. N o w , w i t h i n A~ , i = l , Z, we can re-assign some T-asslgned elements located i n A 1 t o b e i n A~, a n d a n e q u a l n u m b e r o f T - a s s i g n e d e l e m e n t s i n A~ t o b e i n A 1. A s s u m e w e d o t h i s i n s u c h a way so that the total number of signals on the carrier 285

Example: Consider the carrier shown in Fig. 2a along with the five cut lines. Assume the lines are to be processed i n t h e s e q u e n c e c l , cA, c s , c ~ , % . Starting with the initial block S, consisting of the entire carrier and all elements, we process B 1 w i t h r e s p e c t to c~, h e n c e m i n i m i z i n g v(c~). Block B 1 is now divided i n t o t w o n e w b l o c k s , d e n o t e d b y B 1 a n d B= ( t h i s i s a n e w b l o c k B1). N o t e t h a t o n c e a n e l e m e n t h a s b e e n a s s i g n e d t o t h e l e f t ( r i g h t } o f c~ a n d B 1 i s d i v i d e d , t h e e l e m e n t can never be moved to the other side of c 1 no matter where subsequent cut lines occur. We now process B 1 a n d B~ ( s i m u l t a n e o u s l y ) w i t h r e s p e c t t o c~, p r o d u c i n g t h e f o u r b l o c k s s h o w n i n F i g . Zd. N e x t w e p r o c e s s

Cll
I

c2 I
I

I c3

[c 1

c41

i
---1

:-,
:,
-T

:
--

I
-

B
1

blocks this s c h e m e w i l l significantly d e c r e a s e c o m p u tation time. This o c c u r s b e c a u s e the p r o c e s s of T - a s signing e l e m e n t s is of complexityC>(n!) for a block of n elements. Heuristic p r o c e d u r e s for carrying out this p r o c e s s are a p p r o x i m a t e l y of complexityO(ns). H e n c e , for e x a m p l e , rather than p r o c e s s i n g one block of n elem e n t s it is usually significantly faster to process, possibly several times, two blocks of size, say n/Z. In general, w e h a v e adapted the strategy of p r o c e s s ing a set ~' of blocks sequentially, a n d iteratively, rather than simultaneously. T h e disadvantage of this type of p r o c e s s i n g is that w e m a y achieve a local m i n i m a l rather than a global m i n i m a l . A n o t h e r modification to the p r o c e d u r e just p r e s e n t e d deals with the p r o b l e m of w h e r e to cut a block. O n e useful criteria is to cut a block so that half of the o p e n slots are on either side of the cut line. This is called bisecting. A g a i n consider blocks B I and B ~ (Fig. 2c). A s s u m e B ~ has m a n y p r e a s s i g n e d e l e m e n t s a b o v e c 4 while Bs does not. T h e n bisection of B I and B ~ cannot be d o n e b y t h e s a m e cut line. If w e select different cut lines for B I a n d B~,then w e are no longer dealing with the s i m p l e sequential objective function given b y eq. (3). W e see that it is possible to d y n a m i c a l l y select cut lines as one proceeds, b a s e d u p o n the location of fixed and o p e n slots in the various blocks encountered. N e x t w e present a revised version of our initial a l g o r i t h m which allows for this d y n a m i c handling of cut lines. F o r this a l g o r i t h m w e c a n no longer write our objective function in a s i m p l e concise f o r m . A l g o r i t h m 2: ithm. I. Z. 3. 4. 5. B l o c k oriented rain-cut p l a c e m e n t algor-

(a)

(b)
B1 c5
_ B 3.

ct:t B2J
(c)
ic2
I

B2

-_

B 4-

(d)
c3
i

B I B3

i I B Z
I

B I B 3 B 5

B 7 B8 B 9

B Z
i

, B4 I
I

B 4 B6

B5

I B6
I

(e)

(0

B1 B3 B5

B7 B8 B9 (g)

B Z B10 B4 B1 1 B 6 B12

Figure

Z.

Min-Cut Algorithm 1 Processing B 1 with R e s p e c t t o t h e s e q u e n c e c~, c4, c 5, c~, c s

Select next block B (or set of blocks S') for division. Select cut lines for these blocks. R e - a s s i g n m o v e a b l e e l e m e n t s in B or ~ ' * such that the n u m b e r of signals cut is m i n i m i z e d . Subdivide blocks, f o r m i n g a n e w set of blocks S. If all blocks n o w contain a single m o v e a b l e e l e m e n t then exit, else return to step I.

c s w h i c h o n l y i n t e r s e c t s B s and B 4. N o t e t h a t e v e n t h o u g h t h e m o v e a b l e e l e m e n t s i n B 1 a n d B~ a r e o n l y T a s s i g n e d , t h e f a c t t h a t w e do not k n o w o p t i m a l l o c a t i o n s for these elements is immaterial since they are above c 4 h e n c e c a n n e v e r b e m o v e d b e l o w c s. T h e r e f o r e t h e a c t u a l l o c a t i o n s o f t h e s e e l e m e n t s i n B 1 a n d B= n e e d not b e k n o w n w h e n c a l c u l a t i n g t h e v a l u e o f c5. C o n t i n u i n g t h e p r o c e s s i n g of t h e c u t s w e o b t a i n t h e r e s u l t i n g 12 b l o c k s a s s h o w n i n F i g . Zg. It i s c l e a r t h a t t h i s p r o c e d u r e r e a l i z e s t h e o b j e c t i v e f u n c t i o n N=(Sq). In p r a c t i c e , it i s n o t a l w a y s d e s i r a b l e t o e x e c u t e A l g o r i t h m 1 e x a c t l y as s p e c i f i e d . T h i s o c c u r s f o r t h e f o l l o w i n g two r e a s o n s . C o n s i d e r F i g . Zc. I n p r o c e s s i n g c 4 w e m u s t p r o c e s s B~ a n d B~ s i m u l t a n e o u s l y . T o r e d u c e c o m p u t a t i o n t i m e it i s a d v a n t a g e o u s t o p r o c e s s B 1 a n d B~ s e q u e n t i a l l y . T h a t i s , f i r s t p r o c e s s B ~ a n d t h e n B~. W h e n p r o c e s s i n g B l w e m u s t i g n o r e t h e m o v e a b l e e l e m e n t s i n B~ s i n c e t h e y m a y h a v e b e e n r a n d o m l y a s s i g n e d to s l o t s . Once B 1 h a s b e e n p r o c e s s e d , that is, T-assigned elements re-assigned above and b e l o w c~,we can now u s e this i n f o r m a t i o n in p r o c e s s i n g B~. Q n c e t h e e l e m e n t s in B~ h a v e b e e n r e - a s s i g n e d to s l o t s , w e c a n n o w r e p r o c e s s B~ w i t h r e s p e c t to c 4 u s i n g this information. Hence we can iteratively process B 1 and B~untilno new T-assignments occur. At this time the blocks can be divided. When dealing with large

B l o c k Selection B l o c k s c a n be p r o c e s s e d in any order. T w o natural o r d e r i n g s are referred to as dept h first a n d b r e a d t h first. T h e s e orderings c a n be realized b y storing n e w blocks on a stack. B r e a d t h first is realized with a first-in first-out stack. In b r e a d t h first w e n o r m a l l y p r o c e s s one or m o r e blocks at a time, while in depth first w e p r o c e s s only one block at a time. Selection of Cut Lines N o r m a l l y the location of e a c h allowable cut line c a n be specified in advance, e.g., b e t w e e n r o w s a n d / o r c o l u m n s of slots. T h e actual p r o b l e m of selecting a cut line is thus in d e t e r m i n i n g in w h a t s e q u e n c e to process these lines. T h e selection criteria is usually a fumtion of the carrier g e o m e t r y and predicted routing density. F o r fixed ordering w e h a v e found that two types of cut lines are quite effective; they are referred to as a slice cut a n d a b i s e c t i o n cut. A slice cut c of a block B is a cut line w h i c h isolates a fixed n u m b e r (K) of slots of B to one side of c a n d the r e m a i n i n g slots to # T h e blocks in S' are sequentially p r o c e s s e d , a n d if desired, iteratively p r o c e s s e d .

286

the other side of c. A bisection cut c of a block is a cut line which tends to evenly divide the unassigned elements in B to either side of c. By "tends to" we mean that there exists no other cut line c t which more closely divides the unassigned elements. IV. Two Fixed Secluential Min-Cut Placement Algorithms

(assigned) elements and some moveable (unassigned) elements. A block can be divided (partitioned) by a cut line into two blocks. Formally, a b l o c k B~ c o u sists of a 7-tuple <Zl, FEI, FLOCt,ft,MEI, ALOC t, Ft> defined as follows: 1. 2. 3. 4. 5. 6. Z , = (X[, X~, Y~I, Y~) - t h e c o o r d i n a t e s defining the physical boarders associated w i t h B t ( s e e F i g . 1). FE l - a finite set of fixed elements located within Zi FLOC t - a set of locations each of which is within Zt, w h e r e IFE, I = IFLOC, I. f~ - a f u n c t i o n a s s i g n i n g e a c h e l e m e n t i n F E t t o a unique element in FLOCs." ME t - a set of moveable (unassigned) elements in
B l

In this section we will describe two specific raincut placement procedures corresponding to Algorithm 2, T h e y d i f f e r i n t h e o r d e r i n w h i c h b l o c k s a r e p r o cessed and the type of cut lines employed. We refer to these algorithms as Quadrature placement and Slice/Bisection placement. A. Quadrature Placement Procedure

In this procedure the original block (carrier) B 1 is first bisected by a vertical cut line producing two new b l o c k s B~ a n d B~. T h e s e t w o b l o c k s a r e t h e n c u t b y horizontal bisecting cut lines thus forming up to four blocks. These blocks are then cut by vertical bisecting cut line. This process is repeated, alternating between vertical and horizontal cut lines, until each element is placed. Note that this procedure processes blocks breadth first. The quadrature placement algorithm is designed for carriers having a high density of routing in their center. By first processing cut lines in the center of the carrier w e a t t e m p t to push intercormections away from this region, and hence produce a placement which can be routed with a more uniform density. B. Slice/Bisection Placement Procedure

7.

ALOC t - a set of available locations in Z 1 for placing the elements in ME t . We assume that I MEtl = IALOCII. If t h e r e a r e a c t u a l l y m o r e l o c a t i o n s than elements, then dummy elements are defined. (Contrary to the previous discussion, we do not actually employ a mapping of elements in ME l to elements in ALOCt, i.e. we just think of the moveable elements and available locations as two sets. ) F t - a flag which indicates whether or not a block has been processed. This flag is used when a set of blocks must be iteratively processed.

A v e r t i c a l c u t l i n e c o f b l o c k B i s s a i d to d e f i n e t w o pseudo blocks B I and B" where B I and B" are defined as follows. Inthis definition c has x-coordinate X0, w h e r e Xl_~ X0_~ X~. i. 2. 3. 4. 5. 6. 7. Z l = (XI, X0, Y~, Y~) a n d Z " = (X0, X~, Y~, Y~). F E ' ( F E n ) is the subset of e l e m e n t s in F E to the left (right) of c. F L O C l ( F L O C " ) is the subset of slots in F L O C to the left (right) of c. fl (f,,) is the restriction of f to the d o m a i n F E l (FEll). M ~ / ( M E " ) is the subset of e l e m e n t s in M E to the left (right) of c. A L O C t ( A L O C m) is the subset of locations in A L O C to the left (right) of c. F L A G l ( F L A G " ) - flags associated with B S and B n initially set to 0.

In this procedure ( s e e F i g . 3), w e f i r s t d i v i d e t h e initial set of n elements into a set of K and n-K elem e n t s , w h e r e K > 0. A g a i n v ( c ) i s m i n i m i z e d . These K elements represent the bottom row or slice of components on a carrier. This procedure is repeated on the remaining (n-K) elements, again dividing them into a set of K elements, and a set of (n-2K) elements. This process is repeated until all elements have been assigned to a row. The elements are then assigned to columns via vertical bisecting. c

c.._ _ _ _

c
---~c_ ~

B t and B " are said to be ]~seudo blocks since their m o v e a b l e e l e m e n t s c a n b e r e - a s s i g n e d f r o m B I to B " and vice versa. That is, they c a n b e r e - a s s i g n e d f r o m one side of c to the other. A vertical a s s i g n m e n t of a block B consists of a. d e t e r m i n i n g a vertical cut line c for B; b. constructing p s e u d o blocks B' a n d B"; and c. assigning the e l e m e n t s of M E to M E l and M E t' such that s o m e objective is m i n i m i z e d , such as the n u m b e r of signals cut b y c. A vertical a s s i g n m e n t of a set of blocks ~ = { BI, B~, .... Bn] consists of a vertical a s s i g n m e n t of e a c h B t E~. A vertical bisection a s s i g n m e n t is a vertical assignm e n t generated b y a vertical bisection cut line. B. Partitioning

~.__Stice Figure 3.

o f s i z e IK Scheme --

Slice/Bisection Placement Growing Horizontal Slices

This technique is best suited to carriers where there is a high interconnect density at the terminals. V. A. Formalization of Min-Cut and Implementation Aspects Placement Procedures

A Block

In this section we present a more detailed version of the placement procedures described in Sec. IV. Recall that the basic structure behind a rain-cut placement procedure is that of a block. Intuitively a block is a section of a carrier containing some fixed

The key problem in carrying out a vertical assignment is that of assigning the elements i n M E to t h e s e t s M E t a n d MHY' s u c h t h a t w e m i n i m i z e the number of signals cut by c. This problem is a generalization of the following partitioning problem. Given a graph G having n nodes, partition the set of nodes of G into two

287

d i s j o i n t s e t s N 1 a n d N= o f n o d e s h a v i n g n 1 a n d n~ e l e m e n t s respectively, w h e r e n1+n~= n, and such that the n u m b e r of edges between N I and N~ is minimal. Kernighan and Lin [3] have described a heuristic proc e d u r e w h i c h a p p e a r s to p r o d u c e v e r y fine r e s u l t s for n large. Their procedure starts with an initial (arbit r a r y ) p a r t i t i o n o f N i n t o s e t s N 1 a n d N~, a n d c o m p u t e s sets A = N I and B = N ~ , IAI : !B 1 such that: interchanging A and B reduces the n u m b e r of edges between the resulting set of nodes to a m i n i m u m . The resulting partition of N is thus N ~ = N I - A + B and N~= N~-B+A, w h e r e "-" and "+" refer to set operations. T h e procedure can then be repeated starting with N~ and N~ as the initial partition. This iterative procedure is halted according to s o m e user specified termination rule. To apply the Kernighan-Lin procedure to our probl e m w e m u s t e x t e n d it t w o ~vays. F i r s t i n s t e a d of cutting an edge between two nodes we must deal with cutting s i g n a l s b e t w e e n s e t s of n o d e s . This extension is quite t r i v i a l to i m p l e m e n t and h a s b e e n p r e v i o u s l y discussed by Schweikert and Kernighan [8]. The s e c o n d e x t e n s i o n r e q u i r e d is that w e m u s t r e s t r i c t s o m e e l e m e n t s i n N 1 a n d N~ t o b e u n a ~ r a i l a b l e f o r i n terchange. T h e s e e l e m e n t s i n N 1 a n d N~ c o r r e s p o n d to our fixed elements. The e x t e n s i o n of the K e r n i g h a n Lin p r o c e d u r e w h i c h i n c l u d e s t h e s e two g e n e r a l i z a t i o n s is r e f e r r e d to as the G e n e r a l i z e d K e r n i g h a n - L i n procedure, denoted by GK-L. We define a GK-L subroutine as follows: S u b r o u t i n e G K - L (F S, F n , M S, M r' , M * , M s * ) . Input parameters: F i x e d s e t of e l e m e n t s F ' and F" a n d m o v e a b l e s e t of e l e m e n t s M ' a n d M " . Output parameters: Two m o v e a b l e s e t s o f e l e m e n t s

b)

F o r e a c h b l o c k B~ s u c h t h a t X ~ :~0 (X~ >= X~), put a l l m o v e a b l e e l e m e n t s i n t o F ' (F~). c) F o r every block B~ such that F ~ # 0 and Xt0 cuts (intersects) Bj, if xJ .=xl set all elements in --0---0 M E ~ into F e, otherwise set all elements in M V " into F H . Step 2.3: If F I R S T = I 2.5. go to step 2.4 else go to step

Step Z. 4: (Construction of initial M' and M " ) Partition M E t into disjoint sets having ! A L O C ~ I and I A L O C ~ I elements each, and assign these elem e n t s to M t and M H respectively using an initial partition algorithm. * G o to step Z. 6. Step 2.5: (Construction of M l and M r') Set M t = M K ~ and M ' = M E " . (Here w e use the old value of M E t and M E " for the initial value of M t and M r'.) Step 2.6: Call subroutine G K - L (F', F ~ , M # , M " , M * ,

M**).
S t e p 2 . 7 : Set M ~ = M * a n d M E ~ ' = M * * ( i . e . a n d "optimal" assignment of ME t has been made such t h a t v ( c i ) is m i n i m i z e d ) . Set F i= 1 if M * = M', e l s e F 1=2. (F t = 2 i m p l i e s a n e w a s s i g n m e n t o f B l h a s b e e n c o m p u t e d , i . e . M * M ' , w h i l e F t =1 i m p l i e s no new assignment has occurred. S t e p 3: MODE = iterative?

Y e s : Set F I R S T = 0 . If F 1 =Z f o r s o m e i, s e t F l = 0 f o r a l l i a n d go to s t e p 2, o t h e r w i s e E X I T . No: EXIT.

M*

and M**,

wlere M*,M**=
and

M'UM",M*nM**=tp,

IM**i.

iM'I:IM*I and tM" I=

M'UM",M*UM**=

T h i s p r o c e d u r e is f i n i t e s i n c e w h e n e v e r a b l o c k i s p r o c e s s e d , e i t h e r v(c) is r e d u c e d o r e l s e M ' = M * . S i n c e v(c) c a n n o t b e i n d e f i n i t e l y r e d u c e d , e v e n t u a l l y M~ = M~ f o r a l l i a n d w e e x i t t h e p r o c e d u r e . O n c e S ' h a s b e e n p r o c e s s e d b y A l g o r i t h m 3, e a c h pseudo block is made into a block. For example, the pseudo block B~ defined by the 7-tuple < (X[, X~, Y~, Y~), FE~, F L O C k , f[, ME~, A L O C ~ , F i > n o w defines a n e w block B~, defined by the p a r a m e t e r s (X~, Xi, Y~, Y~) = t ~ i # (XI, :~0,Yx, Y~), F E ~ = F E I F L O C k = F L O C k , etc. W e rei, fer to the process of defining pseudo blocks as real blocks as block division. Hence, by carrying out block assignment followed by block division a set ]9'= { BI, B=, . . . . B I is t r a n s f o r m e d into a n e w s e t of b l o c k s d ( ~ ' ) = B {B~ . . . . . B { ] , w h e r e m_~ 2q. N o t e t h a t s i n c e s o m e b l o c k s do n o t h a v e a b i s e c t l l n e , m c a n b e l e s s t h a n Zq. In a c o m p l e t e l y a n a l o g o u s m a n n e r t o t h e p r e c e d i n g d i s c u s s i o n , we can d e f i n e the c o r r e s p o n d i n g b l o c k a s s i g n m e n t and d i v i s i o n p r o c e d u r e s for h o r i z o n t a l cut hines. C. Placement Algorithms

Function: M* and M** are c o m p u t e d using the generalized Kernighan-Lin procedure such that the n u m b e r of signals between the set of elements [ F ' , M * ] and iF", M**} is minimal, where the initial partition is { F', M I} and [ F", M " ] . W e can n o w e m p l o y the GI<-L subroutine to c o m p u t e a vertical bisection assignment for a set of blocks S '= [B~,B~ ..... Bq} =S. Next w e describe a heuristic procedure for creating this assignment w h e r e the objective is to m i n i m i z e the total n u m b e r of signals cut. This procedure has two m o d e s of operation, n a m e l y iterative or noniterative. In the iterative m o d e the blocks in S' are repeatedly processed until no n e w reductions in the cut values occurs. Algorithm 3: Vertical-Bisection A s s i g n m e n t Step I: F o r i= I, Z ..... q set F t = 0, and construct a vertical bisect line c i for B i. If c t does not exist, so note. T h e x-coordinate of c t is Xt 0. Set F I R S T = I . R e a d in M O D E (iterative or non-iterative). Step 2: F o r i=l, Z ..... q do the following: (V bisection a s s i g n m e n t o f B~) S t e p Z . l : If c t e x i s t s go to s t e p 2. Z, e l s e s e t Fi=2 a n d r e t u r n to s t e p 2 . 1 f o r n e x t i. S t e p 2. Z: ( C o n s t r u c t i o n of F ~ a n d F ~) a) F o r e a c h f i x e d e l e m e n t e i n a n y b l o c k o f 8 to t h e l e f t ( r i g h t ) o f X~ put e i n t o F ' ( F " ) . 0,

The p r o c e d u r e s for v e r t i c a l and h o r i z o n t a l b i s e c t i o n or slice assignment followed by block division make up the m a i n r o u t i n e s in our Q u a d r a t u r e and S l i c e / B i s e c t i o n placement algorithms. As a n e x a m p l e , c o n s i d e r t h e s e t of b l o c k s ~ = [ B1, Be . . . . . Bn} s h o w n in F i g , 4 a . If w e v e r t i c a l l y s l i c e a s s i g n B. a n d t h e n d i v i d e t h e r e s u l t i n g b l o c k w e o b t a i n t h e This is a constructive partitioning procedure which procudes much better final results than when a rand o m assignment is used.

288

set of blocks S = [ Bl, Ba ..... B~+I} s h o w n in Fig. 4b. W e call this process a vertical slice division of/9. Note that the vertical slice assignment of B n can be obtained b y a simplified f o r m of Algorithm 3, n a m e l y b y s e t t i n g ~ ' = B~, e m p l o y i n g a s l i c e c u t r a t h e r t h a n a bisectional cut, and by setting the MODE to non-iteratire.
l I I

cessfully routed). This same card was then processed using automatic placement. The initial random placement used by the system has a half-perimeter of 888. Three different runs are documented in Table I. The first employs the rain-cut placement algorithm once on the IC's. Run Z employs this algorithm twice on IC's and once on the elements. Run 3 employs this procedure three times on the IC's and twice on the elements. Manual Placement Automatic Routing Automatic Placement and Routing

Bn

X~

II
I I I I I

Bn_l

BZ

B1
Card

# of Failures 37

p
R u n # 1 658 R u n #Z 646 R u n #3 634

# of Failures

(a)

838

19
15 ii 5

Bn+ 1

Bn

]Bn-1

Bz

B1

Z Z89 n e t s 3 Z33 n e t s

Z8

554

(b)
Figure 4. D e v e l o p m e n t of a S l i c e (a) B e f o r e S l i c e (b) A f t e r S l i c e Experimental Results

655

35

616

T a b l e 1:

Placement/Routing Re suits

Experimental

VI.

Sorre o f t h e c o n c e p t s d e s c r i b e d i n t h i s p a p e r h a v e been implemented, and in this section we will briefly d e s c r i b e a f e w of t h e r e s u l t s o b t a i n e d . The programs IBM 370/165. are written in PL/I and run on an

Finally, cards 2 and 3 show similar improvement in routing due to this placement program. To p r o c e s s a b o a r d t h r o u g h i n i t i a l p l a c e m e n t of e l e m e n t s to p a c k a g e s , t w o p a s s e s t h r o u g h IC p l a c e ment and one pass through element re-assignment, g a t e t o IC p o r t i o n a s s i g n m e n t , a n d IC p i n a s s i g n m e n t , r e q u i r e s , o n t h e a v e r a g e , 50 C P U s e c o n d s a t a p r i m e t i m e c o s t of $25 p e r m i n u t e . W e h a v e f o u n d f r o m e x p e r i e n c e t h a t if P i s l e s s t h a n 620, w e o b t a i n a l m o s t no f a i l u r e s . Hence we u s u a l l y i t e r a t e t h e e l e m e n t - IC p l a c e m e n t p r o c e d u r e u n t i l e i t h e r w e r e a c h a P v a l u e o f l e s s t h a n 620, o r e l s e i f w e s e e t h a t no s i g n i f i c a n t i m p r o v e m e n t i n t h e placement is possible. W e t h e n go i n t o o u r r o u t i n g phase. We have also carried out numerous experiments dealing with the order in which cut lines should be processed, and have found that Quadrature is usually the best technique for our board geometry, where we first c a r r y o u t a v e r t i c a l c u t ( p e r p e n d i c u l a r to t h e I / O c o n nector). References 1. L . E . D r u f f e l , D . C . S c h m i d t , a n d R . A . W a g n e r , "A simple,efflclent design automation processor," Proc. 11th DesiBn Automation Workshop, June 1974, pp. l Z 7 - 1 3 6 . Z. B . W . K e r n i g h a n , D . G . S c h w e i k e r t , a n d G. P e r s k y , "An optimal channel routing algorithm for polycell layouts of integrated circuits," Proc. D.A. Works h o p , 1973, pp. 5 0 - 5 9 . 3. B . W . K e r n i g h a n a n d S. L i n , " A n e f f i c i e n t h e u r i s t i c p r o c e d u r e f o r p a r t i t i o n i n g g r a p h s , " B e l l SFS. T e c h . J. , vol. 49, February 1970, pp. Z91-308.

All the problems to be discussed in this section d e a l w i t h t h e p l a c e m e n t a n d r o u t i n g of P C c a r d s . T h e c a r r i e r s a r e 5 " X 5 ' % c o n s i s t of 5 c o l u m n s a n d 10 r o w s of 14 o r 16 p i n IC D I P S , a n d h a v e two s i g n a l layers for interconnection. W e t h u s h a v e a d e n s i t y of Z I C ' s / i n s. R o u t i n g i s c a r r i e d o u t o n Z5 r a i l c e n t e r s , hence a very high routing density exists. T h e p h y s i c a l d e s i g n of t h e c a r d i s u s u a l l y c a r r i e d out inthe following order. All steps not modified by the work "manual" are done automatically. T h e p r o c e s s b e g i n s w i t h a n i n i t i a l a s s i g n m e n t of logic functions (elements) to IC's. This step can be done either manually by the logic designer or automatically by a constructive assignment algorithm. After this step we iteratively use the rain-cut placem e n t p r o c e d u r e s t o f i r s t p l a c e IC p a c k a g e s a n d t h e n re-assign elements to packages. The same program can carry out both functions. At t h e c o n c l u s i o n of t h i s step a constructive placement procedure is employed t o a s s i g n e a c h e l e m e n t a s s i g n e d to a n IC t o t h e o p t i m a l p o r t i o n of a n I C . T h i s s t e p i s t h e n f o l l o w e d b y a constructive procedure which assigns signal nets to IC pins. Finally the card is automatically routed via a Lee type routing algorithm. In T a b l e 1 w e s u m m a r i z e t h e r e s u l t s f o r t h r e e "difficult" cards using our slice/blsection algorithm. F o r c a r d no. 1 w e s e e t h a t t h e g i v e n m a n u a l p l a c e ment has a half-perimeter (N~(P)) of 8 3 8 ( i n c h e s ) , a n d w h e n r o u t e d p r o d u c e d 37 f a i l u r e s ( s i g n a l n e t s n o t s u c -

289

4. R . L .

Mattison,

" D e s i g n a u t o m a t i o n of M O S a r t -

work," Computer, vol. 7, January 1974, pp. Zl-Z7. 5. G. Persky, D.N. Deutsch, and D.G. Schweikert, " L T X - a system for the directed automatic design of LSI circuits," Proc. Design Automation Conference, June 1976, pp. 399-407. 6. " P R A N C E , " (brochure), Automated Systems, Inc., 999 Sepulveda Blvd., El Segundo, Calif. 90Z45. 7. D.C. Schmidt and L.E. Druffel, "An iterative algorithm for placement and as signment of integrated circuits," Proc. I Zth Design Automation Conference, June 1975, pp. 361-368. 8. D.G. Schweikert and B . W . Kernighan, " A p r o p e r model for the partitioning of electrical circuits," Proc. Design Automation Workshop, June 197Z, pp. 56-6Z. 9. I.E. Sutherland and D. Oestrelcher, " H o w big should a printed circuit board be?" I E E E Trans. on Computers, vol. C-EZ, M a y 1973, pp. 536-541.

290

You might also like