+ All Categories
Home > Documents > Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R....

Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R....

Date post: 17-Feb-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
64
Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley, CA With additional material from Andrew B. Kahng, UCSD, M. Sarrafza With additional material from Andrew B. Kahng, UCSD, M. Sarrafza deh, UCLA deh, UCLA
Transcript
Page 1: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

Par

titi

on

ing

fo

r

Ph

ysic

al D

esig

n

Pro

f. A

. R. N

ewto

n

Pro

f. K

. Keu

tzer

Mic

hae

l Ors

han

sky

EE

CS

Un

iver

sity

of

Cal

ifo

rnia

Ber

kele

y, C

A

Wit

h a

dd

itio

nal

mat

eria

l fro

m A

nd

rew

B. K

ahn

g, U

CS

D, M

. Sar

rafz

aW

ith

ad

dit

ion

al m

ater

ial f

rom

An

dre

w B

. Kah

ng

, UC

SD

, M. S

arra

fza

deh

, UC

LA

deh

, UC

LA

Page 2: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

2

Let

’s t

ake

a st

ep b

ack

to t

he

1980

’s

Eff

ort

(ED

A t

oo

ls e

ffo

rt)

Resu

lts

(Desig

n P

rod

ucti

vit

y)

a b

s

q

0 1

d

clk

1978

1978

1978

1978

1985

1985

1985

1985

1992

1992

1992

1992

1999

1999

1999

1999

Tra

nsis

tor

en

try -

Calm

a, C

om

pu

terv

isio

n

Sch

em

ati

c E

ntr

y -

Dais

y, M

en

tor,

Valid

Syn

thesis

-C

ad

en

ce, S

yn

op

sys

Wh

at’

s n

ext?

McK

inse

y S

-Cu

rve

Page 3: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

3

Sch

emat

ic E

ntr

y D

esig

n F

low

sch

em

ati

ced

ito

r

netl

ist

Lib

rary

ph

ysic

al

desig

n

layo

ut

a b

s

q0 1

d

clk

a b

s

q0 1

d

clk lo

gic

sim

ula

tor

Des

ign

er d

esig

ns

the

circ

uit

on

nap

kin

s an

d b

lack

bo

ard

Gat

e-le

vel d

etai

ls o

f th

e

circ

uit

are

en

tere

d in

a

sch

emat

ic e

ntr

y to

ol

Vec

tors

are

gen

erat

ed t

o

veri

fy t

he

circ

uit

Wh

en lo

gic

is c

orr

ect

the

net

list

is p

asse

d o

ff t

o

ano

ther

gro

up

to

lay

ou

t

Au

tom

ated

pla

ce a

nd

ro

ute

too

ls c

reat

e la

you

t

Page 4: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

4

Bas

ic P

hys

ical

Des

ign

Pro

ble

mB

asic

Ph

ysic

al D

esig

n P

rob

lem

�W

hat

pro

ble

ms

nee

d t

o b

e so

lved

in

ph

ysic

al d

esig

n?

�W

hat

pro

ble

ms

nee

d t

o b

e so

lved

in

ph

ysic

al d

esig

n?

Sch

emat

ic

Lay

ou

t

Page 5: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

5

Bas

ic P

hys

ical

Des

ign

Pro

ble

mB

asic

Ph

ysic

al D

esig

n P

rob

lem

�W

hat

pro

ble

ms

need

to

be

so

lved

in

ph

ysic

al

desig

n?

�P

lan

ari

ze

gra

ph

� ���p

lace g

ate

s/c

ells

�R

ou

te w

ires t

o c

on

nect

cell

s�

Ro

ute

clo

ck

�R

ou

te p

ow

er

an

d g

rou

nd

�B

on

d I

/O’s

to

I/O

pad

s

�W

hat

pro

ble

ms

need

to

be

so

lved

in

ph

ysic

al

desig

n?

�P

lan

ari

ze

gra

ph

� ���p

lace g

ate

s/c

ells

�R

ou

te w

ires t

o c

on

nect

cell

s�

Ro

ute

clo

ck

�R

ou

te p

ow

er

an

d g

rou

nd

�B

on

d I

/O’s

to

I/O

pad

s

Sch

emat

ic

Lay

ou

t

Page 6: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

6

Ph

ysic

al D

esig

n:

Ove

rall

Flo

wR

ead

Net

list

Init

ial P

lace

men

t

Pla

cem

ent

Imp

rove

men

t

Co

st E

stim

atio

n

Ro

uti

ng

Reg

ion

Def

init

ion

Glo

bal

Ro

uti

ng

Inp

ut

Pla

cem

ent

Ro

uti

ng

Ou

tpu

tC

om

pac

tio

n/c

lean

-up

Ro

uti

ng

Reg

ion

Ord

erin

g

Det

aile

d R

ou

tin

g

Co

st E

stim

atio

n

Ro

uti

ng

Imp

rove

men

t

Wri

te L

ayo

ut

Dat

abas

e

Flo

orp

lan

nin

gF

loo

rpla

nn

ing

Page 7: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

7

Fo

rmu

lati

on

of

the

Pla

cem

ent

Pro

ble

mF

orm

ula

tio

n o

f th

e P

lace

men

t P

rob

lem

�G

iven

:

�A

net

list

of

cells

fro

m a

pre

-def

ined

sem

ico

nd

uct

or

libra

ry

�A

mat

hem

atic

al e

xpre

ssio

n o

f th

at n

etlis

t as

a v

erte

x-, e

dg

e-w

eig

hte

d

gra

ph

�C

on

stra

ints

on

pin

-lo

cati

on

s ex

pre

ssed

as

con

stra

ints

on

ver

tex

loca

tio

ns

/ asp

ect

rati

o t

hat

th

e p

lace

men

t n

eed

s to

fit

into

�O

ne

or

mo

re o

f th

e fo

llow

ing

: ch

ip-l

evel

tim

ing

co

nst

rain

ts, a

list

of

crit

ical

net

s, c

hip

-lev

el p

ow

er c

on

stra

ints

�F

ind

:

�C

ell/v

erte

x lo

cati

on

s to

min

imiz

e p

lace

men

t o

bje

ctiv

e su

bje

ct t

o

con

stra

ints

�T

ypic

al O

bje

ctiv

es:

�m

inim

al d

elay

(fa

stes

t cl

ock

cyc

le t

ime)

�m

inim

al a

rea

