1 Retiming Outline: ProblemProblem FormulationFormulation Retiming algorithmRetiming algorithm.

Slides:



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

Chapter 4 Retiming.
Advanced Algorithm Design and Analysis (Lecture 7) SW5 fall 2004 Simonas Šaltenis E1-215b
Clock Skewing EECS 290A Sequential Logic Synthesis and Verification.
Chapter 25: All-Pairs Shortest-Paths
Sequential Timing Optimization. Long path timing constraints Data must not reach destination FF too late s i + d(i,j) + T setup  s j + P s i s j d(i,j)
Management Science 461 Lecture 2b – Shortest Paths September 16, 2008.
All Pairs Shortest Paths and Floyd-Warshall Algorithm CLRS 25.2
Tirgul 12 Algorithm for Single-Source-Shortest-Paths (s-s-s-p) Problem Application of s-s-s-p for Solving a System of Difference Constraints.
ECE734 VLSI Arrays for Digital Signal Processing Algorithm Representations and Iteration Bound.
Circuit Retiming with Interconnect Delay CUHK CSE CAD Group Meeting One Evangeline Young Aug 19, 2003.
Shortest Paths Definitions Single Source Algorithms –Bellman Ford –DAG shortest path algorithm –Dijkstra All Pairs Algorithms –Using Single Source Algorithms.
Topics: 1. Trees - properties 2. The master theorem 3. Decoders מבנה המחשב - אביב 2004 תרגול 4#
Pipelining and Retiming 1 Pipelining  Adding registers along a path  split combinational logic into multiple cycles  increase clock rate  increase.
Spring 08, Feb 28 ELEC 7770: Advanced VLSI Design (Agrawal) 1 ELEC 7770 Advanced VLSI Design Spring 2008 Retiming Vishwani D. Agrawal James J. Danaher.
Penn ESE Fall DeHon 1 ESE (ESE534): Computer Organization Day 19: March 26, 2007 Retime 1: Transformations.
Linear programming maximize x 1 + x 2 x 1 + 3x 2  3 3x 1 + x 2  5 x 1  0 x 2  0.
1 Advanced Algorithms All-pairs SPs DP algorithm Floyd-Warshall alg.
EE290A 1 Retiming of AND- INVERTER graphs with latches Juliet Holwill 290A Project 10 May 2005.
Continuous Retiming EECS 290A Sequential Logic Synthesis and Verification.
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.
Shortest Paths Definitions Single Source Algorithms
Retiming with Interconnect and Gate Delay CUHK CSE CAD Group Dennis Tong 29 th Sept., 2003.
CS294-6 Reconfigurable Computing Day 16 October 15, 1998 Retiming.
Spring 07, Apr 5 ELEC 7770: Advanced VLSI Design (Agrawal) 1 ELEC 7770 Advanced VLSI Design Spring 2007 Retiming Vishwani D. Agrawal James J. Danaher Professor.
Processing Rate Optimization by Sequential System Floorplanning Jia Wang 1, Ping-Chih Wu 2, and Hai Zhou 1 1 Electrical Engineering & Computer Science.
All-Pairs Shortest Paths
ECE Synthesis & Verification 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Retiming.
Algorithmic Transformations
CS 253: Algorithms Chapter 24 Shortest Paths Credit: Dr. George Bebis.
03/08/2005 © J.-H. Jiang1 Retiming and Resynthesis EECS 290A – Spring 2005 UC Berkeley.
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.
Assignment 4. (Due on Dec 2. 2:30 p.m.) This time, Prof. Yao and I can explain the questions, but we will NOT tell you how to solve the problems. Question.
Applied Discrete Mathematics Week 10: Equivalence Relations
SINGLE-SOURCE SHORTEST PATHS. Shortest Path Problems Directed weighted graph. Path length is sum of weights of edges on path. The vertex at which the.
1 WEEK 9-10 Graphs II Unweighted Shortest Paths Dijkstra’s Algorithm Graphs with negative costs Acyclic Graphs Izmir University of Economics.
Design Techniques for Approximation Algorithms and Approximation Classes.
Theory of Computing Lecture 13 MAS 714 Hartmut Klauck.
Binary Search From solving a problem to verifying an answer.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 24: April 18, 2011 Covering and Retiming.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 7: February 3, 2002 Retiming.
ELEC692 VLSI Signal Processing Architecture Lecture 3
1 Retiming and Re-synthesis Outline: RetimingRetiming Retiming and Resynthesis (RnR)Retiming and Resynthesis (RnR) Resynthesis of PipelinesResynthesis.
Pipelining and Retiming
Implicit Hitting Set Problems Richard M. Karp Erick Moreno Centeno DIMACS 20 th Anniversary.
Static Timing Analysis
Theory of Computing Lecture 12 MAS 714 Hartmut Klauck.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Introduction to NP Instructor: Neelima Gupta 1.
Retiming EECS 290A Sequential Logic Synthesis and Verification.
Min-Register Retiming Under Simultaneous Timing and Initial State Constraints Aaron Hurst Dec
Lecture 20. Graphs and network models 1. Recap Binary search tree is a special binary tree which is designed to make the search of elements or keys in.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 25: April 17, 2013 Covering and Retiming.
VLSI Physical Design Automation
CS137: Electronic Design Automation
James D. Z. Ma Department of Electrical and Computer Engineering
ELEC 7770 Advanced VLSI Design Spring 2012 Retiming
Vishwani D. Agrawal James J. Danaher Professor
SINGLE-SOURCE SHORTEST PATHS
ESE535: Electronic Design Automation
Algorithms (2IL15) – Lecture 5 SINGLE-SOURCE SHORTEST PATHS
Minimum Spanning Tree Algorithms
All pairs shortest path problem
ESE535: Electronic Design Automation
5.4 T-joins and Postman Problems
ELEC 7770 Advanced VLSI Design Spring 2016 Retiming
Timing Analysis and Optimization of Sequential Circuits
Bellman Ford.
Fast Min-Register Retiming Through Binary Max-Flow
Presentation transcript:

