ESE535: Electronic Design Automation

Slides:



Advertisements
Similar presentations
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 19: November 21, 2005 Scheduling Introduction.
Advertisements

EDA (CS286.5b) Day 10 Scheduling (Intro Branch-and-Bound)
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 12: February 23, 2011 Routing 2 (Pathfinder)
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 8: February 11, 2015 Scheduling Introduction.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 14: March 3, 2004 Scheduling Heuristics and Approximation.
EE 553 Integer Programming
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 17: April 2, 2008 Scheduling Introduction.
Penn ESE Spring DeHon 1 ESE (ESE534): Computer Organization Day 21: April 2, 2007 Time Multiplexing.
Dealing with NP-Complete Problems
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 21: April 15, 2009 Routing 1.
EDA (CS286.5b) Day 11 Scheduling (List, Force, Approximation) N.B. no class Thursday (FPGA) …
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 20: April 7, 2008 Scheduling Variants and Approaches.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 16: March 23, 2009 Covering.
EDA (CS286.5b) Day 14 Routing (Pathfind, netflow).
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 12: March 2, 2009 Sequential Optimization (FSM Encoding)
EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 15: March 18, 2009 Static Timing Analysis and Multi-Level Speedup.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 7: February 9, 2009 Scheduling Variants and Approaches.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 8: February 13, 2008 Retiming.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 2: January 26, 2015 Covering Work preclass exercise.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 12: February 13, 2002 Scheduling Heuristics and Approximation.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 2: January 21, 2015 Heterogeneous Multicontext Computing Array Work Preclass.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 9: February 16, 2015 Scheduling Variants and Approaches.
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 ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 20: April 8, 2015 Sequential Optimization (FSM Encoding)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 23: April 20, 2015 Static Timing Analysis and Multi-Level Speedup.
CALTECH CS137 Spring DeHon 1 CS137: Electronic Design Automation Day 5: April 12, 2004 Covering and Retiming.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 6: January 26, 2004 Sequential Optimization (FSM Encoding)
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 13: March 1, 2003 Scheduling Introduction.
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 5: February 2, 2015 Clustering (LUT Mapping, Delay)
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 11: February 11, 2002 Scheduling Introduction.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 25: April 17, 2013 Covering and Retiming.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: January 31, 2011 Scheduling Variants and Approaches.
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 20: November 23, 2005 Scheduling Variants and Approaches.
CS137: Electronic Design Automation
Lecture 3: Uninformed Search
Adversarial Search and Game-Playing
BackTracking CS255.
CS137: Electronic Design Automation
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
ESE534: Computer Organization
ESE534: Computer Organization
ESE535: Electronic Design Automation
ESE535: 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
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
CS137: Electronic Design Automation
CS137: Electronic Design Automation
Presentation transcript:

ESE535: Electronic Design Automation Day 5: January 28, 2013 Scheduling Variants and Approaches Penn ESE535 Spring 2013 -- DeHon

Previously Resources aren’t free Share to reduce costs Behavioral (C, MATLAB, …) RTL Gate Netlist Layout Masks Arch. Select Schedule FSM assign Two-level, Multilevel opt. Covering Retiming Placement Routing Previously Resources aren’t free Share to reduce costs Schedule operations on resources Fixed resources Greedy approximation algorithm List Scheduling for resource-constrained scheduling Penn ESE535 Spring 2013 -- DeHon

Today Tighter bounds on List Scheduling Time-Constrained Scheduling Behavioral (C, MATLAB, …) RTL Gate Netlist Layout Masks Arch. Select Schedule FSM assign Two-level, Multilevel opt. Covering Retiming Placement Routing Today Tighter bounds on List Scheduling Time-Constrained Scheduling Force Directed Few words on project architecture Resource-Constrained Branch-and-Bound Penn ESE535 Spring 2013 -- DeHon

Precedence RB CP Penn ESE535 Spring 2013 -- DeHon

Precedence Constrained Optimal Length > All busy times Optimal Length  Resource Bound Resource Bound  All busy Optimal Length>This Path Optimal Length  Critical Path Critical Path  This Path List Schedule = This path + All busy times List Schedule  2 *(Optimal Length) Penn ESE535 Spring 2013 -- DeHon

Conclude Scheduling of identical parallel machines with precedence constraints has a 2-approximation. Penn ESE535 Spring 2013 -- DeHon

Tightening How could we do better? What is particularly pessimistic about the previous cases? List Schedule = This path + All busy times List Schedule  2 *(Optimal Length) Penn ESE535 Spring 2013 -- DeHon

Tighten LS schedule  Critical Path+Resource Bound LS schedule  Min(CP,RB)+Max(CP,RB) Optimal schedule  Max(CP,RB) LS/Opt  1+Min(CP,RB)/Max(CP,RB) The more one constraint dominates the closer the approximate solution to optimal (EEs think about 3dB point in frequency response) Penn ESE535 Spring 2013 -- DeHon

Tightening Example of 2-approx for any graph More information about problem More internal variables …allow us to state a tighter result 2-approx for any graph Since CP may = RB Tighter approx as CP and RB diverge Penn ESE535 Spring 2013 -- DeHon

