Transcript Lecture 11
ELEC 5970-001/6970-001(Fall 2005) Special Topics in Electrical Engineering Low-Power Design of Electronic Circuits Power Analysis: Probabilistic Methods Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and Computer Engineering Auburn University http://www.eng.auburn.edu/~vagrawal [email protected] 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 1 Basic Idea • View signals as a random processes Prob{s(t) = 1} = p1 p0 = 1 – p1 C 0→1 transition probability = (1 – p1) p1 Power, P = (1 – p1) p1 CV2fck 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 2 Source of Inaccuracy p1 = 0.5 P = 0.5CV2fck 1/fck p1 = 0.5 P = 0.33CV2fck p1 = 0.5 P = 0.167CV2fck Observe that the formula, Power, P = (1 – p1) p1 CV2fck, is not Correct. 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 3 Switching Frequency Number of transitions per unit time: T = N(t) ─── t For a continuous signal: T = lim t→∞ N(t) ─── t T is defined as the transition density. 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 4 Static Signal Probabilities • Observe signal for interval t0 + t1 – Signal is 1 for duration t1 – Signal is 0 for duration t0 – Signal probabilities: • p1 = t1/(t0 + t1) • p0 = t0/(t0 + t1) = 1 – p1 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 5 Static Transition Probabilities • Transition probabilities: • T01 = p0 Prob{signal is 1 | signal was 0} = p0 p1 • T10 = p1 Prob{signal is 0 | signal was 1} = p1 p0 • T = T01 + T10 = 2 p0 p1 = 2 p1 (1 – p1) • Transition density: T = 2 p1 (1 – p1) • Transition frequency: f = T/ 2 • Power = CV2T/ 2 (correct formula) 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 6 Static Transition Frequency f = p1(1 – p1) 0.25 0.2 0.1 0.0 0 10/4-6/05 0.25 0.5 p1 0.75 ELEC 5970-001/6970-001 Lecture 11 1.0 7 Inaccuracy in Transition Density p1 = 0.5 T = 1.0 1/fck p1 = 0.5 T = 4/6 p1 = 0.5 T = 1/6 Observe that the formula, T = 2 p1 (1 – p1), is not correct. 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 8 Cause for Error and Correction • Probability of transition is not independent of the present state of the signal. • Consider probability p01of a 0→1 transition, • Then p01 ≠ p0 p1 • We can write p1 = (1 – p1)p01 + p1 p11 p01 p1 = ───────── 1 – p11 + p01 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 9 Correction (Cont.) • Since p11 + p10 = 1, i.e., given that the signal was previously 1, its present value can be either 1 or 0. • Therefore, p01 p1 = ────── p10 + p01 This uniquely gives signal probability as a function of transition probabilities. 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 10 Transition and Signal Probabilities p01 = p10 = 0.5 p1 = 0.5 1/fck p01 = p10 = 1/3 p1 = 0.5 p01 = p10 = 1/6 p1 = 0.5 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 11 Probabilities: p0, p1, p00, p01, p10, p11 • p01 + p00 =1 • p11 + p10 = 1 • p0 = 1 – p1 • p01 p1 = ────── p10 + p01 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 12 Transition Density • T = 2 p1(1 – p1) = p0 p01 + p1 p10 = 2 p10 p01/(p10 + p01) = 2 p1 p10 = 2 p0 p01 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 13 Power Calculation • Power can be estimated if transition density is known for all signals. • Calculation of transition density requires – Signal probabilities – Transition densities for primary inputs; computed from vector statistics 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 14 Signal Probabilities x1 x1 x2 x2 x1 x1 + x2 – x1x2 x2 1 - x1 x1 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 15 Signal Probabilities x1 x2 x3 X1 0 0 0 0 1 1 1 1 10/4-6/05 X2 0 0 1 1 0 0 1 1 0.5 x1 x2 0.25 0.5 0.625 0.5 X3 0 1 0 1 0 1 0 1 Y 1 0 1 0 1 0 1 1 y = 1 - (1 - x1x2) x3 = 1 - x3 + x1x2x3 = 0.625 Ref: K. P. Parker and E. J. McCluskey, “Probabilistic Treatment of General Combinational Networks,” IEEE Trans. on Computers, vol. C-24, no. 6, pp. 668670, June 1975. ELEC 5970-001/6970-001 Lecture 11 16 Correlated Signal Probabilities x1 0.5 x1 x2 0.5 0.25 0.625? x2 X1 0 0 1 1 10/4-6/05 X2 0 1 0 1 Y 1 0 1 1 ELEC 5970-001/6970-001 Lecture 11 y = 1 - (1 - x1x2) x2 = 1 – x2 + x1x2x2 = 1 – x2 + x1x2 = 0.75 17 Correlated Signal Probabilities x1 x2 X1 0 0 1 1 10/4-6/05 0.5 x1 + x2 – x1x2 0.5 0.75 X2 0 1 0 1 Y 0 1 0 1 ELEC 5970-001/6970-001 Lecture 11 0.375? y = (x1 + x2 – x1x2) x2 = x1x2 + x2x2 – x1x2x2 = x1x2 + x2 – x1x2 = x2 = 0.5 18 Observation • Numerical computation of signal probabilities is accurate for fanout-free circuits. 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 19 Remedies • Use Shannon’s expansion theorem to compute signal probabilities. • Use Boolean difference formula to compute transition densities. 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 20 Shannon’s Expansion Theorem • C. E. Shannon, “A Symbolic Analysis of Relay and Switching Circuits,” Trans. AIEE, vol. 57, pp. 713-723, 1938. • Consider: • Boolean variables, X1, X2, . . . , Xn • Boolean function, F(X1, X2, . . . , Xn) • Then F = Xi F(Xi=1) + Xi’ F(Xi=0) • Where • Xi’ is complement of X1 • Cofactors, F(Xi=j) = F(X1, X2, . . , Xi=j, . . , Xn), j = 0 or 1 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 21 Expansion About Two Inputs • F = XiXj F(Xi=1, Xj=1) + XiXj’ F(Xi=1, Xj=0) + Xi’Xj F(Xi=0, Xj=1) + Xi’Xj’ F(Xi=0, Xj=0) • In general, a Boolean function can be expanded about any number of input variables. • Expansion about k variables will have 2k terms. 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 22 Correlated Signal Probabilities X1 X1 X2 Y = X1 X2 + X2’ X2 X1 0 0 1 1 10/4-6/05 X2 0 1 0 1 Y 1 0 1 1 Shannon expansion about the reconverging input: Y = X2 Y(X2=1) + X2’ Y(X2=0) = X2 (X1) + X2’ (1) ELEC 5970-001/6970-001 Lecture 11 23 Correlated Signals • When the output function is expanded about all reconverging input variables, • All cofactors correspond to fanout-free circuits. • Signal probabilities for cofactor outputs can be calculated without error. • A weighted sum of cofactor probabilities gives the correct probability of the output. • For two reconverging inputs: f = xixj f(Xi=1, Xj=1) + xi(1-xj) f(Xi=1, Xj=0) + (1-xi)xj f(Xi=0, Xj=1) + (1-xi)(1-xj) f(Xi=0, Xj=0) 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 24 Correlated Signal Probabilities X1 X1 X2 Y = X1 X2 + X2’ X2 X1 0 0 1 1 X2 0 1 0 1 Y 1 0 1 1 Shannon expansion about the reconverging input: Y = X2 Y(X2=1) + X2’ Y(X2=0) = X2 (X1) + X2’ (1) y = x2 (0.5) + (1-x2) (1) = 0.5 (0.5) + (1-0.5) (1) = 0.75 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 25 Example 0.5 0.5 1 0 0.5 Reconv. signal Supergate 0.25 0.5 0.0 Point of reconv. 0.0 0.5 1.0 0.5 1.0 0.375 Signal probability for supergate output = 0.5 Prob{rec. signal = 1} + 1.0 Prob{rec. signal = 0} = 0.5 × 0.5 + 1.0 × 0.5 = 0.75 S. C. Seth and V. D. Agrawal, “A New Model for Computation of Probabilistic Testability in Combinational Circuits,” Integration, the VLSI Journal, vol. 7, no. 1, pp. 49-75, April 1989. 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 26 Probability Calculation Algorithm • Partition circuit into supergates. • Definition: A supergate is a circuit partition with a single output such that all fanouts that reconverge at the output are contained within the supergate. • Identify reconverging and non-reconverging inputs of each supergate. • Compute signal probabilities from PI to PO: – For a supergate whose input probabilities are known – Enumerate reconverging input states – For each input state do gate by gate probability computation – Sum up corresponding signal probabilities, weighted by state probabilities 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 27 Calculating Transition Density .. .. . 1 x1, T1 xn, Tn 10/4-6/05 Boolean function y, T(Y) = ? n ELEC 5970-001/6970-001 Lecture 11 28 Boolean Difference Boolean diff(Y, Xi) = ∂Y ── = Y(Xi=1) ⊕ Y(Xi=0) ∂Xi • Boolean diff(Y, Xi) = 1 means that a path is sensitized from input Xi to output Y. • Prob(Boolean diff(Y, Xi) = 1) is the probability of transmitting a toggle from Xi to Y. • Probability of Boolean difference is determined from the probabilities of cofactors of Y with respect to Xi. F. F. Sellers, M. Y. Hsiao and L. W. Bearnson, “Analyzing Errors with the Boolean Difference,” IEEE Trans. on Computers, vol. C-17, no. 7, pp. 676-683, July 1968. 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 29 Transition Density n T(y) = Σ T(Xi) Prob(Boolean diff(Y, Xi) = 1) i=1 F. Najm, “Transition Density: A New Measure of Activity in Digital Circuits,” IEEE Trans. CAD, vol. 12, pp. 310-323, Feb. 1993. 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 30 Power Computation • For each primary input, determine signal probability and transition density for given vectors. • For each internal node and primary output Y, find the transition density T(Y), using supergate partitioning and the Boolean difference formula. • Compute power, Σ 0.5CY V2 T(Y) all Y where CY is the capacitance of node Y and V is supply voltage. P= 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 31 Transition Density and Power X1 X2 X3 0.2, 1 0.3, 2 0.06, 0.7 0.436, 3.24 Ci Y 0.4, 3 CY Transition density Signal probability Power = 0.5 V2 (0.7Ci + 3.24CY) 10/4-6/05 ELEC 5970-001/6970-001 Lecture 11 32 Prob. Method vs. Logic Sim. Probability method Logic Simulation Av. density CPU s* Error % 0.52 3.39 63 +2.1 11.36 0.58 8.57 241 +29.8 383 2.78 1.06 3.25 132 -14.5 C1355 346 4.19 1.39 6.18 408 -32.2 C1908 880 2.97 2.00 5.01 464 -40.7 C2670 1193 3.50 3.45 4.00 619 -12.5 C3540 1669 4.47 3.77 4.49 1082 -0.4 C5315 2307 3.52 6.41 4.79 1616 -26.5 C6288 2406 25.10 5.67 34.17 31057 -26.5 3.83 9.85 5.08 2713 -24.2 Circuit No. of gates C432 160 3.46 C499 202 C880 C7552 3512 * CONVEX c240 10/4-6/05 Av. density CPU s* ELEC 5970-001/6970-001 Lecture 11 33