CS137: Electronic Design Automation

Slides:



Advertisements
Similar presentations
ECE 667 Synthesis and Verification of Digital Circuits
Advertisements

Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Sequential Synthesis.
Chapter 4 Retiming.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 14: March 3, 2004 Scheduling Heuristics and Approximation.
Caltech CS184a Fall DeHon1 CS184a: Computer Architecture (Structures and Organization) Day17: November 20, 2000 Time Multiplexing.
Penn ESE Spring DeHon 1 ESE (ESE534): Computer Organization Day 21: April 2, 2007 Time Multiplexing.
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 ESE Fall DeHon 1 ESE (ESE534): Computer Organization Day 19: March 26, 2007 Retime 1: Transformations.
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.
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.
MAX FLOW CS302, Spring 2013 David Kauchak. Admin.
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 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)
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 7: February 3, 2002 Retiming.
MAX FLOW APPLICATIONS CS302, Spring 2012 David Kauchak.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
CS 361 – Chapter 16 Final thoughts on minimum spanning trees and similar problems Flow networks Commitment: –Decide on presentation order.
ELEC692 VLSI Signal Processing Architecture Lecture 3
CS223 Advanced Data Structures and Algorithms 1 Maximum Flow Neil Tang 3/30/2010.
Pipelining and Retiming
Caltech CS184a Fall DeHon1 CS184a: Computer Architecture (Structures and Organization) Day16: November 15, 2000 Retiming Structures.
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 15: March 13, 2013 High Level Synthesis II Dataflow Graph Sharing.
Instructor Neelima Gupta Edited by Divya Gaur(39, MCS '09) Thanks to: Bhavya(9), Deepika(10), Deepika Bisht(11) (MCS '09)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 25: April 17, 2013 Covering and Retiming.
CS137: Electronic Design Automation
St. Edward’s University
Vishwani D. Agrawal James J. Danaher Professor
The minimum cost flow problem
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
C.Eng 213 Data Structures Graphs Fall Section 3.
CS137: Electronic Design Automation
Algorithm Design and Analysis
Algorithms and Networks
Structural testing, Path Testing
CS137: Electronic Design Automation
James D. Z. Ma Department of Electrical and Computer Engineering
ESE535: Electronic Design Automation
1.3 Modeling with exponentially many constr.
Day 26: November 1, 2013 Synchronous Circuits
Instructor: Shengyu Zhang
Analysis of Algorithms
Integer Programming (정수계획법)
ESE535: Electronic Design Automation
Richard Anderson Lecture 30 NP-Completeness
CprE / ComS 583 Reconfigurable Computing
1.3 Modeling with exponentially many constr.
CS184a: Computer Architecture (Structures and Organization)
Flow Networks and Bipartite Matching
ESE535: Electronic Design Automation
Integer Programming (정수계획법)
ESE535: Electronic Design Automation
Constraint satisfaction problems
ESE535: Electronic Design Automation
Algorithms (2IL15) – Lecture 7
Chapter 6 Network Flow Models.
Algorithms and Networks
Timing Analysis and Optimization of Sequential Circuits
CS137: Electronic Design Automation
Fast Min-Register Retiming Through Binary Max-Flow
Constraint satisfaction problems
CS137: Electronic Design Automation
Presentation transcript:

CS137: Electronic Design Automation Day 11: October 21, 2005 Retiming CALTECH CS137 Fall2005 -- DeHon

Today Retiming Cycle time (clock period) C-slow Initial states Register minimization Necessary delays (time permitting) CALTECH CS137 Fall2005 -- DeHon

Task Move registers to: Preserve semantics Minimize path length between registers (make path length 1 for maximum throughput or reuse) Maximize reuse rate …while minimizing number of registers required CALTECH CS137 Fall2005 -- 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 CALTECH CS137 Fall2005 -- 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... CALTECH CS137 Fall2005 -- DeHon

Simple Example Path Length (L) = 4 Can we do better? CALTECH CS137 Fall2005 -- DeHon

Legal Register Moves Retiming Lag/Lead CALTECH CS137 Fall2005 -- DeHon

Canonical Graph Representation Separate arc for each path Weight edges by number of registers (weight nodes by delay through node) CALTECH CS137 Fall2005 -- DeHon

Critical Path Length Critical Path: Length of longest path of zero weight nodes Compute in O(|E|) time by levelizing network: Topological sort, push path lengths forward until find register. CALTECH CS137 Fall2005 -- DeHon

Retiming Lag/Lead Retiming: Assign a lag to every vertex weight(e) = weight(e) + lag(head(e))-lag(tail(e)) CALTECH CS137 Fall2005 -- 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) CALTECH CS137 Fall2005 -- 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 CALTECH CS137 Fall2005 -- DeHon

Retiming Transformation N.B.: unchanged by 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 CALTECH CS137 Fall2005 -- 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 CALTECH CS137 Fall2005 -- 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 CALTECH CS137 Fall2005 -- DeHon

G-1/c CALTECH CS137 Fall2005 -- 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 CALTECH CS137 Fall2005 -- 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 CALTECH CS137 Fall2005 -- DeHon

Apply to Example CALTECH CS137 Fall2005 -- DeHon

Try c=1 CALTECH CS137 Fall2005 -- DeHon

