Simulated Annealing.

Slides:



Advertisements
Similar presentations
Floorplanning. Non-Slicing Floorplan Representation Rectangle-Packing-Based Module Placement, H. Murata, K. Fujiyoushi, S. Nakatake and Y. Kajitani, IEEE.
Advertisements

Algorithms (and Datastructures) Lecture 3 MAS 714 part 2 Hartmut Klauck.
ECE 667 Synthesis and Verification of Digital Circuits
Approximations of points and polygonal chains
Simulated Annealing Premchand Akella. Agenda Motivation The algorithm Its applications Examples Conclusion.
Linear Constraint Graph for Floorplan Optimization with Soft Blocks Jia Wang Electrical and Computer Engineering Illinois Institute of Technology Chicago,
Optimal Rectangle Packing: A Meta-CSP Approach Chris Reeson Advanced Constraint Processing Fall 2009 By Michael D. Moffitt and Martha E. Pollack, AAAI.
Easy Optimization Problems, Relaxation, Local Processing for a small subset of variables.
Spie98-1 Evolutionary Algorithms, Simulated Annealing, and Tabu Search: A Comparative Study H. Youssef, S. M. Sait, H. Adiche
Interconnect Estimation without Packing via ACG Floorplans Jia Wang and Hai Zhou Electrical & Computer Engineering Northwestern University U.S.A.
MAE 552 – Heuristic Optimization Lecture 8 February 8, 2002.
NuCAD ACG - Adjacent Constraint Graph for General Floorplans Hai Zhou and Jia Wang ICCD 2004, San Jose October 11-13, 2004.
MAE 552 – Heuristic Optimization Lecture 6 February 6, 2002.
Placement 1 Outline Goal What is Placement? Why Placement?
A Combinatorial Maximum Cover Approach to 2D Translational Geometric Covering Karen Daniels, Arti Mathur, Roger Grinde University of Massachusetts Lowell.
Generating Supply Voltage Islands In Core-based System-on-Chip Designs Final Presentation Steven Beigelmacher Gall Gotfried 04/26/2005.
Review Best-first search uses an evaluation function f(n) to select the next node for expansion. Greedy best-first search uses f(n) = h(n). Greedy best.
1 Simulated Annealing Terrance O ’ Regan. 2 Outline Motivation The algorithm Its applications Examples Conclusion.
Simulated Annealing Van Laarhoven, Aarts Version 1, October 2000.
EDA (CS286.5b) Day 7 Placement (Simulated Annealing) Assignment #1 due Friday.
Planning operation start times for the manufacture of capital products with uncertain processing times and resource constraints D.P. Song, Dr. C.Hicks.
Processing Rate Optimization by Sequential System Floorplanning Jia Wang 1, Ping-Chih Wu 2, and Hai Zhou 1 1 Electrical Engineering & Computer Science.
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
VLSI Physical Design: From Graph Partitioning to Timing Closure Chapter 3: Chip Planning © KLMH Lienig 1 Chapter 3 – Chip Planning 3.1 Introduction to.
CSE 242A Integrated Circuit Layout Automation Lecture: Floorplanning Winter 2009 Chung-Kuan Cheng.
VLSI Physical Design: From Graph Partitioning to Timing Closure Chapter 3: Chip Planning © KLMH Lienig 1 Modern Floorplanning Based on B*-Tree and Fast.
Chip Planning 1. Introduction Chip Planning:  Deals with large modules with −known areas −fixed/changeable shapes −(possibly fixed locations for some.
1 ENTITY test is port a: in bit; end ENTITY test; DRC LVS ERC Circuit Design Functional Design and Logic Design Physical Design Physical Verification and.
Introduction to Simulated Annealing 22c:145 Simulated Annealing  Motivated by the physical annealing process  Material is heated and slowly cooled.
8/15/ VLSI Physical Design Automation Prof. David Pan Office: ACES Lecture 8. Floorplanning (2)
Elements of the Heuristic Approach
Placement by Simulated Annealing. Simulated Annealing  Simulates annealing process for placement  Initial placement −Random positions  Perturb by block.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
Heuristic Optimization Methods
Modern Floor-planning Based on B ∗ -Tree and Fast Simulated Annealing Paper by Chen T. C. and Cheng Y. W (2006) Presented by Gal Itzhak
Bus-Driven Floorplanning Hua Xiang*, Xiaoping Tang +, Martin D. F. Wong* * Univ. Of Illinois at Urbana-Champaign + Cadence Design Systems Inc.
Bus-Pin-Aware Bus-Driven Floorplanning B. Wu and T. Ho Department of Computer Science and Information Engineering NCKU GLSVLSI 2010.
Regularity-Constrained Floorplanning for Multi-Core Processors Xi Chen and Jiang Hu (Department of ECE Texas A&M University), Ning Xu (College of CST Wuhan.
Massachusetts Institute of Technology 1 L14 – Physical Design Spring 2007 Ajay Joshi.
1 Exploring Custom Instruction Synthesis for Application-Specific Instruction Set Processors with Multiple Design Objectives Lin, Hai Fei, Yunsi ACM/IEEE.
Télécom 2A – Algo Complexity (1) Time Complexity and the divide and conquer strategy Or : how to measure algorithm run-time And : design efficient algorithms.
1 CS612 Algorithms for Electronic Design Automation CS 612 – Lecture 4 Floorplanning Mustafa Ozdal Computer Engineering Department, Bilkent University.
Simulated Annealing.
Dept. of Electrical and Computer Engineering The University of Texas at Austin E-Beam Lothography Stencil Planning and Optimization wit Overlapped Characters.
Course: Logic Programming and Constraints
Non-Slicing Floorplanning Joanna Ho David Lee David Omoto.
Thursday, May 9 Heuristic Search: methods for solving difficult optimization problems Handouts: Lecture Notes See the introduction to the paper.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 10: February 6, 2002 Placement (Simulated Annealing…)
Rectlinear Block Packing Using the O-tree Representation Yingxin Pang Koen Lampaert Mindspeed Technologies Chung-Kuan Cheng University of California, San.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Simulated Annealing in 512 bytes EMICRO2004 Microelectronics School Marcelo Johann B R A Z I L.
Introduction to Simulated Annealing Study Guide for ES205 Xiaocang Lin & Yu-Chi Ho August 22, 2000.
Heuristic Methods for the Single- Machine Problem Chapter 4 Elements of Sequencing and Scheduling by Kenneth R. Baker Byung-Hyun Ha R2.
Block Packing: From Puzzle-Solving to Chip Design
Ramakrishna Lecture#2 CAD for VLSI Ramakrishna
An Introduction to Simulated Annealing Kevin Cannons November 24, 2005.
Example Apply hierarchical clustering with d min to below data where c=3. Nearest neighbor clustering d min d max will form elongated clusters!
Computational Geometry
School of Computer Science & Engineering
Simulated Annealing Chapter
Heuristic Optimization Methods
Van Laarhoven, Aarts Version 1, October 2000
D.Yu. Ignatov, A.N. Filippov, A.D. Ignatov, X. Zhang
Subject Name: Operation Research Subject Code: 10CS661 Prepared By:Mrs
Sequence Pair Representation
CSE 589 Applied Algorithms Spring 1999
Algorithms for Budget-Constrained Survivable Topology Design
Md. Tanveer Anwar University of Arkansas
Floorplanning (Adapted from Prof. E. Young’s and Prof. Y
Presentation transcript:

Simulated Annealing

Simulated Annealing Charactersictics: Iterative improvement Begins with an initial (arbitrary) solution and seeks to incrementally improve the objective function. During each iteration, a local neighborhood of the current solution is considered. A new candidate solution: a small perturbation of the current solution. Unlike greedy algorithms, SA algorithms can accept candidate solutions with higher cost.

Simulated Annealing Cost Initial solution Local optimum Global optimum Solution states

Simulated Annealing What is annealing? Definition (material science): Controlled cooling process of high-temperature materials to modify their properties. Cooling changes material structure from being highly randomized (chaotic) to being structured (stable). The way that atoms settle in low-temperature state is probabilistic in nature.

Simulated Annealing What is annealing? Slower cooling: a higher probability of achieving a perfect lattice with minimum-energy  Cooling process occurs in steps Atoms need enough time to try different structures Sometimes atoms may create (intermediate) higher-energy states Probability of the accepting higher-energy states decreases with temperature

Simulated Annealing Characteristics Avoids getting trapped in local minima Initial state available Improvements by changing floorplan (e.g., exchanging) Moves which decrease cost are accepted directly Cooling Schedule Moves which increase cost are accepted depending on T and cost increase One of the most common algorithms in floorplanning

Simulated Annealing Algorithm Input: initial solution init_sol Output: optimized new solution curr_sol T = T0 // initialization i = 0 curr_sol = init_sol curr_cost = COST(curr_sol) while (T > Tmin) while (stopping criterion is not met) i = i + 1 trial_sol = TRY_MOVE(curr_sol) // try small local change trial_cost = COST(trial_sol) cost = trial_cost – curr_cost if (cost < 0) // if there is improvement, curr_cost = trial_cost // update the cost and curr_sol = MOVE(curr_sol) // execute the move else r = RANDOM(0,1) // random number [0,1] if (r < e –Δcost/T) // if it meets threshold, curr_cost = trial_cost // update the cost and curr_sol = MOVE(curr_sol) // execute the move T = α ∙ T // 0 < α < 1, T reduction

Temperature Reduction Function

Cost Decrease

Accepted Moves

SA Parameters Quality of results, highly dependent on parameter values Initial Temperature Final Temperature Inner Loop Criterion Cooling Schedule Move Function Cost Function

Floorplanning Representation: Sequence-Pair

Positive Locus and Negative Locus of Block b Negative Locus of Block b Positive Locus: up-right step-line: Starts to move upward. Turns direction alternatively right and up until reaching upper right corner without crossing: i) boundaries of other modules, and iii) the boundary of the chip.

Sequence Pair Positive step line sequence: ecadfb Negative step line sequence: fcbead

Sequence-Pair = (abdecf, cbfade) Positive Loci Negative Loci Sequence-Pair = (abdecf, cbfade)

Geometric Info of Sequence-Pair Given a floorplan and the corresponding sequence-pair (P, N): x is left of y iff x is before y in both P and N. x is above y iff x is before y in P and after y in N. (…x…y…, …x…y…) y x (…x…y…, …y…x…) x y Sequence-Pair = (abdecf, cbfade)

From Sequence-Pair to Relative Positions Labeled grid for (abdecf, cbfade) Given a sequence-pair, the floorplan with smallest area can be found in O(n2) time. Algorithms of time O(n log log n) or O(n log n) exist. But faster than O(n2) algorithm only when n is quite large. e d a f b c a b d e c f

From Sequence-Pair to Floorplan Distance from left (bottom) edge can be found using the longest path algorithm on the horizontal (vertical) constraint graph (HCG, VCG). Horizontal Constraint Graph Vertical Constraint Graph

Sequence Pair (SP) A floorplan is represented by a pair of permutations of the module names: e.g. 1 3 2 4 5 3 5 4 1 2 A sequence pair (s1, s2) of n modules can represent all possible floorplans formed by the n modules by specifying the pair-wise relationship between the modules.

Sequence Pair Consider a pair of modules A and B. If the arrangement of A and B in s1 and s2 are: (…A…B…, …A…B…), then the right boundary of A is on the left hand side of the left boundary of B. (…A…B…, …B…A…), then the upper boundary of B is below the lower boundary of A.

Example Consider the sequence pair: (13245,41352 ) 3 2 1 5 4

Floorplan Realization Constructs a floorplan from its representation (sequence pair). Makes use of HCG and VCG (Gh and Gv).

Floorplan Realization Whenever we see (…A…B…, …A…B…), add an edge from A to B in Gh with weight wA. Whenever we see (…A…B…, …B…A…), add an edge from B to A in Gv with weight hA. Add a source vertex s (weight = 0) to Gh and Gv pointing to all vertices without incoming edges. Find the longest paths from s to every vertex in Gh and Gv (how?), which are the coordinates of the lower left corner of the module in the packing.

Example Gh 1.1 3 2 1.2 1 1.2 1.1 1.1 1 1.2 3 2 1.2 1 5 1.2 s 2.4 2 4 5 Gv 2 3 2 4 1 1 2 1 2.4 1.2 1 1 5 (13245,41352 ) 4 s

Example Gh Gv (13245,41352 ) Need to remove the transitive edges 3 2 1 1.1 3 2 1.2 1 1.2 1.1 1.1 1 1.2 3 2 1.2 1 5 1.2 s 2.4 2 4 5 Gv 2 3 2 4 1 1 2 1 2.4 1.2 1 1 5 (13245,41352 ) 4 s

Moves Three kinds of moves in the annealing process: M1: Rotate a module, or change the shape of a module M2: Interchange 2 modules in both sequences M3: Interchange 2 modules in the first sequence Does this set of move operations ensure reachability?

Pros and Cons of SP Advantages: Disadvantages: Simple representation All floorplans can be represented. The solution space is finite. (How big?) Disadvantages: Redundant representation. The representation is not 1-to-1. The size of the constraint graphs, and thus the runtime to construct the floorplan is quadratic

Sequence Pair Representation Initial SP: SP1 = (17452638, 84725361) Dimensions: (2,4), (1,3), (3,3), (3,5), (3,2), (5,3), (1,2), (2,4) Based on SP1 we build the following table: Right of: the list of modules at the right of the module

Constraint Graphs Horizontal constraint graph (HCG) Before and after removing transitive edges

Constraint Graphs (cont) Vertical constraint graph (VCG)

Computing Chip Width and Height Longest source-sink path length in: HCG = chip width, VCG = chip height Node weight = module width/height Dimensions: (2,4), (1,3), (3,3), (3,5), (3,2), (5,3), (1,2), (2,4)

Computing Module Location Use longest source-module path length in HCG/VCG Lower-left corner location = source to module input path length

Final Floorplan Dimension: 11 × 15

Move I (M3) Swap 1 and 3 in positive sequence of SP1

Constraint Graphs

Constructing Floorplan Dimension: 13 × 14

Move II (M2) Swap 4 and 6 in both sequences of SP2

Constraint Graphs

Constructing Floorplan Dimension: 13 × 12

Summary Impact of the moves: Floorplan dimension changes from 11 × 15 to 13 × 14 to 13 × 12

B* Tree Apply the Depth-First Search (DFS) to construct the tree. left child => adjacent, bottom-most module on the right. right child => nearest module above with the same x-coordinate

Integrated Algorithms Analytical approaches: Mixed integer linear programming (MILP): Constraints: Non-overlapping Objective Function: Area Problem: 100 blocks: 10,000 variables, 20,000 equations!  limited to 10 blocks Linear programming (LP): Continuous coordinates  Needs legalization: M. D. Moffitt, J. A. Roy, I. L. Markov and M. E. Pollack, “Constraint-Driven Floorplan Repair”, ACM Trans. on Design Autom. Of Electronic Sys. 13(4) (2008), pp. 1-13.