gordian placement tool: quadratic and linear problem formulation ryan speelman jason gordon steven...

35
Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Upload: lee-wheeler

Post on 01-Jan-2016

222 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Gordian Placement Tool: Quadratic and Linear Problem

Formulation

Ryan SpeelmanJason Gordon

Steven ButtEE 201A 5-6-04

Page 2: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Papers Covered

• Kleinhaus, G. Sigl, F. Johannes, K. Antreich, "GORDIAN: VLSI Placement by Quadratic Programming and Slicing Optimization", IEEE Trans. on CAD, pp 356-365, 1991.

• G. Sigl, K. Doll and F.M. Johannes, "Analytical placement: A Linear or Quadratic Objective Function?", Proc. DAC, pp 427-432, 1991.

Page 3: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Placement

• Place modules or datapaths of the chip in a proper order so as to reduce wire length and complexity, and to reduce area

• Previous Placement Studies– Min-cut graph partitioning (divide and conquer)

• Iterative improvement of an initial partition• Need a good starting partition to achieve good results

– Force analogy to wire length• Restricts the simultaneous optimization to the initial step

• All partitioning based methods have the potential drawback of being stuck in a local optimum

Page 4: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Gordian Tool

• Global Optimization and Rectangle Dissection• Use Global Optimization at all steps • Start with placing all modules inside the chip

area• Use slicing partitioning to break up groups of

modules while following global optimization rules• When groups have been broken up into groups

of less than k modules, place modules within their sliced area

Page 5: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Example PlacementChip Area

1 2

4

3

5 6

7 8

9

11

10

12

K = 3

x

x

Center ofGravity

Page 6: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Example PlacementChip Area

1

2

4

3

56

7

8

9

11

10

12

K = 3

x

Center ofGravity

x x

Page 7: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Example PlacementChip Area

1

2

4

3

5

6

7

8

9

11

10

12

K = 3

x

Center ofGravity

x

x

x

Page 8: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Example PlacementChip Area

1

2

4

3

56

7 8

9

11

10

12

K = 3

x

Center ofGravity

x

xx

x

Page 9: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Example PlacementChip Area

1

2

4 3

5

6

7 8

9

11

10

12

K = 3

x

Center ofGravity

x

x x

x

Page 10: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Quadratic Problem Formulation

• Find approximate positions for blocks.• Try to minimize the sum of squared wire length.• Sum of squared wire length is quadratic in the

cell coordinates.• The global optimization problem is formulated as

a quadratic program.• It can be proved that the quadratic program is

convex, and as such, can be solved in polynomial time

Page 11: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Quadratic Problem Formulation

ectorsSolution v, cell and cellbetween net theofWeight

cell ofcenter theof sCoordinateLet

yxjiw

