ESE535: Electronic Design Automation

Slides:



Advertisements
Similar presentations
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Sequential Synthesis.
Advertisements

Chapter 4 Retiming.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 14: March 3, 2004 Scheduling Heuristics and Approximation.
Circuit Retiming with Interconnect Delay CUHK CSE CAD Group Meeting One Evangeline Young Aug 19, 2003.
Pipelining and Retiming 1 Pipelining  Adding registers along a path  split combinational logic into multiple cycles  increase clock rate  increase.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 21: April 15, 2009 Routing 1.
Penn ESE Fall DeHon 1 ESE (ESE534): Computer Organization Day 19: March 26, 2007 Retime 1: Transformations.
Retiming. Consider the Following Circuit Suppose T XOR = 3 ns, T pcq = 1 ns, T setup = 1 ns, then this circuit can be clocked at 1 ns + (3 x 3 ns) + 1.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
CS294-6 Reconfigurable Computing Day 16 October 15, 1998 Retiming.
EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.
1 Retiming Outline: ProblemProblem FormulationFormulation Retiming algorithmRetiming algorithm.
ECE Synthesis & Verification 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Retiming.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
EDA (CS286.5b) Day 18 Retiming. Today Retiming –cycle time (clock period) –C-slow –initial states –register minimization.
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 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 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 7: February 3, 2002 Retiming.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 23: April 20, 2015 Static Timing Analysis and Multi-Level Speedup.
ELEC692 VLSI Signal Processing Architecture Lecture 3
Pipelining and Retiming
CALTECH CS137 Spring DeHon 1 CS137: Electronic Design Automation Day 5: April 12, 2004 Covering and Retiming.
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)
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.
CS137: Electronic Design Automation
Vishwani D. Agrawal James J. Danaher Professor
Shortest Paths and Minimum Spanning Trees
CS137: Electronic Design Automation
The minimum cost flow problem
Instructor: Rajeev Alur
ESE535: Electronic Design Automation
CS137: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
1.3 Modeling with exponentially many constr.
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
Tsung-Hao Chen and Kuang-Ching Wang May
Day 26: November 1, 2013 Synchronous Circuits
Analysis of Algorithms
Integer Programming (정수계획법)
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
CprE / ComS 583 Reconfigurable Computing
ESE535: Electronic Design Automation
CS184a: Computer Architecture (Structures and Organization)
ESE535: Electronic Design Automation
Integer Programming (정수계획법)
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
Algorithms (2IL15) – Lecture 7
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
Timing Analysis and Optimization of Sequential Circuits
Fast Min-Register Retiming Through Binary Max-Flow
CS137: Electronic Design Automation
Presentation transcript:

ESE535: Electronic Design Automation Day 24: April 15, 2013 Retiming Penn ESE535 Spring 2013 -- DeHon

Today Retiming Cycle time (clock period) Initial states Behavioral (C, MATLAB, …) RTL Gate Netlist Layout Masks Arch. Select Schedule FSM assign Two-level, Multilevel opt. Covering Retiming Placement Routing Today Retiming Cycle time (clock period) Initial states Register minimization Penn ESE535 Spring 2013 -- DeHon

Task Move registers to: Preserve semantics Minimize path length between registers Reduce cycle time …while minimizing number of registers required Penn ESE535 Spring 2013 -- DeHon

Example: Same Semantics Externally: no observable difference Penn ESE535 Spring 2013 -- DeHon

Preclass 1 Penn ESE535 Spring 2013 -- DeHon

Problem Given: clocked circuit Goal: minimize clock period without changing (observable) behavior I.e. minimize maximum delay between any pair of registers Freedom: move placement of internal registers Penn ESE535 Spring 2013 -- DeHon

Other Goals Minimize number of registers in circuit Achieve target cycle time Minimize number of registers while achieving target cycle time …start talking about minimizing cycle... Penn ESE535 Spring 2013 -- DeHon

Preclass 2 Example Path Length (L) ? Can we do better? Penn ESE535 Spring 2013 -- DeHon

Legal Register Moves Retiming Lag/Lead Penn ESE535 Spring 2013 -- DeHon

Canonical Graph Representation 1 2 3 4 Separate arc for each path Weight edges by number of registers (weight nodes by delay through node) Penn ESE535 Spring 2013 -- DeHon

Critical Path Length 1 2 3 4 Critical Path: Length of longest node path of zero weight edges Penn ESE535 Spring 2013 -- DeHon

