ESE535: Electronic Design Automation

Slides:



Advertisements
Similar presentations
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 11: March 4, 2008 Placement (Intro, Constructive)
Advertisements

Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 20: April 13, 2009 Placement II (Simulated Annealing)
MAE 552 – Heuristic Optimization Lecture 6 February 6, 2002.
Placement 1 Outline Goal What is Placement? Why Placement?
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 21: April 15, 2009 Routing 1.
Reconfigurable Computing (EN2911X, Fall07)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 19: April 9, 2008 Routing 1.
Simulated Annealing 10/7/2005.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
EDA (CS286.5b) Day 7 Placement (Simulated Annealing) Assignment #1 due Friday.
Penn ESE525 Spring DeHon 1 ESE535: Electronic Design Automation Day 10: February 18, 2009 Partitioning 2 (spectral, network flow)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
ECE 506 Reconfigurable Computing Lecture 7 FPGA Placement.
CSE 242A Integrated Circuit Layout Automation Lecture 5: Placement Winter 2009 Chung-Kuan Cheng.
Placement by Simulated Annealing. Simulated Annealing  Simulates annealing process for placement  Initial placement −Random positions  Perturb by block.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 4: January 28, 2015 Partitioning (Intro, KLFM)
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 17: November 11, 2005 Placement (Simulated Annealing…)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 2: January 26, 2015 Covering Work preclass exercise.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 9: February 16, 2015 Scheduling Variants and Approaches.
Massachusetts Institute of Technology 1 L14 – Physical Design Spring 2007 Ajay Joshi.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 9: February 14, 2011 Placement (Intro, Constructive)
Placement. Physical Design Cycle Partitioning Placement/ Floorplanning Placement/ Floorplanning Routing Break the circuit up into smaller segments Place.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 24: April 18, 2011 Covering and Retiming.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 10: February 18, 2015 Architecture Synthesis (Provisioning, Allocation)
Penn ESE525 Spring DeHon 1 ESE535: Electronic Design Automation Day 6: February 4, 2014 Partitioning 2 (spectral, network flow)
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 10: February 6, 2002 Placement (Simulated Annealing…)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 23: April 20, 2015 Static Timing Analysis and Multi-Level Speedup.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 13: February 20, 2002 Routing 1.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 13: March 3, 2015 Routing 1.
FPGA CAD 10-MAR-2003.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 10: February 16, 2011 Placement II (Simulated Annealing)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 6: January 30, 2013 Partitioning (Intro, KLFM)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 20: April 4, 2011 Static Timing Analysis and Multi-Level Speedup.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 15: March 13, 2013 High Level Synthesis II Dataflow Graph Sharing.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 11: February 25, 2015 Placement (Intro, Constructive)
CS137 Electronic Design Automation Day 9: February 25, 2004 Placement II André DeHon, Michael Wrighton.
CALTECH CS137 Winter DeHon 1 CS137: Electronic Design Automation Day 8: January 27, 2006 Cellular Placement.
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 21: November 28, 2005 Routing 1.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 25: April 17, 2013 Covering and Retiming.
Placement and Routing Algorithms. 2 FPGA Placement & Routing.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: January 31, 2011 Scheduling Variants and Approaches.
Local Search Algorithms
CS137: Electronic Design Automation
ESE535: Electronic Design Automation
CS137: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE534: Computer Organization
ESE534: Computer Organization
ESE535: Electronic Design Automation
CSE 589 Applied Algorithms Spring 1999
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
More on Search: A* and Optimization
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE534: Computer Organization
Xin-She Yang, Nature-Inspired Optimization Algorithms, Elsevier, 2014
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
More on HW 2 (due Jan 26) Again, it must be in Python 2.7.
ESE535: Electronic Design Automation
Local Search Algorithms
Local Search Algorithms
CS137: Electronic Design Automation
Reconfigurable Computing (EN2911X, Fall07)
Presentation transcript:

ESE535: Electronic Design Automation Day 10: February 18, 2013 Placement II (Simulated Annealing) Penn ESE535 Spring 2013 -- DeHon

Preclass Squared wirelength for top placement? Squared wirelength for bottom placement? Number of swaps? Squared wirelength after swap for each of these cases? Sample from class (everyone assigned 1 or 2) Penn ESE535 Spring 2013 -- DeHon

Preclass Lesson Why can’t we find an improving swap? Penn ESE535 Spring 2013 -- DeHon

Today Placement Improving Quality Technique: Cost functions Behavioral (C, MATLAB, …) RTL Gate Netlist Layout Masks Arch. Select Schedule FSM assign Two-level, Multilevel opt. Covering Retiming Placement Routing Today Placement Improving Quality Cost functions Avoiding local minima Technique: Simulated Annealing Penn ESE535 Spring 2013 -- DeHon