(lea

st d

ie a

rea/

cost

�m

inim

al p

ow

er (

stat

ic, d

ynam

ic)

�G

iven

:

�A

net

list

of

cells

fro

m a

pre

-def

ined

sem

ico

nd

uct

or

libra

ry

�A

mat

hem

atic

al e

xpre

ssio

n o

f th

at n

etlis

t as

a v

erte

x-, e

dg

e-w

eig

hte

d

gra

ph

�C

on

stra

ints

on

pin

-lo

cati

on

s ex

pre

ssed

as

con

stra

ints

on

ver

tex

loca

tio

ns

/ asp

ect

rati

o t

hat

th

e p

lace

men

t n

eed

s to

fit

into

�O

ne

or

mo

re o

f th

e fo

llow

ing

: ch

ip-l

evel

tim

ing

co

nst

rain

ts, a

list

of

crit

ical

net

s, c

hip

-lev

el p

ow

er c

on

stra

ints

�F

ind

:

�C

ell/v

erte

x lo

cati

on

s to

min

imiz

e p

lace

men

t o

bje

ctiv

e su

bje

ct t

o

con

stra

ints

�T

ypic

al O

bje

ctiv

es:

�m

inim

al d

elay

(fa

stes

t cl

ock

cyc

le t

ime)

�m

inim

al a

rea

(lea

st d

ie a

rea/

cost

�m

inim

al p

ow

er (

stat

ic, d

ynam

ic)

Page 8: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

8

Res

ult

s o

f P

lace

men

tR

esu

lts

of

Pla

cem

ent

A b

ad

pla

cem

ent

A g

oo

d p

lace

men

t

A. K

ah

ng

Page 9: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

9

Glo

bal

an

d D

etai

led

Pla

cem

ent

Glo

bal

an

d D

etai

led

Pla

cem

ent

Glo

bal

Pla

cem

ent

Det

ail

ed P

lace

men

t

In g

lob

al p

lace

men

t, w

e

dec

ide

the

app

roxim

ate

loca

tion

s fo

r ce

lls

by

pla

cin

g c

ells

in g

lob

al b

ins.

In d

etai

led

pla

cem

ent,

w

e

mak

e so

me

loca

l ad

just

men

t

to o

bta

in t

he

fin

al n

on-

ov

erla

pp

ing p

lace

men

t.

A. K

ah

ng

Page 10: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

10

P

lace

men

t F

oo

tpri

nts

:

Sta

ndard

Cell:

Data

Path

:

IP b

lock -

Flo

orp

lannin

g

A. K

ah

ng

Page 11: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

11

Co

re

Co

ntr

ol

IO

Reserv

ed

are

as

Mix

ed

Data

Path

&sea o

f g

ate

s:

P

lace

men

t F

oo

tpri

nts

:

A. K

ah

ng

Page 12: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

12

Peri

mete

r IO

Are

a IO

–b

all g

rid

arr

ay

P

lace

men

t F

oo

tpri

nts

:

A. K

ah

ng

Page 13: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

13

Ap

pro

ach

to

Pla

cem

ent:

GO

RD

IAN

1A

pp

roac

h t

o P

lace

men

t: G

OR

DIA

N 1

Page 14: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

14

GO

RD

IAN

(q

uad

rati

c +

par

titi

on

ing

)G

OR

DIA

N (

qu

adra

tic

+ p

arti

tio

nin

g)

Init

ial

Pla

cem

ent

A. K

ah

ng

Page 15: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

15

Ap

pro

ach

to

Pla

cem

ent

: G

OR

DIA

N 2

Ap

pro

ach

to

Pla

cem

ent

: G

OR

DIA

N 2

Page 16: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

16

Par

titi

on

in G

OR

DIA

NP

arti

tio

n in

GO

RD

IAN

Par

titi

on

and R

epla

ce

A. K

ah

ng

Page 17: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

17

GO

RD

IAN

(q

uad

rati

c +

par

titi

on

ing

)G

OR

DIA

N (

qu

adra

tic

+ p

arti

tio

nin

g)

Par

titi

on

and R

epla

ce

Init

ial

Pla

cem

ent

A. K

ah

ng

Page 18: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

18

Bas

ic Id

ea o

f P

arti

tio

nin

gB

asic

Idea

of

Par

titi

on

ing

�P

arti

tio

n d

esig

n in

to t

wo

(g

ener

ally

N)

equ

al s

ize

hal

ves

�M

inim

ize

wir

es (

net

s) w

ith

en

ds

in b

oth

hal

ves

�N

um

ber

of

wir

es c

ross

ing

is b

isec

tion

band

wid

th

�lo

wer

bw

= m

ore

loca

lity

�P

arti

tio

n d

esig

n in

to t

wo

(g

ener

ally

N)

equ

al s

ize

hal

ves

�M

inim

ize

wir

es (

net

s) w

ith

en

ds

in b

oth

hal

ves

�N

um

ber

of

wir

es c

ross

ing

is b

isec

tion

band

wid

th

�lo

wer

bw

= m

ore

loca

lity

N/2

N/2

cuts

ize

Page 19: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

19

Net

list

Par

titi

on

ing

: M

oti

vati

on

1N

etlis

t P

arti

tio

nin

g:

Mo

tiva

tio

n 1

�D

ivid

ing

a n

etl

ist

into

clu

ste

rs t

o

�R

ed

uc

e p

rob

lem

siz

e

�E

vo

lve t

ow

ard

a p

hysic

al

pla

cem

en

t

�A

ll t

op

-do

wn

pla

ce

me

nt

ap

pro

ac

he

s u

tili

ze

so

me

un

de

rlyin

g p

art

itio

nin

g t

ec

hn

iqu

e

�In

flu

en

ce

s t

he

fin

al

qu

ali

ty o

f

�P

lacem

en

t

�G

lob

al ro

uti

ng

�D

eta

iled

ro

uti

ng

�D

ivid

ing

a n

etl

ist

into

clu

ste

rs t

o

�R

ed

uc

e p

rob

lem

siz

e

�E

vo

lve t

ow

ard

a p

hysic

al

pla

cem

en

t

�A

ll t

op

-do

wn

pla

ce

me

nt

ap

pro

ac

he

s u

tili

ze

so

me

un

de

rlyin

g p

art

itio

nin

g t

ec

hn

iqu

e

�In

flu

en

ce

s t

he

fin

al

qu

ali

ty o

f

�P

lacem

en

t

�G

lob

al ro

uti

ng

�D

eta

iled

ro

uti

ng

Page 20: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

20

Net

list

Par

titi

on

ing

: M

oti

vati

on

2N

etlis

t P

arti

tio

nin

g:

Mo

tiva

tio

n 2

�B

ec

om

es

mo

re c

riti

ca

l w

ith

DS

M

�S

ys

tem

siz

e i

nc

rea

se

s�

Ne

ed

to

min

imiz

e d

esig

n c

ou

plin

g

�In

terc

on

ne

ct

do

min

ate

s c

hip

pe

rfo

rma

nc

e�

Ha

ve t

o m

inim

ize n

um

ber

of

blo

ck-t

o-b

lock

co

nn

ecti

on

s (

e.g

. g

lob

al b

uses)

�H

elp

s r

ed

uc

e c

hip

are

a�

Min

imiz

es len

gth

of

glo

bal w

ires

�B

ec

om

es

mo

re c

riti

ca

l w

ith

DS

M

�S

ys

tem

siz

e i

nc

rea

se

s�

Ne

ed

to

min

imiz

e d

esig

n c

ou

plin

g

�In

terc

on

ne

ct

do

min

ate

s c

hip

pe

rfo

rma

nc

e�

Ha

ve t

o m

inim

ize n

um

ber

of

blo

ck-t

o-b

lock

co

nn

ecti

on

s (

e.g

. g

lob

al b

uses)

�H

elp

s r

ed

uc

e c

hip

are

a�

Min

imiz

es len

gth

of

glo

bal w

ires

Page 21: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

21

Par

titi

on

ing

fo

r M

inim

um

Cu

t-S

et

(a)

Ori

gin

al P

arti

tio

n (

Ran

do

m)

(b)

Imp

rove

d P

arti

tio

n

Page 22: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

22

Gra

ph

s an

d H

yper

gra

ph

sG

rap

hs

and

Hyp

erg

rap

hs

� � � �A

cir

cu

it n

etl

ist

is a

hyp

erg

rap

h

� � � �A

cir

cu

it n

etl

ist

is a

hyp

erg

rap

h

=

=≡

A g

rap

h

V -

ve

rte

x s

et,

E -

ed

ge

se

t, a

bin

ary

re

lati

on

sh

ip o

n V

.

G(V

,E).

e(v

,v).

e2

.i

i1i2

i

In a

n u

nd

ire

cte

d g

rap

h,

the

ed

ge

se

t c

on

sis

ts o

f u

no

rde

red

pa

irs

of

ve

rtic

es

.

In a

hyp

erg

rap

h,

H a

hyp

ere

dg

e

co

nn

ec

ts a

n a

rbit

rary

su

bs

et

of

ve

rtic

es

,

e.g

. i

e2

.

(V,E

),e

Page 23: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

23

Net

list

Par

titi

on

ing

Net

list

Par

titi

on

ing

A

F

E

D

C

B

G

A

F

E

D

C

B

G Fir

st p

rob

lem

tra

nsi

tio

n f

rom

mu

lti-

term

inal

to

tw

o t

erm

inal

ed

ges

Page 24: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

24

Ed

ge

Wei

gh

ts f

or

Mu

ltit

erm

inal

Net

sE

dg

e W

eig

hts

fo

r M

ult

iter

min

alN

ets

�E

dg

es r

epre

sen

t n

ets

in t

he

circ

uit

net

list

�E

ach

ed

ge

in t

he

hyp

erg

rap

hw

ill t

ypic

ally

be

giv

en a

wei

gh

t w

hic

h r

epre

sen

ts it

s

crit

ical

ity

(cf.

tim

ing

lect

ure

)

�T

hes

e w

eig

hts

will

be

use

d t

o “

dri

ve”

par

titi

on

ing

, pla

cem

ent,

an

d r

ou

tin

g

�B

ut

if w

e w

ant

to u

se a

gra

ph

str

uct

ure

, as

op

po

sed

to

a h

yper

gra

ph

, we

mu

st r

e-d

efin

e

the

edg

es a

nd

th

eir

wei

gh

ts

�E

dg

es r

epre

sen

t n

ets

in t

he

circ

uit

net

list

�E

ach

ed

ge

in t

he

hyp

erg

rap

hw

ill t

ypic

ally

be

giv

en a

wei

gh

t w

hic

h r

epre

sen

ts it

s

crit

ical

ity

(cf.

tim

ing

lect

ure

)

�T

hes

e w

eig

hts

will

be

use

d t

o “

dri

ve”

par

titi

on

ing

, pla

cem

ent,

an

d r

ou

tin

g

�B

ut

if w

e w

ant

to u

se a

gra

ph

str

uct

ure

, as

op

po

sed

to

a h

yper

gra

ph

, we

mu

st r

e-d

efin

e

the

edg

es a

nd

th

eir

wei

gh

ts

P1

P2

Pn

Page 25: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

25

Ed

ge

Wei

gh

ts f

or

Mu

ltit

erm

inal

Net

sE

dg

e W

eig

hts

fo

r M

ult

iter

min

alN

ets

�R

epla

ce e

ach

net

Siw

ith

its

com

ple

te g

rap

h.

�W

hat

wei

gh

t o

n e

ach

ed

ge?

�O

ne

app

roac

h –

assi

gn

wei

gh

t o

f 1

to e

ach

net

in t

he

new

gra

ph

�A

lter

nat

ive:

n-p

in n

et, w

=2/

(n-1

) h

as b

een

use

d, a

lso

w=

2/n

�“S

tan

dar

d”

mo

del

: f

or

n n

ets

in t

he

com

ple

te g

rap

h

w=

1/(n

-1)

�F

or

any

cut,

co

st >

= 1

�L

arg

e n

ets

are

less

like

ly t

o b

e cu

t

�L

ead

s to

hig

hly

su

b-o

pti

mal

par

titi

on

s

�P

rovi

des

an

up

per

bo

un

do

n t

he

cost

of

a cu

t in

th

e ac

tual

net

list

�H

ow

ab

ou

t a

low

er b

ou

nd

on

th

e cu

t co

st?

�R

epla

ce e

ach

net

Siw

ith

its

com

ple

te g

rap

h.

�W

hat

wei

gh

t o

n e

ach

ed

ge?

�O

ne

app

roac

h –

assi

gn

wei

gh

t o

f 1

to e

ach

net

in t

he

new

gra

ph

�A

lter

nat

ive:

n-p

in n

et, w

=2/

(n-1

) h

as b

een

use

d, a

lso

w=

2/n

�“S

tan

dar

d”

mo

del

: f

or

n n

ets

in t

he

com

ple

te g

rap

h

w=

1/(n

-1)

�F

or

any

cut,

co

st >

= 1

�L

arg

e n

ets

are

less

like

ly t

o b

e cu

t

�L

ead

s to

hig

hly

su

b-o

pti

mal

par

titi

on

s

�P

rovi

des

an

up

per

bo

un

do

n t

he

cost

of

a cu

t in

th

e ac

tual

net

list

�H

ow

ab

ou

t a

low

er b

ou

nd

on

th

e cu

t co

st?

P1

P2

Pn

P1

P2 P

n

Page 26: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

26

Ed

ge

Wei

gh

ts f

or

Mu

ltit

erm

inal

Net

sE

dg

e W

eig

hts

fo

r M

ult

iter

min

alN

ets

P1

P2

Pn

11/

2

1/2

1/2

11/

4

1/4

1/4

1/4

1/4

1/4

Page 27: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

27

An

oth

er W

eig

ht

Ass

ign

men

t fo

r L

ow

er B

ou

nd

ing

the

Net

Cu

tA

no

ther

Wei

gh

t A

ssig

nm

ent

for

Lo

wer

Bo

un

din

gth

e N

et C

ut

�W

ant

to f

ind

a w

eig

ht

assi

gn

men

t th

at a

lway

s u

nd

eres

tim

ates

net

cu

ts�

Giv

es a

low

er b

ou

nd

on

th

e co

st o

f th

e n

etlis

t cu

t

�In

tuit

ivel

y: c

ho

ose

wei

gh

t as

sig

nm

ent

s.t

max

co

st o

f a

net

cu

t in

a

gra

ph

is 1

.

�M

axim

um

co

st h

app

ens

wh

en n

od

es a

re d

ivid

ed e

qu

ally

bet

wee

n 2

p

arti

tio

ns

�T

he

nu

mb

er o

f cr

oss

ing

ed

ges

in t

hat

sit

uat

ion

(p

roo

f le

ft t

o t

he

read

er ☺ ☺☺☺

)

�(n

2-m

od

(n,2

))/4

Eac

h e

dg

e is

ass

ign

ed t

he

wei

gh

t o

f

w =

4/(

n2-m

od(n

,2))

Exam

ple

: fo

r n

=3,

w=

4/(9

-1)=

0.5

�W

ant

to f

ind

a w

eig

ht

assi

gn

men

t th

at a

lway

s u

nd

eres

tim

ates

net

cu

ts�

Giv

es a

low

er b

ou

nd

on

th

e co

st o

f th

e n

etlis

t cu

t

�In

tuit

ivel

y: c

ho

ose

wei

gh

t as

sig

nm

ent

s.t

max

co

st o

f a

net

cu

t in

a

gra

ph

is 1

.

�M

axim

um

co

st h

app

ens

wh

en n

od

es a

re d

ivid

ed e

qu

ally

bet

wee

n 2

p

arti

tio

ns

�T

he

nu

mb

er o

f cr

oss

ing

ed

ges

in t

hat

sit

uat

ion

(p

roo

f le

ft t

o t

he

read

er ☺ ☺☺☺

)

�(n

2-m

od

(n,2

))/4

Eac

h e

dg

e is

ass

ign

ed t

he

wei

gh

t o

f

w =

4/(

n2-m

od(n

,2))

Exam

ple

: fo

r n

=3,

w=

4/(9

-1)=

0.5

Page 28: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

28

Par

titi

on

ing

�G

iven

a g

rap

h, G

, wit

h n

no

des

wit

h s

izes

(w

eig

hts

) w

:

wit

h c

ost

s o

n it

s ed

ges

, par

titi

on

th

e n

od

es o

f G

into

k, s

ub

sets

, k

>0,

no

larg

er t

han

a g

iven

max

imu

m s

ize,

p, s

o a

s to

min

imiz

e th

e to

tal c

ost

of

the

edg

es c

ut.

�D

efin

e :

as a

wei

gh

ted

co

nn

ecti

vity

mat

rix

des

crib

ing

th

e ed

ges

of

G.

�A

k-w

ay p

arti

tio

no

f G

is a

set

of

no

n-e

mp

ty, p

airw

ise-

dis

join

t

sub

sets

of

G, v

1,…

,vk,

su

ch t

hat

�A

par

titi

on

is s

aid

to

be

adm

issi

ble

if

�P

rob

lem

:F

ind

a m

inim

al-c

ost

per

mis

sib

le p

arti

tio

n o

f G

01

<≤

=w

pi

ni

,,

,L

Cc

ij

nij

==

(),

,,

,1L

vG

iik =

=1

U

||

,,

,v

pi

ki

≤=

1L

Page 29: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

29

Ho

w b

ig is

th

e se

arch

sp

ace?

�n

no

des

, ksu

bse

ts o

f si

ze p

such

th

at k

p=

n

�w

ays

to c

ho

ose

th

e fi

rst

sub

set

�w

ays

to c

ho

ose

th

e se

con

d, e

tc.

�w

ays

tota

l

�n

=40

, p=

10

�In

gen

eral

, so

lvin

g p

rob

lem

s w

her

e

are

imp

ract

ical

fo

r re

al c

ircu

its

(>1,

000,

000

gat

es)

()n p

np

p−

12

k

n pn

p

p

p p

p p!

L

>1

02

0

Tn

n∝

β,2

Page 30: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

30

Heu

rist

ics

for

n-W

ay P

arti

tio

nin

g�

Har

d p

rob

lem

an

d n

o r

eally

go

od

heu

rist

ics

for

n>2

�D

irec

t M

eth

od

s:S

tart

wit

h s

eed

no

de

for

each

par

titi

on

an

d

assi

gn

no

des

to

eac

h p

arti

tio

n u

sin

g s

om

e cr

iter

ion

(e.

g. s

um

of

wei

gh

ted

co

nn

ecti

on

s in

to p

arti

tio

n)

�G

rou

p M

igra

tio

n M

eth

od

s:S

tart

wit

h (

ran

do

m)

init

ial p

arti

tio

n

and

mig

rate

no

des

am

on

g p

arti

tio

ns

via

som

e h

euri

stic

�M

etri

c A

lloca

tio

n M

eth

od

s: u

ses

met

rics

oth

er t

han

co

nn

ecti

on

g

rap

h a

nd

th

en c

lust

ers

no

des

bas

ed o

n m

etri

c o

ther

th

an

exp

licit

co

nn

ecti

vity

.

�S

toch

asti

c O

pti

miz

atio

n A

pp

roac

hes

:U

se a

gen

eral

-pu

rpo

se

sto

chas

tic

app

roac

h li

ke s

imu

late

d a

nn

ealin

g o

r g

enet

ic

alg

ori

thm

s

�U

sual

ly a

pp

ly t

wo

-way

par

titi

on

ing

(K

ern

igh

an-L

in o

r F

idu

ccia

-M

ath

eyse

s) r

ecu

rsiv

ely,

or

in s

om

e ca

ses

sim

ula

ted

an

nea

ling

Page 31: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

31

Par

titi

on

ing

: R

and

om

plu

s Im

pro

vem

ent

�R

and

om

Par

titi

on

s, S

ave

Bes

t to

Dat

e

�F

ast,

bu

t ca

n b

e sh

ow

n t

o b

e O

(n2 )

�F

ew o

pti

mal

or

nea

r o

pti

mal

so

luti

on

s, h

ence

low

pro

bab

ility

of

fin

din

g o

ne

e.g

. 2-w

ay p

arti

tio

n o

f 0-

1 w

eig

ht

gra

ph

s w

ith

32

no

des

, ~3-

5

op

tim

al p

arti

tio

ns

ou

t o

f(

)1 2

32

16

10

7

)

on

an

y t

rial

⇒<

−P

success

(

Page 32: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

32

Par

titi

on

ing

: M

ax-f

low

, Min

-cu

t

�M

ax-f

low

, Min

-cu

t: u

sefu

l fo

r u

nco

nst

rain

ed lo

wer

bo

un

d

�F

ord

& F

ulk

erso

n, “

Flo

ws

in N

etw

ork

s,”

Pri

nce

ton

Un

iv. P

ress

, 196

2

�E

dg

e w

eig

hts

of

G c

orr

esp

on

d t

o m

axim

um

flo

w c

apac

itie

s b

etw

een

pai

rs o

f n

od

es

�C

ut

is a

sep

arat

ion

of

no

des

into

tw

o d

isjo

int

sub

sets

; cu

t ca

pac

ity

is

the

cost

of

a p

arti

tio

n

Max

-flo

w M

in-c

ut

Th

eore

m:T

he

max

imu

m f

low

bet

wee

n a

ny

pai

r o

f n

od

es =

the

min

imu

m c

ut

cap

acit

y o

f al

l cu

ts w

hic

h s

epar

ate

the

two

no

des

Co

mp

uti

ng

max

-flo

w t

hro

ug

h g

rap

h is

pro

bab

ly t

oo

exp

ensi

ve

Page 33: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

33

Tw

o-W

ay P

arti

tio

nin

g

(Ker

nig

han

& L

in)

�C

on

sid

er t

he

set

So

f 2n

vert

ices

, all

of

equ

al s

ize

for

no

w,

wit

h a

n a

sso

ciat

ed c

ost

mat

rix

�A

ssu

me

Cis

sym

met

ric

and

�W

e w

ant

to p

arti

tio

n S

into

tw

o s

ub

sets

Aan

d B

, eac

h w

ith

np

oin

ts, s

uch

th

at t

he

exte

rnal

co

st

is m

inim

ized

�S

tart

wit

h a

ny

arb

itra

ry p

arti

tio

n [

A,B

] o

f S

and

try

to

d

ecre

ase

the

init

ial c

ost

Tb

y a

seri

es o

f in

terc

han

ges

of

sub

sets

of

Aan

d B

�W

hen

no

fu

rth

er im

pro

vem

ent

is p

oss

ible

, th

e re

sult

ing

p

arti

tio

n [

A’,B

’] is

alo

cal m

inim

um

(an

d h

as s

om

e p

rob

abili

ty o

f b

ein

g a

glo

bal

min

imu

m w

ith

th

is s

chem

e)

�(B

e su

re t

o t

ake

a m

om

ent

to t

alk

abo

ut

loca

l an

d g

lob

al

min

ima)

Cc

ij

nij

==

(),

,,

,1

2L

ci

ii=

∀0

TC

ab

AB

=∑

×

Page 34: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

34

Ker

nig

han

& L

in:

Val

ue

of

a co

nfi

gu

rati

on

�F

or

each

vert

ex a

in p

arti

tio

n A

:

�ex

tern

al c

ost

(co

mp

ute

d t

he

sam

e fo

r E

b)

�in

tern

al c

ost

(c

om

pu

ted

th

e sa

me

for

Ib)

�F

or

each

ver

tex

z in

th

e se

t S

, th

e d

iffe

ren

ce (

D)

bet

wee

n e

xter

nal

(E

) an

d in

tern

al (

I) c

ost

s is

giv

en b

y:

aA

Ec

aa

yy

B

=∑ ∈

Ic

aa

xx

A

=∑ ∈

DE

Iz

Sz

zz

=−

∀∈

Page 35: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

35

Ker

nig

han

& L

in:

Val

ue

of

on

e sw

ap

�F

or

each

:

�ex

tern

al c

ost

(sam

e fo

r E

b)

�in

tern

al c

ost

(s

ame

for

Ib)

�If

a ∈ ∈∈∈

Α

Α

Α

Α a

nd

b ∈ ∈∈∈

Β

Β

Β

Β a

re in

terc

han

ged

, th

en t

he

gai

n:

�P

roo

f: If

Zis

th

e to

tal c

ost

of

con

nec

tio

ns

bet

wee

n p

arti

tio

ns

Aan

d B

, exc

lud

ing

ver

tice

s a

and

b, t

hen

:

aA

Ec

aa

yy

B

=∑ ∈

Ic

aa

xx

A

=∑ ∈

DE

Iz

Sz

zz

=−

∀∈

gD

Dc

ab

ab

=+

−2

TZ

EE

c

TZ

II

cg

ain

TT

DD

ca

ba

ba

b

ba

ab

ab

ab

ba

ab

ab

, ,,

,

=+

+−

=+

++

=

−=

+−

2

Page 36: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

36

Ker

nig

han

& L

in:

Ch

oo

sin

g s

wap

(1)

Co

mp

ute

all

Dva

lues

in S

(2)

Ch

oo

se a

i, b

isu

ch t

hat

is m

axim

ized

(3)

Set

aian

db

ias

ide

and

cal

l th

em a

i’an

d b

i’

(4)

Rec

alcu

late

th

e D

val

ues

fo

r al

l th

e el

emen

ts o

f

AB

a

b

ji

ji

ba

ba

ic

DD

g2

−+

=

Aa

Bb

ij

−−

{}

,{

}

DD

cc

xA

a

DD

cc

yB

b

xx

xa

xbi

yy

yb

yaj

ij

ji

' '

,{

}

,{

}

=+

−∈

=+

−∈

22

22

Page 37: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

37

Ker

nig

han

& L

in:

Par

titi

on

ing

Alg

ori

thm

Alg

ori

thm

KL

(G, g

rap

h o

f 2N

no

des

)

Init

ializ

e -

crea

te in

itia

l bi-

par

titi

on

into

A, B

each

of

N n

od

es

/* C

om

pu

te g

lob

al v

alu

e o

f in

div

idu

al s

wap

s o

f n

od

es *

/

Rep

eat

un

til n

o f

urt

her

imp

rove

men

t{

for

I = 1

to

N d

o{

fin

d p

air

of

un

lock

ed n

od

es a

iin

A a

nd

bi i

n B

wh

ose

exc

han

ge

lead

s to

larg

est

dec

reas

e o

r sm

alle

st in

crea

se in

co

st

cost

_i=

ch

ang

e in

co

st d

ue

to e

xch

ang

ing

ai

and

bi

lock

do

wn

ai

and

bi

so t

hey

do

n’t

par

tici

pat

e in

fu

ture

mo

ves

}

/* f

ind

wh

ich

seq

uen

ce o

f sw

aps

gav

e th

e b

est

resu

lt *

/

fin

d l

such

th

at s

um

of

cost

(1<=

l) is

max

imiz

ed

mo

ve a

i0<

=l f

rom

Ato

B

mo

ve b

i 0<

=l f

rom

Bto

A

}

Page 38: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

38

Tw

o-W

ay P

arti

tio

nin

g

(Ker

nig

han

& L

in)

�F

ind

po

int

(ex

chan

ge)

mat

wh

ich

cu

mu

lati

veg

ain

max

imiz

ed

�P

erfo

rm e

xch

ang

es 1

th

rou

gh

m

�W

hat

is t

he

tim

e an

d m

emo

ry c

om

ple

xity

of

this

alg

ori

thm

?

gk

k

i =∑1

i1

23

mn

Cum

ulat

ive

gain

Cum

ulat

ive

gain

Page 39: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

39

Ker

nig

han

-Lin

(K

L)

Exa

mp

le -

1K

ern

igh

an-L

in (

KL

) E

xam

ple

-1

a b c d

e f g h

0--

05

Ste

p N

o.

Vert

ex Pair

Gain

Cut-

cost

[©S

arr

afz

ad

eh

]

Page 40: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

40

Ker

nig

han

-Lin

(K

L)

Exa

mp

le -

2K

ern

igh

an-L

in (

KL

) E

xam

ple

-2

a b cd ddde

f

g gggh

0--

05

1{ d, g }

32

Ste

p N

o.

Vert

ex Pair

Gain

Cut-

cost

[©S

arr

afz

ad

eh

]

Page 41: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

41

Ker

nig

han

-Lin

(K

L)

Exa

mp

le -

3K

ern

igh

an-L

in (

KL

) E

xam

ple

-3

a

bc ccc

d ddde

f fff

g gggh

0--

05

1{ d, g }

32

2{ c, f

}1

1

Ste

p N

o.

Vert

ex Pair

Gain

Cut-

cost

[©S

arr

afz

ad

eh

]

Page 42: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

42

Ker

nig

han

-Lin

(K

L)

Exa

mp

le -

fin

ish

Ker

nig

han

-Lin

(K

L)

Exa

mp

le -

fin

ish

4{ a, e }

-2

5

0--

05

1{ d, g }

32

2{ c, f

}1

1

3{ b, h }

-2

3

Ste

p N

o.

Vert

ex Pair

Gain

Cut-

cost

[©S

arr

afz

ad

eh

]

a

bc ccc

d ddde

f fff

g gggh

Page 43: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

43

Tim

e C

om

ple

xity

of

K-L

Par

titi

on

ing

Tim

e C

om

ple

xity

of

K-L

Par

titi

on

ing

�A

pas

s is

a s

et o

f o

per

atio

ns

nee

ded

to

fin

d e

xch

ang

e se

ts

�In

itia

l dif

fere

nce

vec

tor

D c

om

pu

tati

on

is n

2

�U

pd

ate

of

D a

fter

lock

ing

a p

air

(w

e lo

ck d

ow

n o

ne

mo

re

each

pas

s)

�(n

-1)+

(n-2

)+…

+2+

1 � ���

n2

�D

om

inan

t ti

me

fact

or

–se

lect

ion

of

the

nex

t p

air

to

exch

ang

e

�N

eed

to

so

rt D

val

ues

�S

ort

ing

is n

*lo

g(n

)

�(n

)lo

g(n

)+(n

-1)l

og

(n-1

)+(n

-2)+

…+

2lo

g2 � ���

n2 l

og

n

�T

ota

l tim

e is

n2 lo

g n

�A

pas

s is

a s

et o

f o

per

atio

ns

nee

ded

to

fin

d e

xch

ang

e se

ts

�In

itia

l dif

fere

nce

vec

tor

D c

om

pu

tati

on

is n

2

�U

pd

ate

of

D a

fter

lock

ing

a p

air

(w

e lo

ck d

ow

n o

ne

mo

re

each

pas

s)

�(n

-1)+

(n-2

)+…

+2+

1 � ���

n2

�D

om

inan

t ti

me

fact

or

–se

lect

ion

of

the

nex

t p

air

to

exch

ang

e

�N

eed

to

so

rt D

val

ues

�S

ort

ing

is n

*lo

g(n

)

�(n

)lo

g(n

)+(n

-1)l

og

(n-1

)+(n

-2)+

…+

2lo

g2 � ���

n2 l

og

n

�T

ota

l tim

e is

n2 lo

g n

Page 44: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

44

Just

wh

at d

oes

par

titi

on

ing

do

?Ju

st w

hat

do

es p

arti

tio

nin

g d

o?

�R

edu

ces

the

pro

ble

m s

ize

enab

ling

a “

div

ide

and

con

qu

er”

app

roac

h t

o p

rob

lem

so

lvin

g

�N

atu

rally

evo

lves

th

e n

etlis

t to

war

d a

fu

ll p

lace

men

t

�R

edu

ces

the

pro

ble

m s

ize

enab

ling

a “

div

ide

and

con

qu

er”

app

roac

h t

o p

rob

lem

so

lvin

g

�N

atu

rally

evo

lves

th

e n

etlis

t to

war

d a

fu

ll p

lace

men

t

Page 45: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

Wh

ere

do

es p

arti

tio

nin

g f

it in

?W

her

e d

oes

par

titi

on

ing

fit

in?

Page 46: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

46

Par

titi

on

ing

Par

titi

on

ing

�In

GO

RD

IAN

, par

titi

on

ing

is u

sed

to

co

nst

rain

t th

e

mo

vem

ent

of

mo

du

les

rath

er t

han

red

uce

pro

ble

m s

ize

�B

y p

erfo

rmin

g p

arti

tio

nin

g, w

e ca

n it

erat

ivel

y im

po

se a

new

set

of

con

stra

ints

on

th

e g

lob

al o

pti

miz

atio

n p

rob

lem

�A

ssig

n m

od

ule

s to

a p

arti

cula

r b

lock

�P

arti

tio

nin

g is

det

erm

ined

by

�R

esu

lts

of

glo

bal

pla

cem

ent

�S

patia

l (x,

y) d

istr

ibut

ion

of m

odul

es

�P

arti

tio

nin

g c

ost

�W

ant a

min

-cut

par

titio

n

�In

GO

RD

IAN

, par

titi

on

ing

is u

sed

to

co

nst

rain

t th

e

mo

vem

ent

of

mo

du

les

rath

er t

han

red

uce

pro

ble

m s

ize

�B

y p

erfo

rmin

g p

arti

tio

nin

g, w

e ca

n it

erat

ivel

y im

po

se a

new

set

of

con

stra

ints

on

th

e g

lob

al o

pti

miz

atio

n p

rob

lem

�A

ssig

n m

od

ule

s to

a p

arti

cula

r b

lock

�P

arti

tio

nin

g is

det

erm

ined

by

�R

esu

lts

of

glo

bal

pla

cem

ent

�S

patia

l (x,

y) d

istr

ibut

ion

of m

odul

es

�P

arti

tio

nin

g c

ost

�W

ant a

min

-cut

par

titio

n

Page 47: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

47

Par

titi

on

ing

du

e to

Glo

bal

Op

tim

izat

ion

Par

titi

on

ing

du

e to

Glo

bal

Op

tim

izat

ion

�S

ort

th

e m

od

ule

s b

y th

eir

x co

ord

inat

e (f

or

a ve

rtic

al

cut)

�C

ho

ose

a c

ut

line

such

th

at

�S

ort

th

e m

od

ule

s b

y th

eir

x co

ord

inat

e (f

or

a ve

rtic

al

cut)

�C

ho

ose

a c

ut

line

such

th

at

→ →→→p

pp

MM

M,

'''

∈ ∈∈∈

∑ ∑∑∑∑ ∑∑∑

∈ ∈∈∈∈ ∈∈∈

≈ ≈≈≈= ===

∈ ∈∈∈≤ ≤≤≤

Mu

uM

uu

pp

uu

FF

Mu

Mu

xx

pp

α ααα0.5

'',

'

''''

''

''

Page 48: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

∈ ∈∈∈

Par

titi

on

ing

Imp

rove

men

t -

IP

arti

tio

nin

g Im

pro

vem

ent

-I

∑ ∑∑∑

∑ ∑∑∑∑ ∑∑∑

∈ ∈∈∈

∈ ∈∈∈∈ ∈∈∈

= ===

≈ ≈≈≈= ===

∈ ∈∈∈≤ ≤≤≤→ →→→

Nc

v

v

Mu

uM

uu

pp

uu

pp

p

C

FF

Mu

Mu

xx

MM

M

pp

wα ααα

α ααα

)(

:cu

t valu

e

0.5

'',

',

p

''

'''

'''

'''

0.0

0

.25

0.5

0.7

5

1

.0

0

40

30

20

10

Cp(α ααα

)

•T

he c

ost

of

init

ial p

art

itio

n m

ay b

e t

oo

hig

h

•C

an

ch

an

ge p

osit

ion

of

the c

ut

to r

ed

uce t

he c

ost

•P

lot

the c

ost

fun

cti

on

, ch

oo

se “

best”

po

sit

ion

Page 49: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

Lay

ou

t af

ter

Min

-cu

tL

ayo

ut

afte

r M

in-c

ut

No

w g

lob

al p

lacem

en

t p

rob

lem

will b

e s

olv

ed

ag

ain

w

ith

tw

o a

dd

itio

nal cen

ter_

of_

gra

vit

y c

on

str

ain

ts

Page 50: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

50

Th

ou

gh

ts o

n P

arti

tio

nin

gT

ho

ug

hts

on

Par

titi

on

ing

Sti

ll an

act

ive

area

of

rese

arch

�R

esu

lts

hig

hly

dep

end

ent

on

heu

rist

ic

imp

rove

men

ts a

nd

co

nte

xt

Par

titi

on

ing

is t

he

wo

rkh

ors

e o

f p

lace

men

t an

d

flo

orp

lan

nin

g

�A

s a

resu

lt p

arti

tio

nin

gs

mu

st b

e ve

ry f

ast

�A

lot

of

was

ted

aca

dem

ic e

ffo

rt o

n s

low

(b

ut

slig

htl

y b

ette

r) p

arti

tio

nin

g a

pp

roac

hes

K&

L, F

&M

hav

e ea

ch h

eld

up

ver

y w

ell

Sti

ll an

act

ive

area

of

rese

arch

�R

esu

lts

hig

hly

dep

end

ent

on

heu

rist

ic

imp

rove

men

ts a

nd

co

nte

xt

Par

titi

on

ing

is t

he

wo

rkh

ors

e o

f p

lace

men

t an

d

flo

orp

lan

nin

g

�A

s a

resu

lt p

arti

tio

nin

gs

mu

st b

e ve

ry f

ast

�A

lot

of

was

ted

aca

dem

ic e

ffo

rt o

n s

low

(b

ut

slig

htl

y b

ette

r) p

arti

tio

nin

g a

pp

roac

hes

K&

L, F

&M

hav

e ea

ch h

eld

up

ver

y w

ell

Page 51: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

51

Rev

iew

ing

ou

r G

ener

al P

roce

du

reR

evie

win

g o

ur

Gen

eral

Pro

ced

ure

�T

ake

a re

al w

orl

d p

rob

lem

–p

arti

tio

nin

g o

f n

etlis

ts

�C

ast

in a

mat

hem

atic

al a

bst

ract

ion

–th

is o

ften

req

uir

es

sim

plif

icat

ion

�Id

enti

fy c

ost

fu

nct

ion

to

be

op

tim

ized

�Id

enti

fy s

ize

of

sear

ch s

pac

e

�Is

glo

bal

op

tim

alit

y co

mp

uta

tio

nal

ly f

easi

ble

?

�Y

es –

go

to

it!

�N

o –

�Id

enti

fy h

euri

stic

s th

at a

pp

roxi

mat

e g

lob

al o

pti

mu

m

�S

imp

lify

pro

ble

m f

urt

her

an

d s

ee if

yo

u c

an a

chie

ve a

loca

l op

tim

um

in a

co

mp

uta

tio

nal

ly e

ffic

ien

t m

ann

er

�P

lug

bac

k in

th

e o

rig

inal

pro

ble

m a

nd

see

ho

w it

wo

rks

�T

ake

a re

al w

orl

d p

rob

lem

–p

arti

tio

nin

g o

f n

etlis

ts

�C

ast

in a

mat

hem

atic

al a

bst

ract

ion

–th

is o

ften

req

uir

es

sim

plif

icat

ion

�Id

enti

fy c

ost

fu

nct

ion

to

be

op

tim

ized

�Id

enti

fy s

ize

of

sear

ch s

pac

e

�Is

glo

bal

op

tim

alit

y co

mp

uta

tio

nal

ly f

easi

ble

?

�Y

es –

go

to

it!

�N

o –

�Id

enti

fy h

euri

stic

s th

at a

pp

roxi

mat

e g

lob

al o

pti

mu

m

�S

imp

lify

pro

ble

m f

urt

her

an

d s

ee if

yo

u c

an a

chie

ve a

loca

l op

tim

um

in a

co

mp

uta

tio

nal

ly e

ffic

ien

t m

ann

er

�P

lug

bac

k in

th

e o

rig

inal

pro

ble

m a

nd

see

ho

w it

wo

rks

Page 52: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

52

Bac

k in

th

e R

TL

Des

ign

Flo

w

RT

LS

yn

thesis

HD

L

netl

ist

log

ico

pti

miz

ati

on

netl

ist

Lib

rary

ph

ysic

al

desig

n

layo

ut

a b

s

q0 1

d

clk

a b

s

q0 1

d

clk

Mo

du

leG

en

era

tors

Man

ual

Desig

n

Page 53: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

53

Fo

r N

ext

Cla

ssF

or

Nex

t C

lass

�R

ead

th

e F

idu

ccia

& M

atth

eyse

sp

aper

�R

ead

th

e G

ord

ian

pap

er

�R

ead

th

e F

idu

ccia

& M

atth

eyse

sp

aper

�R

ead

th

e G

ord

ian

pap

er

Page 54: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

54

Ext

ra S

lides

Ext

ra S

lides

�S

imu

late

d a

nn

ealin

g

�F

idu

ccia

& M

atth

eyse

s

�S

imu

late

d a

nn

ealin

g

�F

idu

ccia

& M

atth

eyse

s

Page 55: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

55

Sim

ula

ted

An

nea

ling

Sim

ula

ted

An

nea

ling

�U

ses a

nalo

gy w

ith

meta

llu

rgic

al

an

nealin

g

�S

tart

wit

h a

ran

do

m in

itia

l p

art

itio

nin

g

�G

en

era

te a

new

part

itio

nin

g b

y e

xch

an

gin

g t

wo

ra

nd

om

ly c

ho

sen

co

mp

on

en

ts f

rom

part

1 a

nd

p

art

2

�C

om

pu

te t

he c

han

ge

in

sco

re:

�If

,

a lo

wer

en

erg

y s

tate

is f

ou

nd

, th

e m

ove i

s

acc

ep

ted

�If

, th

e m

ove i

s a

ccep

ted

wit

h p

rob

ab

ilit

y

, w

here

t is “

tem

pera

ture

�T

em

pera

ture

, t,

is s

low

ly r

ed

uc

ed

�H

elp

s a

vo

id lo

cal m

inim

a

�U

ses a

nalo

gy w

ith

meta

llu

rgic

al

an

nealin

g

�S

tart

wit

h a

ran

do

m in

itia

l p

art

itio

nin

g

�G

en

era

te a

new

part

itio

nin

g b

y e

xch

an

gin

g t

wo

ra

nd

om

ly c

ho

sen

co

mp

on

en

ts f

rom

part

1 a

nd

p

art

2

�C

om

pu

te t

he c

han

ge

in

sco

re:

�If

,

a lo

wer

en

erg

y s

tate

is f

ou

nd

, th

e m

ove i

s

acc

ep

ted

�If

, th

e m

ove i

s a

ccep

ted

wit

h p

rob

ab

ilit

y

, w

here

t is “

tem

pera

ture

�T

em

pera

ture

, t,

is s

low

ly r

ed

uc

ed

�H

elp

s a

vo

id lo

cal m

inim

a

s0

δ<

s0

δ≥

exp

(s

/t)

−δ

Page 56: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

56

Tw

o-W

ay P

arti

tio

nin

g

(Fid

ucc

ia&

Mat

they

ses)

�M

ove

on

e ce

ll at

a t

ime

fro

m o

ne

sid

e o

f th

e

par

titi

on

to

th

e o

ther

in a

n a

ttem

pt

to m

inim

ize

the

cuts

eto

f th

e fi

nal

par

titi

on

�b

ase

cell

--ce

ll to

be

mo

ved

�g

ain

g(i

)--

no

. of

net

s b

y w

hic

h t

he

cuts

etw

ou

ld

dec

reas

e if

cel

l i w

ere

mo

ved

fro

m p

arti

tio

n A

to p

arti

tio

n

B(m

ay b

e n

egat

ive)

�T

o p

reve

nt

thra

shin

g, o

nce

a c

ell i

s m

ove

d it

is

lock

ed f

or

an e

nti

re p

ass

�C

laim

is O

(n)

tim

e

Page 57: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

57

Tw

o-W

ay P

arti

tio

nin

g

(Fid

ucc

ia&

Mat

they

ses)

�S

tep

s:

(1)

Ch

oo

se a

cel

l

(2)

Mo

ve it

(3)

Up

dat

e th

e g

(i)’

s o

f th

e n

eig

hb

ors

Page 58: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

58

Tw

o-W

ay P

arti

tio

nin

g

(Fid

ucc

ia&

Mat

they

ses)

�If

p(i

)=

no

. of

pin

s o

n c

ell i

:

�B

in-s

ort

cel

ls o

n g

i

�T

ime

req

uir

ed t

o m

ain

tain

eac

h b

uck

et a

rray

O(P

)/p

ass

−<

<p

ig

pi

i(

)(

)

-pm

ax

pm

ax

MA

X_G

AIN

LO

CK

ED

_CE

LL

S

......

CE

LL

1 2

3C

Page 59: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

59

Tw

o-W

ay P

arti

tio

nin

g

(Fid

ucc

ia&

Mat

they

ses)

�M

ove

th

e C

ell

(1)

Fin

d t

he

firs

t ce

ll o

f h

igh

est

gai

n t

hat

is n

ot

lock

ed a

nd

su

ch t

hat

mo

vin

g it

wo

uld

no

t ca

use

an

imb

alan

ce

�B

reak

tie

by

cho

osi

ng

th

e o

ne

that

giv

es t

he

bes

t b

alan

ce

(2)

Ch

oo

se t

his

as

the

bas

e ce

ll. R

emo

ve it

fro

m t

he

bu

cket

list

and

pla

ce it

on

th

e L

OC

KE

D li

st. U

pd

ate

it t

o t

he

oth

er p

arti

tio

n.

�U

pd

atin

g C

ell G

ain

s

Cri

tica

l net

�G

iven

a p

arti

tio

n (

A|B

), w

e d

efin

e th

e d

istr

ibu

tio

n o

f n

as a

n

ord

ered

pai

r o

f in

teg

ers

(A(n

),B

(n))

, wh

ich

rep

rese

nts

th

e

nu

mb

er o

f ce

lls n

et n

has

in b

lock

s A

and

Bre

spec

tive

ly (

can

be

com

pu

ted

in O

(P)

tim

e fo

r al

l net

s)

Page 60: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

60

Tw

o-W

ay P

arti

tio

nin

g

(Fid

ucc

ia&

Mat

they

ses)

�N

et is

cri

tica

lif

ther

e ex

ists

a c

ell o

n it

su

ch t

hat

if it

w

ere

mo

ved

it w

ou

ld c

han

ge

the

net

’s c

ut

stat

e(w

het

her

it is

cu

t o

r n

ot)

.

�N

et is

cri

tica

l if

A(n

)=0,

1o

r B

(n)=

0,1

�G

ain

of

cell

dep

end

s o

nly

on

its

crit

ical

net

s:�

If a

net

is n

ot

crit

ical

, its

cu

tsta

teca

nn

ot

be

affe

cted

by

the

mo

ve

�A

net

wh

ich

is n

ot

crit

ical

eit

her

bef

ore

or

afte

r a

mo

ve

can

no

t in

flu

ence

th

e g

ain

s o

f it

s ce

lls

�T

his

is t

he

bas

is o

f th

e lin

ear-

tim

e cl

aim

Page 61: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

61

Tw

o-W

ay P

arti

tio

nin

g

(Fid

ucc

ia&

Mat

they

ses)

�L

et F

be

the

fro

mp

arti

tio

n o

f ce

ll ia

nd

Tth

e to

par

titi

on

�g

(i)

= F

S(i

) -

TE

(i),

wh

ere:

�F

S(i

) =

no

. of

net

s w

hic

h h

ave

cell

ias

thei

r o

nly

Fce

ll

�T

E(i

)=

no

. of

net

s w

hic

h c

on

tain

ian

d h

ave

an e

mp

ty T

sid

e

Fi

ba

T

FS

(i)

TE

(i)

Page 62: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

62

Tw

o-W

ay P

arti

tio

nin

g

(Fid

ucc

ia&

Mat

they

ses)

�C

om

pu

te t

he

init

ial g

ain

s o

f al

l un

lock

ed c

ells

:fo

reach

(fre

ecell i)

{

g(i

) =

0;

F =

th

e “

fro

m”

part

itio

n o

f cell i;

T =

th

e “

to”

part

itio

n o

f cell i;

fore

ach

(net

n o

n c

ell i)

{

if(F

(n)

= 1

) g

(i)+

+;

if(T

(n)

= 0

) g

(i)-

-;

}

}

�R

equ

ires

O(P

) w

ork

to

inti

aliz

e

�n

et is

cri

tica

l bef

ore

th

e m

ove

iff

F(n

)=1

or

T(n

)=0

or

T(n

) =

1

�F

(n)

=0

do

es n

ot

occ

ur

bec

ause

bas

e ce

ll o

n F

sid

e b

efo

re

�n

et is

cri

tica

l aft

er t

he

mo

ve if

fT

(n)=

1 o

r F

(n)=

0 o

r F

(n)=

1

�T

(n)

=0

do

es n

ot

occ

ur

bec

ause

bas

e ce

ll o

n T

sid

e af

ter

Page 63: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

63

Tw

o-W

ay P

arti

tio

nin

g

(Fid

ucc

ia&

Mat

they

ses)

�M

ain

loo

p:

lock b

ase c

ell;

fore

ach

(net

n o

n b

ase c

ell)

{

if(T

(n)

==

0)

incre

men

t g

ain

s o

f all f

ree c

ells o

n n

et

n;

els

e if(

T(n

) =

= 1

) d

ecre

men

t g

ain

s o

f th

e T

cell o

n n

et

n

if it

is f

ree;

F(n

)--;

T(n

)++

;

/* c

heck c

riti

cal n

ets

aft

er

the m

ove *

/

if(F

(n)=

= 0

) d

ecre

men

t g

ain

s o

f all f

ree c

ells o

n n

et

n;

els

e if(

F(n

) =

= 1

) in

cre

men

t g

ain

of

the o

nly

F c

ell o

n

net

n if

it is f

ree;

}

�T

ime

com

ple

xity

O(n

log

(n))

?

Page 64: Partitioning for Physical Design Prof. A. R. Newton …Partitioning for Physical Design Prof. A. R. Newton Prof. K. Keutzer Michael Orshansky EECS University of California Berkeley,

EE

244

64

Ker

nig

han

-Lin

(K

L)

Exa

mp

le -

fin

ish

Ker

nig

han

-Lin

(K

L)

Exa

mp

le -

fin

ish

a b c d

e f g h

4{ a, e }

-2

5

0--

05

1{ d, g }

32

2{ c, f

}1

1

3{ b, h }

-2

3

Ste

p N

o.

Vert

ex Pair

Gain

Cut-

cost

[©S

arr

afz

ad

eh

]


Recommended