Linear Constraint Graph for Floorplan Optimization with Soft Blocks

Report 3 Downloads 47 Views
Linear Constraint Graph for Floorplan Optimization with Soft Blocks Jia Wang Dept. of ECE Illinois Institute of Technology Chicago, Illinois, United States

Hai Zhou Dept. of EECS Northwestern University Evanston, Illinois, United States

November, 2008

1 / 30

Outline

Overview of Floorplanning Linear Constraint Graph The LCG Floorplanner Experimental Results Conclusions

2 / 30

Floorplanning

I

Determine the locations and shapes of modules I I

I

Constructive approaches: fast I

I

Various objectives: area, interconnect, voltage island, etc. Various constraints: soft blocks, abutment, etc. Usually limited to area and interconnect optimization

Simulated annealing (SA): flexible I I

Use a floorplan representation to explore different floorplans Manage objectives through a cost function

3 / 30

Floorplanning

I

Determine the locations and shapes of modules I I

I

Constructive approaches: fast I

I

Various objectives: area, interconnect, voltage island, etc. Various constraints: soft blocks, abutment, etc. Usually limited to area and interconnect optimization

Simulated annealing (SA): flexible I I

Use a floorplan representation to explore different floorplans Manage objectives through a cost function

3 / 30

Floorplanning

I

Determine the locations and shapes of modules I I

I

Constructive approaches: fast I

I

Various objectives: area, interconnect, voltage island, etc. Various constraints: soft blocks, abutment, etc. Usually limited to area and interconnect optimization

Simulated annealing (SA): flexible I I

Use a floorplan representation to explore different floorplans Manage objectives through a cost function

3 / 30

Floorplan Exploration

I

To explore all non-overlapping floorplans. How? I I

I

I

Generate a floorplan topology (in some representation) in SA Map from the floorplan topology to physical floorplans

Packing: area minimized physical floorplans only, when module sizes are known Constraint graph + mathematical programming: all possible physical floorplans I I I I

Soft blocks [Young et al. 2001], [Lin et al. 2006], [Lee et al. 2007] Placement constraints [Young et al. 2004] Wire length [Tang et al. 2006] Complexity of constraint graphs matters

4 / 30

Floorplan Exploration

I

To explore all non-overlapping floorplans. How? I I

I

I

Generate a floorplan topology (in some representation) in SA Map from the floorplan topology to physical floorplans

Packing: area minimized physical floorplans only, when module sizes are known Constraint graph + mathematical programming: all possible physical floorplans I I I I

Soft blocks [Young et al. 2001], [Lin et al. 2006], [Lee et al. 2007] Placement constraints [Young et al. 2004] Wire length [Tang et al. 2006] Complexity of constraint graphs matters

4 / 30

Floorplan Exploration

I

To explore all non-overlapping floorplans. How? I I

I

I

Generate a floorplan topology (in some representation) in SA Map from the floorplan topology to physical floorplans

Packing: area minimized physical floorplans only, when module sizes are known Constraint graph + mathematical programming: all possible physical floorplans I I I I

Soft blocks [Young et al. 2001], [Lin et al. 2006], [Lee et al. 2007] Placement constraints [Young et al. 2004] Wire length [Tang et al. 2006] Complexity of constraint graphs matters

4 / 30

Floorplan Exploration

I

To explore all non-overlapping floorplans. How? I I

I

I

Generate a floorplan topology (in some representation) in SA Map from the floorplan topology to physical floorplans

Packing: area minimized physical floorplans only, when module sizes are known Constraint graph + mathematical programming: all possible physical floorplans I I I I

Soft blocks [Young et al. 2001], [Lin et al. 2006], [Lee et al. 2007] Placement constraints [Young et al. 2004] Wire length [Tang et al. 2006] Complexity of constraint graphs matters

4 / 30

Constraint Graph Basics

I

Horizontal graph: left-to relations

I

Vertical graph: below relations

I

At least one relation between any pair of modules 5 / 30

Constraint Graph Basics

I

Horizontal graph: left-to relations

I

Vertical graph: below relations

I

At least one relation between any pair of modules 5 / 30

Constraint Graph Basics