Simulated Annealing Physically motivated approach Physical world has similar problems objects/atoms seeking minimum cost arrangement at high temperature (energy) can move around E.g. it melts at low temperature, no free energy to move cool quicklyfreeze in defects (weak structure) glass cool slowly allow to find minimum cost crystal Penn ESE535 Spring 2013 -- DeHon

Key Benefit Avoid Local Minima Allowed to take locally non-improving moves in order to avoid being stuck Penn ESE535 Spring 2013 -- DeHon

Simulated Annealing At high temperature can move around not trapped to only make “improving” moves free energy from “temperature” allows exploration of non-minimum states avoid being trapped in local minima As temperature lowers less energy available to take big, non-minimizing moves more local / greedy moves Penn ESE535 Spring 2013 -- DeHon

Design Optimization Components: “Energy” (Cost) function to minimize represent entire state, drives system forward Moves local rearrangement/transformation of solution Cooling schedule initial temperature temperature steps (sequence) time at each temperature Penn ESE535 Spring 2013 -- DeHon

Basic Algorithm Sketch Pick an initial solution Set temperature (T) to initial value while (T>Tmin) for time at T pick a move at random compute Dcost if less than zero, accept else if (RND<e-Dcost/T), accept update T Penn ESE535 Spring 2013 -- DeHon

Cost Function Can be very general Desirable characteristics: Combine area, timing, energy, routability… Desirable characteristics: drive entire solution in right direction reward every good move cheap to compute delta costs e.g. FM Ideally O(1) Penn ESE535 Spring 2013 -- DeHon

Bad Cost Functions Not reward every move: Expensive update cost size < threshold ? Anything using max channel width critical path delay How apply to example at right? Expensive update cost rerun router on every move rerun static timing analysis E.g. recalculate critical path delay Penn ESE535 Spring 2013 -- DeHon

Example Cost Functions bby bbx Total Wire Length Linear, quadratic… S Bounding Box (semi-perimeter) Surrogate for routed net length S (echannel_density) Dominate by largest density  approximate max Rewards improvement in non-maximum channel But reward is larger for denser channels Can be computed incrementally Penn ESE535 Spring 2013 -- DeHon

Bounding Box Why might not be satisfied with bounding box? Should these all contribute same cost? 2, 3, 4, or 5 terminals on same net Penn ESE535 Spring 2013 -- DeHon

Example: VPR Wire Costs VPR Bounding Box Swartz, Betz, & Rose FPGA 1998 Original table: Cheng ICCAD 1994 Penn ESE535 Spring 2013 -- DeHon

Example: VPR Timing Costs Criticality(e)=1-Slack(e)/Dmax TCost(e)=Delay(e)*Criticality(e)CriticalityExp Keep all edge delays in a table Recompute Net Criticality at each Temperature Marquardt, Betz, & Rose FPGA2000 Penn ESE535 Spring 2013 -- DeHon

Different Costs How might we deal with multiple costs? E.g. Wire cost and Timing costs ? Penn ESE535 Spring 2013 -- DeHon

VPR Balance Wire and Time Cost Anneal Cost is weighted linear sum of Wire and Time Marquardt, Betz, & Rose FPGA2000 Penn ESE535 Spring 2013 -- DeHon

Basic Algorithm Sketch (review) Pick an initial solution Set temperature (T) to initial value while (T>Tmin) for time at T pick a move at random compute Dcost if less than zero, accept else if (RND<e-Dcost/T), accept update T Penn ESE535 Spring 2013 -- DeHon

Moves Swap two cells Swap regions Rotate cell (when feasible) Within some distance limit? (ex. to come) Swap regions …rows, columns, subtrees, cluster Rotate cell (when feasible) Flip (mirror) cell Permute cell inputs (equivalent inputs) Penn ESE535 Spring 2013 -- DeHon

Legality Constraints Examples: Options: Limit on number of gates/cluster (position) Limit on number of Inputs/cluster (region) Options: Force all moves to be legal Force initial placement to be legal Illegal moves rejected Allow illegal placement/moves Set cost function to make undesirable Make less desirable (more costly) over time Penn ESE535 Spring 2013 -- DeHon

Basic Algorithm Sketch (review) Pick an initial solution Set temperature (T) to initial value while (T>Tmin) for time at T pick a move at random compute Dcost if less than zero, accept else if (RND<e-Dcost/T), accept update T Penn ESE535 Spring 2013 -- DeHon

Initial Solution Random Spectral Placement Constructive Placement Fast placers start at lower temperature; assume constructive got global right. Penn ESE535 Spring 2013 -- DeHon