i),y(x

ij

ii

ectorsSolution v, cell and cellbetween net theofWeight

cell ofcenter theof sCoordinateLet

yxjiw

i),y(x

ij

ii

22 )()(2

1 cell and cellbetween net theofCost

jijiij yyxxw

ji

22 )()(2

1 cell and cellbetween net theofCost

jijiij yyxxw

ji

const2

1

2

1cost Total yyyxxx T

yTT

xT dQdQ const

2

1

2

1cost Total yyyxxx T

yTT

xT dQdQ

Constants in the total cost equation are derivedFrom information about chip constraints such asFixed modules

Page 12: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

• Look closer at the one-dimensional problem– Cost = ½ xTCx + dTx

• At the ith level of optimization, the placement area is divided up into at most q ≤ 2i regions

• The centers of these regions impose constraints on the global placement of the modules

• A(i)x = u(i)

• The entries of the matrix A are all 0 except for one nonzero entry corresponding to the region that a given module belongs to

Quadratic Problem Formulation

Page 13: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Quadratic Problem Formulation

• Combine the objective function and the linear constraints to obtain the linearly constrained quadratic programming problem (LQP)

• Since the terms of this function defince a convex subspace of the solution space, it has a unique global minimum (x*)

Page 14: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Partitioning• Gordian does not use partitioning to reduce the

problem size, but to restrict the freedom of movement of the modules

• Decisions in the partitioning steps place modules close to their final positions, so good partitioning is crucial

• Decisions are made based on global placement constraints, but also need to take into account the number of nets crossing the new cut line

Fp, Fp’ are new partition areasAlpha is the area ratio, usually 0.5

Cp is the sum of the weightsOf the nets that cross the partition

Page 15: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Improving Partitioning• Variation of cut direction and position

– Going through a sorted list of module coordinates, you can calculate Cp for every value of α by drawing the partition line after each module in sequence

• Module Interchange– Take a small set of modules in the partition and apply

a min-cut approach• Repartitioning

– In the beginning steps of global optimization, modules are usually clustered around the centers of their regions

– If regions are cut near the center, placing a module on either side of the region could be fairly arbitrary

– Apply a heuristic, if two modules overlap near a cut then they are merged into one of the regions

Page 16: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Final Placement

• A final placement is the last, but possibly most important, step in the GORDIAN Algorithm

• After the main body of the GORDIAN algorithm finishes, which is the alternating global optimization and partitioning steps, each of the blocks containing k or less modules needs to be optimized.

• For the Standard Cell Design the modules are collected in rows, for the macro-cell design an area optimization is performed, packing the modules in a compact slicing structure.

Page 17: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Standard Cell Final Placement• In Standard Cell Designs the Modules are approximately the same

height but can vary drastically in width.• The region area is determined by the widths of the channels

between the rows and by the lengths of the rows.• The goal is to obtain narrow widths between rows by having equally

distributed low wiring density and rows with equal length.• To create rows of about equal length is necessary to have a low area

design. This is done by estimating the number of feed-throughs in each row and making rows with large feed-throughs shorter than average to allow for the feed-through blocks that will be needed. In the end the row lengths should not vary from the average by more than 1-5%

• A final row length optimization is created by interchanging select modules in nearby rows who have y-coordinates close to the cut-line

Page 18: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Macro-cell and Sea-of-Gates Final Placement

• We are now dealing with modules which have random widths and lengths. In this situation and Exhaustive Slicing Optimization (ESO) is performed.

• Using this method with a standard min-cut or clustering algorithm means that every possible slicing of the k modules needs to be checked. This blows up for large k and thus the algorithms usually restricted k to 5 or less.

• However, in the GORDIAN algorithm, rough module coordinates have been specified previous to this final stage. These coordinates provide extra criterion and thus for GORDIAN, k can be as high as 35 with reasonable run times.

Page 19: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Macro-cell and Sea-of-Gates Final Placement

• Higher values of k result in more shapes within the placement area. With growing k the area utilization increases and approaches the boundary hyperbola.

Page 20: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Macro-cell and Sea-of-Gates Final Placement

• It is not a good idea to make k as large as possible.• The Authors claim to have experimented with large

values of k and report worse performance, in terms of wire length, due to early termination of the global optimization and partitioning loop.

• Their suggestion is to make k as low as possible where a good area utilization still occurs. In other words continue to increase k only as long as you are getting serious improvement in area.

Page 21: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Area Results of GORDIAN vs. Simulated Annealing and min-cut methods

Page 22: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Area Results of GORDIAN vs. Simulated Annealing and min-cut methods

• For small circuits, the simulated annealing method performs the best from an area standpoint.

• For blocks with more than 1000 or so cells and nets, GORDIAN begins to outperform.

• As the Circuit size continues to increase the GORDIAN algorithm begins winning by a large amount.

• The reason simulated annealing does not perform well for large circuits is because CPU-time becomes worse and worse, thus a faster cooling schedule is employed, which yields a suboptimal result.

Page 23: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Area Results of GORDIAN vs. min-cut methods

Page 24: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Linear or Quadratic Objective Function?

- Gordian used a quadratic objective function as the cost function in the global optimization step

- Is a linear objective function better?

- What are the tradeoffs for each?

- What are the results of using a linear objective function compared with using a quadratic one?

Page 25: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Comparison of Linear and Quadratic Objective Function

- Minimization of the quadratic objective function tends to make very long nets

-Minimization of the linear objective function results in shorter nets overall

Page 26: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Comparison cont’d

- Quadratic objective function leads to more routing in this standard cell circuit example

- This observation is the motivation to explore linear objective functions in further detail for placement

Page 27: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

GordianL

• Retains the basic strategy of the Gordian algorithm by alternating global placement and partitioning steps

• Modifications include the objective function for global placement and the partitioning strategy

- Linear objective function- Iterative partitioning

Page 28: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Model for the Linear Objective Function

- All modules connected by net v are in the set Mv

- The pin coordinates are- The module center coordinates are with the relative pin coordinates being

- The coordinates of the net nodes are always in the center of their connected pins, meaning

Page 29: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Linear Objective Function

Quadratic objective function

Linear objective function

- Quadratic objective functions have been used in the past because they are continuously differentiable and therefore easy to minimize by solving a linear equation system.

- Linear objective functions have been minimized by linear programming with a large number of constraints - This is much more expensive in terms of computation time - An adjustment to the function needs to be made

Page 30: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Quadratic Programming for the Linear Objective Function

- We can rewrite the objective function as:

with

- Through experimentation the area after final routing is better if the factor is replaced by a net specific factor

Page 31: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Quadratic Programming cont’d-The advantages of this approach are: 1. The summation reduces the influence of nets with many connected modules and emphasizes the majority of nets connecting only two or three modules. 2. The force on modules close to the net node is reduced since

- To solve the problem an iterative solution method is constructed with iteration count k for the modified objective

The quadratic programming problemcan now be solved by a conjugategradient method with preconditioningby incomplete Cholesky factorization

Page 32: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Iterative Partitioning

- Modules in a region are bipartitioned iteratively instead of in one step

- Module set is partitioned into such that

and

- Also, to distribute the models better over the whole placement area, positioning constraints fix the center of gravity of modules in the set on the center coordinate of the region , i.e.

Page 33: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Iterative Partitioning

- The modified iterative partitioning forces the modules more and more away from the center of the region

The second iteration step partitions the set into the sets

The iterative process finishes when the set becomes empty.The number of modules assigned to the sets and is determined by the area constraint

Page 34: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Results

Page 35: Gordian Placement Tool: Quadratic and Linear Problem Formulation Ryan Speelman Jason Gordon Steven Butt EE 201A 5-6-04

Conclusion

- Gordian algorithm does well with large amounts of modules - Global optimization combined with partitioning schemes

- Simulated Annealing is better for smaller amounts of modules

- The choice of the objective function is crucial to an analytical placement method.

- GordianL yields area improvements of up to 20% after final routing.

-The main reason for this improvement was the length reduction of nets connecting only two and three pins.