Analytic Placement. Layout Project: Sending the RTL file: −Thursday, 27 Farvardin Final...

30
Analytic Placement

Transcript of Analytic Placement. Layout Project: Sending the RTL file: −Thursday, 27 Farvardin Final...

Analytic Placement

• Layout Project:Sending the RTL file:

− Thursday, 27 Farvardin

Final deadline:− Tuesday, 22 Ordibehesht

New Project:− Soon

2

Analytic Placement

• Analytic placement:Minimizes an objective function using a

mathematical techniqueExamples:

− Numerical methods− Linear programming

Often requires assumptions like:− Differentiable obj. func.− Dimensionless objects

3

Analytic Placement• Quadratic placement:

Cost function:− to facilitate the calculation of partial derivatives

4

n

jijijiij yyxxcPL

1,

22

2

1)(

n: total number of cells

c(i,j): connectivity between cells i and j

Squared Euclidean distanceOnly two-point-connections

Analytic Placement

Each dimension can be considered independently:

5

2

1,1

)(),()( ji

n

jix xxjicPL

2

1,1

)(),()( ji

n

jiy yyjicPL

Analytic Placement

6

Placement problem converted to “convex quadratic optimization problem”

Convexity local minimum = global minimum

7

Analytic Placement – Quadratic Placement

System of linear equations Iterative numerical methods find a solution

− Conjugate gradient (CG)− Successive over-relaxation (SOR)

2

1,1

)(),()( ji

n

jix xxjicPL

2

1,1

)(),()( ji

n

jiy yyjicPL

0)(

x

x bAXX

PL0

)(

y

y bAYY

PL

Analytic Placement – Quadratic Placement

A[i][j] = -c(i,j) when i ≠ j,

A[i][i] = the sum of incident connection weights of cell i

X = vector of all the x-coordinates of the non-fixed cells

bx[i] = the sum of x-coordinates of all fixed cells attached to i

Y = vector of all the y-coordinates of the non-fixed cells

by[i] = the sum of y-coordinates of all fixed cells attached to i

8

0)(

x

x bAXX

PL0

)(

y

y bAYY

PL

Formulation in Vector Notation

AXX

xxcn

i

n

jjiij

T

1 1

2)(2

1Function Cost Then,

C.D

xCD

A

cd

x

x

x

ccc

ccc

ccc

d

d

d

n

jiji

nnnnn

n

n

n

where

0

0Let

1

2

1

21

22221

11211

2

1

9

Quadratic Placement: Example

• Given: Fixed blocks:

p1 (100,175)

p2 (200,225)

Free blocks:a, b, c

nets N1-N4.− N1 (P1,a)− N2 (a,b)− N3 (b,c)− N4 (c,P2)

• Task:Find (xa, ya), (xb, yb) and (xc, yc).

10

Quadratic Placement: Example• Solution for x-coordinates:

11

AX = bx

Quadratic Placement: Example

Solve for X:

12

Quadratic Placement: Example• Solution for y-coordinates:

13

AY = by

Quadratic Placement: Example

Solve for Y:

14

May need detailed placement and legalization

15

• Second stage of quadratic placers: Cells are spread out to remove overlaps

• Methods: Adding fake nets that pull cells away from dense regions toward

anchors Geometric sorting and scaling Repulsion forces, etc.

Quadratic Placement

Quadratic Placement• Advantages:

Captures the placement problem concisely in mathematical terms

Leverages efficient algorithms from numerical analysis and available software

Can be applied to large circuits without netlist clustering (flat)

Stability: small changes in the input do not lead to large changes in the output

• Disadvantages:Connections to fixed objects are necessary: I/O

pads, pins of fixed macros, etc.

16

GORDIAN

• Global Optimization and Rectangle Dissection• A Min-Cut Placement tool:

Places the cells by performing global optimization

− Formulated as a quadratic program

Uses FM to improve partitioning

17

Partitioning

Finds a good cut direction and position

Improves the cut value using FM

18

Before the next level of partitioning, does the global optimization with additional constraints

− the center of gravity of each partition is at the center of the region.

Always solves a single QP, i.e., global

Applying the Idea Recursively

Center of Gravity

19

Force-Directed Placement

20

Force-Directed Placement

• Reducing the placement problem to solving a set of simultaneous linear equations to determine equilibrium locations for cells.

• Analogy to Hooke's law:

• F = kd,

• F: force, k: spring constant, d: distance

• Goal: Map cells to the layout surface.

21

Zero-Force Target Location

• Cell i connects to several cells j's at distances dij's by wires of weights wij's.

• Total force: Fi = j wijdij

• The zero-force target (ZFT) locations (xo,yo ):

jij

jij

i w

xwx

oj

jij

jij

i w

ywy

oj

j

ij

oi

oj xxw 0)(

j

ij

oi

oj yyw 0)(

22

Zero-Force Target Location

1083.133108

230321008

oix

25.1 oiy

23

Force-Directed Placement

24

Can be iterative:

Force-Directed Placement

25

Constructive

Iterative

26

• Advantages: Conceptually simple, easy to implement Primarily intended for global placement, but can also be

adapted to detailed placement

• Disadvantages: Does not scale to large placement instances Is not very effective in spreading cells in densest regions Poor trade-off between solution quality and runtime In practice, FDP is extended by specialized techniques for

cell spreading

Force-Directed Placement

Branch and Bound Technique

27

Branch and Bound Method

• Select a valid solution: Branch.

• Stop searching a branch if

the cost so far > the previously searched branches: Bound (pruning the decision tree).

28

Branch and Bound Method• Gate array placement:

• Given a netlist,

map blocks {B1, B2, B3} slots {S1, S2, S3}.

B1-S1 B1-S2 B1-S3

B2-S2 B2-S3 B2-S1 B2-S3

B3-S370

4035

B3-S2

65

78Tree pruning

B3-S3

44

29

Branch and Bound Method

30