I

Horizontal graph: left-to relations

I

Vertical graph: below relations

I

At least one relation between any pair of modules 5 / 30

Redundancy in Constraint Graph

I

Transitive edges: relations implied by others

I

Over-specification: more than one relation between two modules 6 / 30

Redundancy in Constraint Graph

I

Transitive edges: relations implied by others

I

Over-specification: more than one relation between two modules 6 / 30

Ad-Hoc Approaches for Constraint Graph Generation

I

From polar graphs ([Ohtsuki et al. 1970]) I I

I

There is no method to explore them in SA Apply to mosaic floorplans only

From sequence-pairs ([Murata et al. 1996]) I I I I

Relatively straightforward and widely used in previous works No over-specification. Transitive edges can be removed Worst-case complexity: Θ(n2 ) edges O(n log n) edges on average [Lin 2002]

7 / 30

Ad-Hoc Approaches for Constraint Graph Generation

I

From polar graphs ([Ohtsuki et al. 1970]) I I

I

There is no method to explore them in SA Apply to mosaic floorplans only

From sequence-pairs ([Murata et al. 1996]) I I I I

Relatively straightforward and widely used in previous works No over-specification. Transitive edges can be removed Worst-case complexity: Θ(n2 ) edges O(n log n) edges on average [Lin 2002]

7 / 30

Constraint Graphs as Floorplan Representation

I

TCG – Transitive Closure Graph ([Lin et al. 2001]) I I I

I

Keep pair-wise relations including transitive edges No over-specification Always Θ(n2 ) edges

ACG – Adjacent Constraint Graph ([Zhou et al. 2004]) I I

Intentionally reduce complexity Forbid transitive edges, over-specification, and “crosses” I

I

Cross: a structure that may result in Θ(n2 ) edges 3

Complexity: at most O(n 2 ) edges [Wang 2005]

8 / 30

Constraint Graphs as Floorplan Representation

I

TCG – Transitive Closure Graph ([Lin et al. 2001]) I I I

I

Keep pair-wise relations including transitive edges No over-specification Always Θ(n2 ) edges

ACG – Adjacent Constraint Graph ([Zhou et al. 2004]) I I

Intentionally reduce complexity Forbid transitive edges, over-specification, and “crosses” I

I

Cross: a structure that may result in Θ(n2 ) edges 3

Complexity: at most O(n 2 ) edges [Wang 2005]

8 / 30

Our Contribution: Linear Constraint Graph

I

A general floorplan representation based on constraint graphs

I

At most 2n + 3 vertices and 6n + 2 edges for n modules

I

Intuitively combine the ideas of polar graphs and ACGs

I

One application: floorplan optimization with soft blocks

9 / 30

Outline

Overview of Floorplanning Linear Constraint Graph The LCG Floorplanner Experimental Results Conclusions

10 / 30

Cross Avoidance

I I

Crosses may result in Θ(n2 ) edges Use alternative relations as proposed by ACG I

I

However, still have complicated patterns/relations

Use a “bar” similar to polar graphs I I

Require a dummy vertex in the graph Need a systematic approach!

11 / 30

Cross Avoidance

I I

Crosses may result in Θ(n2 ) edges Use alternative relations as proposed by ACG I

I

However, still have complicated patterns/relations

Use a “bar” similar to polar graphs I I

Require a dummy vertex in the graph Need a systematic approach!

11 / 30

Cross Avoidance

I I

Crosses may result in Θ(n2 ) edges Use alternative relations as proposed by ACG I

I

However, still have complicated patterns/relations

Use a “bar” similar to polar graphs I I

Require a dummy vertex in the graph Need a systematic approach!

11 / 30

Intuitions for Linear Constraint Graph (LCG)

I

Avoid horizontal crosses: use alternative relations as ACGs

I

Avoid vertical crosses: use horizontal bars as polar graphs

I

Introduce dummy vertices to constraint graphs to reduce number of edges

12 / 30

From Floorplan to LCG

I I

A floorplan with non-overlapping modules Construct LCG by adding modules from bottom to top I I

Horizontal graph: planar, w/o transitive edge Vertical graph: separate modules not separated horizontally 13 / 30