Apply: Find Lags Negative weight cycles? Shortest paths? CALTECH CS137 Fall2005 -- DeHon

Apply: Lags CALTECH CS137 Fall2005 -- DeHon

Apply: Move Registers 1 1 1 1 1 weight(e) = weight(e) + lag(head(e))-lag(tail(e)) CALTECH CS137 Fall2005 -- DeHon

Apply: Retimed CALTECH CS137 Fall2005 -- DeHon

Apply: Retimed Design CALTECH CS137 Fall2005 -- DeHon

Revise Example (fanout delay) CALTECH CS137 Fall2005 -- DeHon

Revised: Graph CALTECH CS137 Fall2005 -- DeHon

Revised: Graph CALTECH CS137 Fall2005 -- DeHon

Revised: C=1? CALTECH CS137 Fall2005 -- DeHon

Revised: C=2? CALTECH CS137 Fall2005 -- DeHon

Revised: Lag CALTECH CS137 Fall2005 -- DeHon

Revised: Lag Take ceiling to convert to integer lags: -1 -1 CALTECH CS137 Fall2005 -- DeHon

Revised: Apply Lag -1 -1 CALTECH CS137 Fall2005 -- DeHon

Revised: Apply Lag -1 -1 1 1 1 1 1 1 1 1 CALTECH CS137 Fall2005 -- DeHon

Revised: Retimed 1 1 1 1 1 1 1 1 CALTECH CS137 Fall2005 -- DeHon

Pipelining We can use this retiming to pipeline Assume we have enough (infinite supply) registers at edge of circuit Retime them into circuit CALTECH CS137 Fall2005 -- DeHon

C>1 ==> Pipeline CALTECH CS137 Fall2005 -- DeHon

Add Registers G n 1 CALTECH CS137 Fall2005 -- DeHon

Add Registers n 1 G G-1/1 CALTECH CS137 Fall2005 -- DeHon

Pipeline Retiming: Lag CALTECH CS137 Fall2005 -- DeHon

Pipelined Retimed CALTECH CS137 Fall2005 -- DeHon

Real Cycle CALTECH CS137 Fall2005 -- DeHon

Real Cycle CALTECH CS137 Fall2005 -- DeHon

Cycle C=1? CALTECH CS137 Fall2005 -- DeHon

Cycle C=2? CALTECH CS137 Fall2005 -- DeHon

Cycle: C-slow Cycle=c  C-slow network has Cycle=1 CALTECH CS137 Fall2005 -- DeHon

2-slow Cycle  C=1 CALTECH CS137 Fall2005 -- DeHon

2-Slow Lags CALTECH CS137 Fall2005 -- DeHon

2-Slow Retime CALTECH CS137 Fall2005 -- DeHon

Retimed 2-Slow Cycle CALTECH CS137 Fall2005 -- DeHon

C-Slow applicable? Available parallelism Commutative operators solve C identical, independent problems e.g. process packets (blocks) separately e.g. independent regions in images Commutative operators e.g. max example CALTECH CS137 Fall2005 -- DeHon

Max Example CALTECH CS137 Fall2005 -- DeHon

Max Example CALTECH CS137 Fall2005 -- DeHon

Note Algorithm/examples shown For general delay, for special case of unit-delay nodes For general delay, a bit more complicated still polynomial CALTECH CS137 Fall2005 -- DeHon

Initial State What about initial state? 1 1 CALTECH CS137 Fall2005 -- DeHon

Initial State CALTECH CS137 Fall2005 -- DeHon

Initial State 1 1 1 In general, constraints  satisfiable? 1 1 1 In general, constraints  satisfiable? CALTECH CS137 Fall2005 -- DeHon

Initial State 0,1? 1 1 1 CALTECH CS137 Fall2005 -- 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 init=0 Cycle1: 1 Cycle2: /(/init*/in)=in init=1 Cycle1: 0 Cycle2: /(/init*/in)=1 CALTECH CS137 Fall2005 -- 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 CALTECH CS137 Fall2005 -- DeHon

Minimize Registers CALTECH CS137 Fall2005 -- 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 CALTECH CS137 Fall2005 -- DeHon

Minimize Registers Can be formulated as flow problem Can add cycle time constraints to flow problem Time: O(|V||E|log(|V|)log|(|V|2/|E|)) CALTECH CS137 Fall2005 -- DeHon

HSRA Retiming HSRA One additional twist adds mandatory pipelining to interconnect One additional twist long, pipelined interconnect  need more than one register on paths CALTECH CS137 Fall2005 -- DeHon

Accommodating HSRA Interconnect Delays Add buffers to LUTLUT path to match interconnect register requirements Retime to C=1 as before Buffer chains force enough registers to cover interconnect delays CALTECH CS137 Fall2005 -- DeHon

Accommodating HSRA Interconnect Delays CALTECH CS137 Fall2005 -- 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 Compute multithreaded computations Minimize registers Watch out for initial values Can accommodate mandatory delays CALTECH CS137 Fall2005 -- DeHon

Admin Homework Due Today No class on Monday and Wednesday Class next Friday CALTECH CS137 Fall2005 -- DeHon

Big Ideas Exploit freedom Formulate transformations (lag assignment) Express legality constraints Technique: graph algorithms network flow CALTECH CS137 Fall2005 -- DeHon