Retiming Lag/Lead Retiming: Assign a lag to every vertex weight(e) = weight(e) + lag(head(e))-lag(tail(e)) Penn ESE535 Spring 2013 -- DeHon

Valid Retiming Retiming is valid as long as: e in graph weight(e) = weight(e) + lag(head(e))-lag(tail(e))  0 Assuming original circuit was a valid synchronous circuit, this guarantees: non-negative register weights on all edges no travel backward in time :-) all cycles have strictly positive register counts propagation delay on each vertex is non-negative (assumed 1 for today) Penn ESE535 Spring 2013 -- DeHon

Retiming Task Move registers  assign lags to nodes lags define all locally legal moves Preserving non-negative edge weights (previous slide) guarantees collection of lags remains consistent globally Penn ESE535 Spring 2013 -- DeHon

Retiming Transformation Properties invariant to retiming number of registers around a cycle delay along a cycle Cycle of length P must have at least P/c registers on it to be retimeable to cycle c Can be computed from invariant above Penn ESE535 Spring 2013 -- DeHon

Optimal Retiming There is a retiming of graph G w/ clock cycle c iff G-1/c has no cycles with negative edge weights G-  subtract a from each edge weight Penn ESE535 Spring 2013 -- DeHon

G-1/c 1-1/c 2-1/c 3-1/c 4-1/c 0-1/c Penn ESE535 Spring 2013 -- DeHon

1/c Intuition Want to place a register every c delay units Each register adds one Each delay subtracts 1/c As long as remains more positives than negatives around all cycles can move registers to accommodate Captures the regs=P/c constraints Penn ESE535 Spring 2013 -- DeHon

Illustrate with Pipeline Case Penn ESE535 Spring 2013 -- DeHon

G-1/c 1-1/c 2-1/c 3-1/c 4-1/c 0-1/c Penn ESE535 Spring 2013 -- DeHon

Compute Retiming Lag(v) = shortest path to I/O in G-1/c Compute shortest paths in O(|V||E|) Bellman-Ford also use to detect negative weight cycles when c too small Penn ESE535 Spring 2013 -- DeHon

Bellman Ford For I0 to N For k0 to N ui  (except ui=0 for IO) For k0 to N for ei,jE ui min(ui ,uj+w(ei,j)) For ei,jE //still updatenegative cycle if ui >uj+w(ei,j) cycles detected Penn ESE535 Spring 2013 -- DeHon

Apply to Example 1-1/c 0-1/c 2-1/c 3-1/c 4-1/c Penn ESE535 Spring 2013 -- DeHon

Try c=1 1-1/c 2-1/c 3-1/c 4-1/c 0-1/c 1 2 3 -1 Draw G-1 1 2 3 -1 Draw G-1 Negative cycles? Penn ESE535 Spring 2013 -- DeHon

Try c=2 1-1/c 2-1/c 3-1/c 4-1/c 0-1/c 0.5 1.5 2.5 3.5 -0.5 Draw G-0.5 Negative cycles? Penn ESE535 Spring 2013 -- DeHon

Apply: Find Lags 0.5 -0.5 1.5 2.5 3.5 Shortest paths? Penn ESE535 Spring 2013 -- DeHon

Apply: Lags 0.5 1.5 2.5 3.5 -0.5 -1.5 -1.0 Penn ESE535 Spring 2013 -- DeHon

Apply: Lags Take ceil 0.5 -0.5 -1 1.5 2.5 3.5 Penn ESE535 Spring 2013 -- DeHon

Phase Choice (C=2) Penn ESE535 Spring 2013 -- DeHon

Apply: Move Registers 1 Original Graph -1 weighting 2 3 1 4 2 Original Graph weighting -1 1 2 3 Compute new weights weight(e) = weight(e) + lag(head(e))-lag(tail(e)) Penn ESE535 Spring 2013 -- DeHon

Apply: Retimed Design 1 2 3 Penn ESE535 Spring 2013 -- DeHon

Apply: Lags (alternate) 0.5 1.5 2.5 3.5 -0.5 -1.5 -1.0 Take floor 0.5 1.5 2.5 3.5 -0.5 -2 -1 Penn ESE535 Spring 2013 -- DeHon