From Floorplan to LCG

I I

Boundary: sh , th , sv , tv Top modules: a I

Only need to check modules on the top for insertion since modules are inserted from bottom to top 13 / 30

From Floorplan to LCG

I

Insert e between a and th I

I

Break a → th into a → e and e → th

Top modules: a → e

13 / 30

From Floorplan to LCG

I

Insert g between e and th I

I

Break e → th into e → g and g → th

Top modules: a → e → g

13 / 30

From Floorplan to LCG

I

Insert d between sh and e I I

I

Add one bar w on top of a Insert sh → d and d → e

Top modules: d → e → g 13 / 30

From Floorplan to LCG

I

Insert b between sh and d I

I

Break sh → d into sh → b and b → d

Top modules: b → d → e → g

13 / 30

From Floorplan to LCG

I

Insert i between e and th I I

I

Add one bar x on top of g Insert e → i and i → th

Top modules: b → d → e → i 13 / 30

From Floorplan to LCG

I

Insert c between sh and d I I

I

Add one bar y on top of b Insert sh → c and c → d

Top modules: c → d → e → i 13 / 30

From Floorplan to LCG

I

Insert f between c and i I I

I

Add one bar z on top of d, e, x, y Insert c → f and f → i

Top modules: c → f → i 13 / 30

From Floorplan to LCG

I

Insert h between f and i I

I

Break f → i into f → h and h → i

Top modules: c → f → h → i

13 / 30

Horizontal Relations in LCG

I

Observation: for each new module, we either I I

I

Break a horizontal edge into two Insert two horizontal edges and a horizontal bar

Horizontal Adjacency Graph (HAG) I I I

Each edge connects two modules adjacent to each other n + 2 vertices, at most 2n edges, at most n − 1 bars Planar – faces correspond to horizontal bars

14 / 30

Horizontal Relations in LCG

I

Observation: for each new module, we either I I

I

Break a horizontal edge into two Insert two horizontal edges and a horizontal bar

Horizontal Adjacency Graph (HAG) I I I

Each edge connects two modules adjacent to each other n + 2 vertices, at most 2n edges, at most n − 1 bars Planar – faces correspond to horizontal bars

14 / 30

Above and Below Paths

I

Each face of HAG is surrounded by two paths: the above path and the below path. I I I

I

The left/right-most modules are the same Other modules on the above path are above the bar Other modules on the below path are below the bar

The length of each path is at least 2 I

Otherwise there is a transitive edge

15 / 30

Above and Below Paths

I

Each face of HAG is surrounded by two paths: the above path and the below path. I I I

I

The left/right-most modules are the same Other modules on the above path are above the bar Other modules on the below path are below the bar

The length of each path is at least 2 I

Otherwise there is a transitive edge

15 / 30

Vertical Relations in LCG

I

Implied by HAG I I I I

I

Separate modules not separated horizontally From a bar to a module, a module to a bar, or a bar to a bar Each module connects to 2 bars: above and below Each bar connects to at most 4 bars

Vertical cOmpanion Graph (VOG) I I

At most n − 1 bars At most 2n + 3 vertices, at most 4n + 2 edges

16 / 30

Vertical Relations in LCG

I

Implied by HAG I I I I

I

Separate modules not separated horizontally From a bar to a module, a module to a bar, or a bar to a bar Each module connects to 2 bars: above and below Each bar connects to at most 4 bars

Vertical cOmpanion Graph (VOG) I I

At most n − 1 bars At most 2n + 3 vertices, at most 4n + 2 edges

16 / 30

Linear Constraint Graph

I

Combine HAG and VOG into a constraint graph

I

At most 2n + 3 vertices and 6n + 2 edges

I

Can represent any non-overlapping floorplan

17 / 30

Outline

Overview of Floorplanning Linear Constraint Graph The LCG Floorplanner Experimental Results Conclusions

18 / 30

Perturbations of LCG

I

The planar HAG allows relatively easy perturbations I

I

I I I

I

Update VOG accordingly

Three perturbations with O(n) complexity Exchange two modules: no change in topology insertH: change vertical relation to horizontal removeH: change horizontal relation to vertical

