Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 Retiming

2 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 ns = 11 ns. D-FF X Y Z F XOR D-FF

3 Why Are They Not Equivalent? Suppose FFs are initialized to 0 D-FF X Y Z F XOR D-FF X Y Z F XOR D-FF P 0 0 0 0 1 1 1 0 Z Y X F 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 0 0 0 0 1 1 1 0 Z Y X F 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0011

4 Are These Equivalent? Suppose FFs are initialized to 0 D-FF X Y Z F XOR D-FF X Y Z F XOR D-FF P 0 0 0 0 1 1 1 0 Z Y X F 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 0 0 1 1 1 0 Z Y X F 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0101 1 fewer D-FF But same delay

5 Basic Idea of Retiming X D-FF If you have 2 FFs at the inputs, you can move it to the output Or if you have a FF at the output, you can move it to the inputs In general, can move N FFs from inputs to output, and vice versa Y D-FF F X Y F

6 Example XOR How to move FFs around to minimize clock period? (assuming T pcq = T setup = 0)

7 Graph Model 333 1111 0 0 0 0 0 0 0 0 1 11 1 Vertex vi, combinational node, delay = d(vi) All inputs and outputs connect through a faux node “host” with d(host) = 0 Edge e(vi, vj) or eij, weight wij = number of flip-flops between vi and vj

8 Path Delay and Path Weight A set of connected nodes specify a path Path delay = ∑ d(vi) = comb. delay of path Path weight = ∑ wij = # FFs along the path Retiming of a node i denoted by an integer ri –It represents the number of registers moved across, initially ri = 0 –Register moved from output to input, ri → ri + 1 –Register moved from input to output, ri → ri – 1 –After retiming, edge weight wij’ = wij + rj – ri

9 9 Example 333 1111 0 0 0 0 0 0 0 1 11 1 a b c d e f g h Initial retiming vector = {0,0,0,0,0,0,0,0} Critical path delay = 10 r(h)=0 r(b)=0r(c)=0r(d)=0 r(e)=0 r(f)=0 r(g)=0 0 r(a)= 0

10 Retimed Example 333 1111 0 0→1 0 0 0 1→0 1 1 a b c d e f g h Optimal retiming vector = {-1,-1,-2,-2,-2,-1,0,0} Critical path delay = 5 0 r(h)=0 r(a)= –1r(b)= – 1r(c)= –2r(d)= –2 r(e)= –2 r(f)= –1 r(g)=0

11 Optimized Circuit XOR

12 Retiming Theorem Given a network G(V, E) and a cycle time T, (r1, r2,... ) is a feasible retiming if and only if: ri – rj ≤ wij for all edges ri – rj ≤ W(vi, vj) – 1 for all node-pairs (vi, vj) such that D(vi, vj) > T where W(vi, vj) is the minimum weight path between vi and vj D(vi, vj) is the maximum delay among all minimum weight paths between vi and vj. Above is a Linear Program, which can tested for feasibility for a given T. Binary search over possible cycle time T.

13 Retiming & Resynthesis

14 Initial State X 0 What should be the new initial state? Y 0 F X Y F 0

15 Cannot Always Recover Initial State 0 1 0 1 Cannot always get exactly the same initial state behavior on the retimed circuit For some applications, a startup transient may not be a problem ? 1 1 1 1 1 1 1


Download ppt "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."

Similar presentations


Ads by Google