Basic Algorithm Sketch (review) Pick an initial solution Set temperature (T) to initial value while (T>Tmin) for time at T pick a move at random compute Dcost if less than zero, accept else if (RND<e-Dcost/T), accept update T Penn ESE535 Spring 2013 -- DeHon

Details Initial Temperature When Paccept=1, moves randomize T0=-Davg/ln(Paccept) e-Dcost/T e-Dcost/T0=e-Dcost/(-Davg/ln(Paccept)) Average move  eln(Paccept) Accepted with Probability Paccept When Paccept=1, moves randomize Penn ESE535 Spring 2013 -- DeHon

Details Cooling schedule: options Time at each temperature: options fixed ratio: T=lT (e.g. l=0.85) temperature dependent function of both temperature and acceptance rate example to come Time at each temperature: options fixed number of moves? fixed number of rejected moves? fixed fraction of rejected moves? Penn ESE535 Spring 2013 -- DeHon

VPR Cooling Schedule Moves at Temperature = cN4/3 Temperature Update Tnew=Told×g Idea: advance slowly in good a range a is measured acceptance rate Betz, Rose, & Marquardt Kluwer 1999 Penn ESE535 Spring 2013 -- DeHon

Basic Algorithm Sketch Pick an initial solution Set temperature (T) to initial value while (T>Tmin) for time at T pick a move at random compute Dcost if less than zero, accept else if (RND<e-Dcost/T), accept update T What happens when T0 ? Penn ESE535 Spring 2013 -- DeHon

Range Limit Want to tune so accepting 44% of the moves – Lam and Delosme DAC 1988 VPR Define Rlimit – defines maximum x and y accepted Tune Rlimit to maintain acceptance rate Rlimitnew=Rlimitold×(1-0.44+a) a is measured acceptance rate Penn ESE535 Spring 2013 -- DeHon

Range Limiting? Eguro alternate [DAC 2005] define P=D-M Tune M to control a Penn ESE535 Spring 2013 -- DeHon

Range Limiting Distance is Pswap=D-M M adjusted For 44% accept Eguro, Hauck, & Sharma DAC 2005 Penn ESE535 Spring 2013 -- DeHon

Recall: VPR Timing Costs Criticality(e)=1-Slack(e)/Dmax TCost(e)=Delay(e)*Criticality(e)CriticalityExp Keep all edge delays in a table Recompute Net Criticality at each Temperature Why might be a problem? Marquardt, Betz, & Rose FPGA2000 Penn ESE535 Spring 2013 -- DeHon

Stale Criticality Criticality becomes stale during moves Eguro & Hauck DAC 2008 Penn ESE535 Spring 2013 -- DeHon

Basic Algorithm Sketch (review) Pick an initial solution Set temperature (T) to initial value while (T>Tmin) for time at T pick a move at random compute Dcost if less than zero, accept else if (RND<e-Dcost/T), accept update T Penn ESE535 Spring 2013 -- DeHon

Variant: “Rejectionless” Order moves by cost compare FM Pick random number first Use random to define range of move costs will currently accept Pick randomly within this range Idea: never pick a costly move which will be rejected Penn ESE535 Spring 2013 -- DeHon

Simulated Annealing Theory If stay long enough at each cooling stage will achieve tight error bound If cool long enough will find optimum …but is it any less work than exhaustive exploration? Good to have a continuum…. Penn ESE535 Spring 2013 -- DeHon

Practice Good results Slow convergence ultimately, what most commercial tools use...what vpr uses… Slow convergence Tricky to pick schedules to accelerate convergence Too slow  runs too long Too fast  freezes prematurelylocal min  low quality Penn ESE535 Spring 2013 -- DeHon

Pragmatic Approach Good way to find out what optimization is possible Run for long time and cool slowly If can slow down cooling and get improvement Demonstration haven’t found optimum, yet Once know good result this way Can try to accelerate convergence w/out sacrificing quality Penn ESE535 Spring 2013 -- DeHon

Big “Hammer” Costly, but general Works for most all problems (part, placement, route, retime, schedule…) Can have hybrid/mixed cost functions as long as weight to single potential (e.g. wire/time from VPR) With care, can attack multiple levels place and route Ignores structure of problem resignation to finding/understanding structure Penn ESE535 Spring 2013 -- DeHon

Summary Simulated Annealing General purpose solution use randomness to explore space accept “bad” moves to avoid local minima decrease tolerance over time General purpose solution costly in runtime Penn ESE535 Spring 2013 -- DeHon

Big Ideas: Use randomness to explore large (non-convex) space Sample various parts of space Avoid becoming trapped in local minimum Technique Simulated Annealing Penn ESE535 Spring 2013 -- DeHon

Admin Reading for Wednesday online Assignment 3 due Wednesday Penn ESE535 Spring 2013 -- DeHon