1 Retiming Outline: ProblemProblem FormulationFormulation Retiming algorithmRetiming algorithm

2 Optimizing Sequential Circuits by Retiming Netlist of Gates Netlist of gates and registers: Various Goals: –Reduce clock cycle time –Reduce area Reduce number of latches (registers)Reduce number of latches (registers) Inputs Outputs

3 Retiming Problem –Pure combinational optimization can be myopic since relations across register boundaries are disregarded Solutions –Retiming: Move register(s) so that clock cycle decreases, or number of registers decreases andclock cycle decreases, or number of registers decreases and input-output behavior is preservedinput-output behavior is preserved –RnR: Combine retiming with combinational optimization techniques Move latches out of the way temporarilyMove latches out of the way temporarily optimize larger blocks of combinationaloptimize larger blocks of combinational

4 Circuit Represetation [Leiserson, Rose and Saxe (1983)] Circuit representation: G(V,E,d,w) –V  set of gates –E  set of wires –d(v) = delay of gate/vertex v, (d(v)  0) –w(e) = number of registers on edge e, (w(e)  0)

5 Circuit Representation Example: Correlator Circuit  (x, y) = 1 if x=y 0 otherwise Operation delay  3  Every cycle in Graph has at least one register i.e. no combinational loops Graph (Directed) 7a b+ Host

6 Preliminaries For a path p : Clock cycle For correlator c = 13 Path with w(p)=

7 Movement of registers from input to output of a gate or vice versaMovement of registers from input to output of a gate or vice versa Does not affect gate functionalitiesDoes not affect gate functionalities A mathematical definition: retardationA mathematical definition: retardation –r: V  Z, an integer vertex labeling –w r (e) = w(e) + r(v) - r(u) for edge e = (u,v) Basic Operation Retime by 1 Retime by -1

8 Thus in the example, r(u) = -1, r(v) = -1 results in For a path p: s  t, w r (p) = w(p) + r(t) - r(s)For a path p: s  t, w r (p) = w(p) + r(t) - r(s) RetardationRetardation –r: V  Z, an integer vertex labeling –w r (e) = w(e) + r(v) - r(u) for edge e=(u,v) –A retiming r is legal if w r (e)  0,  e  E (prove it !) Basic Operation vu v u

9 Retiming for minimum clock cycle Problem Statement: (minimum cycle time) Given G (V, E, d, w), find a legal retiming r so that is minimized Retiming: 2 important matrices Register weight matrixRegister weight matrix Delay matrixDelay matrix

10 Retiming for minimum clock cycle W V0 V1 V2 V3 V0V1V2V c     p, if d(p)   then w(p)  1 D V0 V1 V2 V3 V0V1V2V W = register path weight matrix (minimum # latches (minimum # latches on all paths between on all paths between u and v) u and v) D = path delay matrix (maximum delay on (maximum delay on all paths between all paths between u and v) u and v) v2 v1 v v3

11 Conditions for Retiming Assume that we are asked to check if a retiming exists for a clock cycle  Legal retiming: w r (e)  0 for all e. Hence w r (e) = w(e) + r(v) - r(u)  0 or r (u) - r (v)  w (e) For all paths p: u  v such that d(p)  , we require w r (p)  1 –Thus Or take the least w(p) (tightest constraint) r(u)-r(v)  W(u,v)-1 Note: this is independent of the path from u to v, so we just need to apply it to u, v such that D(u,v)  

12 All constraints in difference-of-2-variable formAll constraints in difference-of-2-variable form Related to longest/shortest path problemRelated to longest/shortest path problem Solving the constraints Correlator: Correlator:  = 7 Legal: r(u)-r(v)  w(e) D>7: r(u)-r(v)  W(u,v)-1 W V0 V1 V2 V3 V0V1V2V D V0 V1 V2 V3 V0V1V2V V2 v1 v v3

13 Do shortest path on constraint graph: (O(|V| 3 )).Do shortest path on constraint graph: (O(|V| 3 )). A solution exists if and only if there exists no negative weighted cycle.A solution exists if and only if there exists no negative weighted cycle. Solving the constraints Legal: r(u)-r(v)  w(e) D>7: r(u)-r(v)  W(u,v)-1 A solution is r(v 0 ) = r(v 3 ) = 0, r(v 1 ) = r(v 2 ) = -1 r(1) r(0) r(3)r(2) ,-1 0, Constraint graph

14 Retiming To find the minimum cycle time, do a binary search among the entries of the D matrix (0(  V  3 log  V  )) Retime Retimed correlator: Clock cycle = 3+3+7=13 = 3+3+7=13 Clock cycle = 7 V2 v1 v a b +  Host a b +  Host W V0 V1 V2 V3 V0V1V2V D V0 V1 V2 V3 V0V1V2V

15 1. Relaxation based: –Repeatedly find critical path; –retime vertex at end of path by +1 (O(  V  E  log  V  )) 2. Also, Mixed Integer Linear Program formulation Retiming: 2 more algorithms +1 u Critical path v

16 Retiming for minimum area (minimum # latches) Goal: minimize number of registers used where a v is a constant.

17 Minimize: Minimum registers - formulation Subject to: w r (e) =w(e) + r(v) - r(u)  0 Reducible to a flow problemReducible to a flow problem