Multiple Resource Previous result for homogeneous functional units For heterogeneous resources: also a 2-approximation Lenstra+Shmoys+Tardos, Math. Programming v46p259 (not online, no precedence constraints) Penn ESE535 Spring 2013 -- DeHon

Bounds Precedence case, Identical machines no polynomial approximation algorithm can achieve better than 4/3 bound (unless P=NP) Heterogeneous machines (no precedence) no polynomial approximation algorithm can achieve better than 3/2 bound Penn ESE535 Spring 2013 -- DeHon

Preclass Penn ESE535 Spring 2013 -- DeHon

Preclass Critical Path LB? Resources to keep RB < CP ? Resources to achieve CP? Take poll: 4, 3, 2, 1 What was trick to achieving? Why might List Schedule have a problem with this? Penn ESE535 Spring 2013 -- DeHon

Force Directed Penn ESE535 Spring 2013 -- DeHon

Force-Directed Problem: how exploit schedule freedom (slack) to minimize instantaneous resources Directly solve time-constrained scheduling (previously only solved indirectly) Minimize resources with timing target Penn ESE535 Spring 2013 -- DeHon

Force-Directed Given a node, can schedule anywhere between ASAP and ALAP schedule time Between latest schedule predecessor and ALAP Between ASAP and already scheduled successors Between latest schedule predecessor and earliest schedule successor That is: Scheduling node will limit freedom of nodes in path Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge B2 B3 B10 B1 B11 B4 B5 B6 B7 B8 B9 Penn ESE535 Spring 2013 -- DeHon

Force-Directed If everything where scheduled, except for the target node, what would we do?: examine resource usage in all timeslots allowed by precedence place in timeslot that has least increase maximum resources Least energy Where the forces are pulling it Penn ESE535 Spring 2013 -- DeHon

Force-Directed Problem: don’t know resource utilization during scheduling Strategy: estimate resource utilization Penn ESE535 Spring 2013 -- DeHon

Force-Directed Estimate Assume a node is uniformly distributed within slack region between earliest and latest possible schedule time Use this estimate to identify most used timeslots Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge B2 B3 B10 B1 B11 B4 B5 B6 Schedule into 12 cycles B7 B8 B9 Penn ESE535 Spring 2013 -- DeHon

Slacks on all nodes 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 Schedule into 12 cycles 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Slacks on all nodes 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 In order to estimate, will need to break each task into fractions. With slack 8, can go in any of 9 slots. With slack 2, can go into any of 3 slots. 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Slacks on all nodes 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 With slack 8, can go in any of 9 slots. With slack 2, can go into any of 3 slots. 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Uniform Distribution of Slack 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Most Constrained Node, Most Used Timeslot 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 2 3/9 8 8 2 1/9 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Force-Directed Scheduling a node will shift distribution all of scheduled node’s cost goes into one timeslot predecessor/successors may have freedom limited so shift their contributions Goal: shift distribution to minimize maximum resource utilization (estimate) Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 Repeat 8 8 8 8 8 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 Repeat 8 8 8 8 8 2 3/9 8 8 2 1/9 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 3 4/9 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 3 2/9 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 2 3/9 8 8 2 1/9 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 2 3/9 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 2 3/9 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 3 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 2 13/18 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 3 2/9 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 2 13/18 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 2 13/18 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 2 13/18 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 2 13/18 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 2 13/18 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 Many steps… 8 8 8 8 Penn ESE535 Spring 2013 -- DeHon

Single Resource Hard (5) A1 A2 A3 B1 A4 B2 A5 B3 A6 B4 A7 B5 A8 B6 A9 B7 A10 B8 A11 B9 A12 B10 A13 B11 A2 A4 A6 B2 B3 B10 B1 B11 B4 B5 B6 B7 B8 B9 Penn ESE535 Spring 2013 -- DeHon

Force-Directed Algorithm ASAP/ALAP schedule to determine range of times for each node Compute estimated resource usage Pick most constrained node (in largest time slot…) Evaluate effects of placing in feasible time slots (compute forces) Place in minimum cost slot and update estimates Repeat until done Penn ESE535 Spring 2013 -- DeHon

Force-Directed Runtime Evaluate force of putting in timeslot O(N) Potentially perturbing slack on net prefix/postfix for this node  N Each node potentially in T slots: ×T T = schedule target N nodes to place: ×N O(N2T) Loose bound--don’t get both T slots and N perturbations Penn ESE535 Spring 2013 -- DeHon

Force-Directed Algorithm (from reading) ASAP/ALAP schedule to determine range of times for each node Compute estimated resource usage Select a move For each unscheduled op Evaluate effects of placing in feasible time slots (compute forces) Select move results in minimum cost Repeat until done Penn ESE535 Spring 2013 -- DeHon

Force-Directed Runtime (from reading) Evaluate force of putting in timeslot O(N) Potentially perturbing slack on net prefix/postfix for this node  N Each selection N nodes to consider: ×N Each node potentially in T slots: ×T T = schedule target N nodes to place: ×N O(N3T) Loose bound Penn ESE535 Spring 2013 -- DeHon