The perturbations are complete I

Any LCG can be converted to any other LCG by at most 3n perturbations

19 / 30

Perturbations of LCG

I

The planar HAG allows relatively easy perturbations I

I

I I I

I

Update VOG accordingly

Three perturbations with O(n) complexity Exchange two modules: no change in topology insertH: change vertical relation to horizontal removeH: change horizontal relation to vertical

The perturbations are complete I

Any LCG can be converted to any other LCG by at most 3n perturbations

19 / 30

Perturbations of LCG

I

The planar HAG allows relatively easy perturbations I

I

I I I

I

Update VOG accordingly

Three perturbations with O(n) complexity Exchange two modules: no change in topology insertH: change vertical relation to horizontal removeH: change horizontal relation to vertical

The perturbations are complete I

Any LCG can be converted to any other LCG by at most 3n perturbations

19 / 30

The insertH Operation

I I

Insert b → a Remove transitive edges I I

Remove c → a if c starts the above path Remove b → d if d ends the below path

20 / 30

The removeH Operation

I I

Remove b → a Insert c → a and b → d I I

c → a is optional iff a has at least 2 incoming edges b → d is optional iff b has at least 2 outgoing edges

21 / 30

Floorplan Optimization w/ Soft Blocks

[Young et al. 2001], [Lin et al. 2006] I

The area of each soft block is known.

I

The decision variables are the widths of the soft blocks and the positions of all the modules

I

Derive non-overlapping condition for the modules from LCG as a system of difference equations

I

Apply Lagrangian relaxation to minimize the perimeter of the floorplan

22 / 30

Outline

Overview of Floorplanning Linear Constraint Graph The LCG Floorplanner Experimental Results Conclusions

23 / 30

Experimental Results for General Floorplans

I

3 GSRC benchmarks with hard blocks

I

Compare to Parquet [Adya et al. 2003] and ACG [Zhou et al. 2004]

I

Wire length optimization (wire length + chip area)

name n100 n200 n300

ds(%) 7.95 10.99 12.05

Parquet wl 324k 581k 709k

t(s) 30 150 288

ds(%) 8.33 10.26 13.00

ACG wl 308k 540k 644k

t(s) 30 137 357

ds(%) 8.60 9.03 11.44

LCG wl 300k 538k 639k

t(s) 27 133 274

24 / 30

Area Optimization w/ Soft Blocks

I

5 modified MCNC benchmarks with soft blocks

I

Aspect ratio bound: [0.5, 2]

I

Compare to [Lin et al. 2006] (SP+TR) name apte xerox hp ami33 ami49

n 9 10 11 33 49

SP+TR ds(%) t(s) |E | 0.04 34 40 0.08 43 47 0.09 41 54 0.28 383 347 0.24 694 679

LCG+TR ds(%) t(s) |E | 0.04 21 34 0.08 41 38 0.13 26 41 0.24 179 125 0.27 319 182

25 / 30

Wire Length Optimization w/ Soft Blocks

I

5 modified MCNC benchmarks with soft blocks

I

Aspect ratio bound: [0.5, 2]

I

Compare to [Lin et al. 2006] (SP+TR) name apte xerox hp ami33 ami49

ds(%) 0.09 0.21 0.26 0.50 1.17

SP+TR wl(mm) 125.29 145.16 43.42 57.89 290.89

t(s) 35 46 37 349 615

ds(%) 0.08 0.15 0.22 0.49 0.64

LCG+TR wl(mm) 125.28 152.69 42.60 52.46 272.23

t(s) 26 36 27 236 442

26 / 30

Outline

Overview of Floorplanning Linear Constraint Graph The LCG Floorplanner Experimental Results Conclusions

27 / 30

Conclusions

I

Linear Constraint Graphs (LCG) are proposed as a general floorplan representation based on constraint graphs I

I

For n modules, each LCG has at most 2n + 3 vertices and at most 6n + 2 edges LCGs can represent any non-overlapping floorplans

I

Simulated annealing based floorplanner is presented

I

The advantages of LCGs is confirmed by the experimental results.

28 / 30

Q&A

29 / 30

Thank you!

30 / 30