Apply: Move Registers (floor) 1 2 3 4 Original Graph weighting -2 -1 1 2 Compute new weights weight(e) = weight(e) + lag(head(e))-lag(tail(e)) Penn ESE535 Spring 2013 -- DeHon

Apply: Retimed Design (floor) 1 2 Penn ESE535 Spring 2013 -- DeHon

Summary So Far Can move registers to minimize cycle time Formulate as a lag assignment to every node Optimally solve cycle time in O(|V||E|) time Using a shortest path search Penn ESE535 Spring 2013 -- DeHon

Questions? Penn ESE535 Spring 2013 -- DeHon

Pipelining We can use this retiming to pipeline Assume we have enough (infinite supply) registers at edge of circuit Retime them into circuit Penn ESE535 Spring 2013 -- DeHon

C>1 Pipeline Penn ESE535 Spring 2013 -- DeHon

Add Registers Draw G n Setup 1 G-1/c c=1 Setup G-1/c c=1 Penn ESE535 Spring 2013 -- DeHon

Add Registers n 1 G Minimum n ? G-1/1 Penn ESE535 Spring 2013 -- DeHon

Lags? Penn ESE535 Spring 2013 -- DeHon

Pipeline Retiming: Lag Penn ESE535 Spring 2013 -- DeHon

Move Registers -4 -1 -2 -3 n 1 Compute new weights (move registers) -1 -2 -3 n 1 Compute new weights (move registers) Penn ESE535 Spring 2013 -- DeHon

Pipelined Retimed Penn ESE535 Spring 2013 -- DeHon

Note Algorithm/examples shown For general delay, for special case of unit-delay nodes For general delay, a bit more complicated still polynomial Penn ESE535 Spring 2013 -- DeHon

Initial State What about initial state? 1 1 What should initial value be? Penn ESE535 Spring 2013 -- DeHon

Initial State What should initial value be? What should initial value be? Penn ESE535 Spring 2013 -- DeHon

Initial State 1 1 1 What should initial values be? 1 1 1 What should initial values be? In general, constraints  satisfiable? Penn ESE535 Spring 2013 -- DeHon

Initial State 0,1? 1 1 1 What should initial values be? 0,1? 1 1 1 What should initial values be? Penn ESE535 Spring 2013 -- DeHon

Initial State 1 Cycle1: 1 Cycle2: /(0*/in)=1 ? Cycle1: /init Cycle1: 1 Cycle2: /(0*/in)=1 ? Cycle1: /init Cycle2: /(/init*/in)=in+init init What should init be? init=0 Cycle1: 1 Cycle2: /(/init*/in)=in init=1 Cycle1: 0 Cycle2: /(/init*/in)=1 Penn ESE535 Spring 2013 -- DeHon

Initial State Cannot always get exactly the same initial state behavior on the retimed circuit without additional care in the retiming transformation sometimes have to modify structure of retiming to preserve initial behavior Only a problem for startup transient if you’re willing to clock to get into initial state, not a limitation Penn ESE535 Spring 2013 -- DeHon

Minimize Registers Penn ESE535 Spring 2013 -- DeHon

Minimize Registers Number of registers: S w(e) After retime: S w(e)+S (FI(v)-FO(v))lag(v) delta only in lags So want to minimize: S (FI(v)-FO(v))lag(v) subject to earlier constraints non-negative register weights, delays positive cycle counts Penn ESE535 Spring 2013 -- DeHon

Minimize Registers  ILP So want to minimize: S (FI(v)-FO(v))lag(v) subject to earlier constraints non-negative register weights, delays positive cycle counts FI(v)-FO(V) is a constant cv Minimize S(cv*lag(v)) w(ei)+lag(head(ei))-lag(tail(ei)) > 0 Penn ESE535 Spring 2013 -- DeHon

Minimize Registers: ILPflow Can be formulated as flow problem Can add cycle time constraints to flow problem Time: O(|V||E|log(|V|)log|(|V|2/|E|)) Penn ESE535 Spring 2013 -- DeHon

Summary Can move registers to minimize cycle time Formulate as a lag assignment to every node Optimally solve cycle time in O(|V||E|) time Also Minimize registers Watch out for initial values Penn ESE535 Spring 2013 -- DeHon

Big Ideas Exploit freedom Formulate transformations (lag assignment) Express legality constraints Technique: graph algorithms network flow Penn ESE535 Spring 2013 -- DeHon

Admin Reading for Wednesday online Penn ESE535 Spring 2013 -- DeHon