(for resource-constrained scheduling) Branch-and-Bound (for resource-constrained scheduling) Penn ESE535 Spring 2013 -- DeHon

Brute-Force Scheduling (Exhaustive Search) Try all schedules Branching/Backtracking Search Start w/ nothing scheduled (ready queue) At each move (branch) pick: available resource time slot ready task (predecessors completed) schedule task on resource Update ready queue Penn ESE535 Spring 2013 -- DeHon

Example T1 T4 T6 T2 T1time 1 T5 T3time 1 T3 T2time 1 idletime 1 Target: 2 FUs Penn ESE535 Spring 2013 -- DeHon

Branching Search Explores entire state space Exponential work finds optimum schedule Exponential work O (N(resources*time-slots) ) Many schedules completely uninteresting Penn ESE535 Spring 2013 -- DeHon

Reducing Work Canonicalize “equivalent” schedule configurations Identify “dominating” schedule configurations Prune partial configurations which will lead to worse (or unacceptable results) Penn ESE535 Spring 2013 -- DeHon

“Equivalent” Schedules If multiple resources of same type assignment of task to particular resource at a particular timeslot is not distinguishing T1 T2 T3 T2 T3 T1 Keep track of resource usage by capacity at time-slot. Penn ESE535 Spring 2013 -- DeHon

“Equivalent” Schedule Prefixes Penn ESE535 Spring 2013 -- DeHon

“Non-Equivalent” Schedule Prefixes Penn ESE535 Spring 2013 -- DeHon

Pruning Prefixes Keep track of scheduled set Recognize when solving same sub-problem Like dynamic programming finding same sub-problems But no guarantee of small number of subproblems set is power-set so 2N …but not all feasible, so shape of graph may simplify Penn ESE535 Spring 2013 -- DeHon

Dominant Schedules A strictly shorter schedule scheduling the same or more tasks will always be superior to the longer schedule T3 T2 T1 T5 T4 T1 T2 T5 T4 T3 Penn ESE535 Spring 2013 -- DeHon

Pruning If can establish a particular schedule path will be worse than one we’ve already seen we can discard it w/out further exploration In particular: LB=current schedule time + lower_bound_estimate if LB greater than known solution, prune Penn ESE535 Spring 2013 -- DeHon

Pruning Techniques Establish Lower Bound on schedule time Critical Path (ASAP schedule) Resource Bound Penn ESE535 Spring 2013 -- DeHon

Alpha-Beta Search Generalization keep both upper and lower bound estimates on partial schedule Lower bounds from CP, RB Upper bounds with List Scheduling expand most promising paths (least upper bound, least lower bound) prune based on lower bounds exceeding known upper bound (technique typically used in games/Chess) Penn ESE535 Spring 2013 -- DeHon

Alpha-Beta Each scheduling decision will tighten Can choose to expand lower/upper bound estimates Can choose to expand least current time (breadth first) least lower bound remaining (depth first) least lower bound estimate least upper bound estimate Can control greediness weighting lower/upper bound selecting “most promising” Penn ESE535 Spring 2013 -- DeHon

Note Aggressive pruning and ordering Coudert shows scheduling can sometimes make polynomial time in practice often cannot prove will be polynomial time usually represents problem structure we still need to understand Coudert shows scheduling Exact Coloring of Real-Life Graphs is Easy“, in Proc. of 34th DAC, Anaheim, CA, June 1997. Penn ESE535 Spring 2013 -- DeHon

Multiple Resources Works for multiple resource case Computing lower-bounds per resource resource constrained Sometimes deal with resource coupling e.g. must have 1 A and 1 B simultaneously or in fixed time slot relation e.g. bus and memory port Penn ESE535 Spring 2013 -- DeHon

Summary Resource estimates and refinement Branch-and-bound search “equivalent” states dominators estimates/pruning Penn ESE535 Spring 2013 -- DeHon

Project Architecture Penn ESE535 Spring 2013 -- DeHon

FPGA Architecture Penn ESE535 Spring 2013 -- DeHon

FPGA Lookup Tables (LUTs) Penn ESE535 Spring 2013 -- DeHon

FPGA Lookup Tables (LUTs) Common mux failure: cannot switch 0, 1 Can hold a constant 0 or 1 output Penn ESE535 Spring 2013 -- DeHon

Fully Funtional LUT Compute A*B*C*D with: Penn ESE535 Spring 2013 -- DeHon

Using Partially Defective LUT Compute A*B*C*D with: Penn ESE535 Spring 2013 -- DeHon

Using Partially Defective LUT Compute A*B*C*D with: Penn ESE535 Spring 2013 -- DeHon

Big Ideas: Estimate Resource Usage Use dominators to reduce work Techniques: Force-Directed Search Branch-and-Bound Alpha-Beta Penn ESE535 Spring 2013 -- DeHon

Admin Assignment 1 was due at class start Reading Assignment 2 out Wednesday online Assignment 2 out Part A due next Monday Part B following Penn ESE535 Spring 2013 -- DeHon