Algorithm Search⌘K

Definitionintro

Switching activity

Also called toggle rate, activity factor.

The expected number of transitions of a signal per clock cycle, the main unknown in estimating the dynamic power of a circuit.

The switching activity of a node in a synchronous digital circuit is the expected number of its transitions per clock cycle. It is the factor α\alpha of the dynamic power αCVDD2f\alpha C V_{DD}^2 f, and the one factor that depends on what the circuit computes: capacitance, voltage and frequency are known from the design, while the activity depends on the input data and on the logic. Two conventions exist. The rising activity α0→1\alpha_{0 \to 1} counts only transitions from 0 to 1, which are the ones that draw charge from the supply, and the toggle rate counts all transitions. Both include glitches, the extra transitions within a cycle, unless the zero-delay model is assumed. This page defines the measure; signal probability propagation, transition density, BDD-based estimation and Monte Carlo estimation are methods that compute or estimate it.

Definition

Let yy be a node of a circuit clocked at frequency ff, and let RkR_k and FkF_k be the numbers of rising and falling transitions of yy during clock cycle kk, as random variables of the input data.

Switching activity. The rising activity and the toggle rate of yy are

α0→1(y)  =  lim⁡K→∞1K∑k=1KE[Rk],α(y)  =  lim⁡K→∞1K∑k=1KE[Rk+Fk],\alpha_{0 \to 1}(y) \;=\; \lim_{K \to \infty} \frac{1}{K} \sum_{k=1}^{K} E[R_k], \qquad \alpha(y) \;=\; \lim_{K \to \infty} \frac{1}{K} \sum_{k=1}^{K} E[R_k + F_k],

when the limits exist. They are numbers of transitions per cycle, not probabilities: a node with glitches can have α(y)>1\alpha(y) > 1.

Zero-delay activity. Under the zero-delay model each node takes one value per cycle, yky_k, and changes at most once per cycle. If the sequence (yk)(y_k) is stationary, then

α(y)  =  P(yk≠yk+1),α0→1(y)  =  P(yk=0, yk+1=1).\alpha(y) \;=\; P(y_k \ne y_{k+1}), \qquad \alpha_{0 \to 1}(y) \;=\; P(y_k = 0,\ y_{k+1} = 1).

Fact 1 (rising is half of all). For a stationary zero-delay sequence, α0→1(y)=α1→0(y)=α(y)/2\alpha_{0 \to 1}(y) = \alpha_{1 \to 0}(y) = \alpha(y) / 2.

Proof. Stationarity gives P(yk+1=1)=P(yk=1)P(y_{k+1} = 1) = P(y_k = 1). The left side is P(yk=0,yk+1=1)+P(yk=1,yk+1=1)P(y_k = 0, y_{k+1} = 1) + P(y_k = 1, y_{k+1} = 1) and the right side is P(yk=1,yk+1=0)+P(yk=1,yk+1=1)P(y_k = 1, y_{k+1} = 0) + P(y_k = 1, y_{k+1} = 1), so the two transition probabilities are equal, and each is half of P(yk≠yk+1)P(y_k \ne y_{k+1}). □\square

The same holds with glitches in the long run, since rising and falling transitions alternate. So Pdyn=α0→1CVDD2f=12α CVDD2fP_{\mathrm{dyn}} = \alpha_{0 \to 1} C V_{DD}^2 f = \frac{1}{2} \alpha\, C V_{DD}^2 f, and the two conventions differ by a factor of 2.

Fact 2 (activity, probability and correlation). For a stationary zero-delay sequence with p=P(yk=1)∈(0,1)p = P(y_k = 1) \in (0, 1) and lag-one correlation coefficient ρ\rho between yky_k and yk+1y_{k+1},

α(y)  =  2 p (1−p) (1−ρ).\alpha(y) \;=\; 2\, p\, (1 - p)\, (1 - \rho).

Proof. For 0-1 values, [yk≠yk+1]=(yk−yk+1)2[y_k \ne y_{k+1}] = (y_k - y_{k+1})^2. Its expectation is Var(yk)+Var(yk+1)−2 Cov(yk,yk+1)=2p(1−p)−2ρ p(1−p)\mathrm{Var}(y_k) + \mathrm{Var}(y_{k+1}) - 2\, \mathrm{Cov}(y_k, y_{k+1}) = 2 p (1 - p) - 2 \rho\, p (1 - p), using that the two means are equal. □\square

So the activity depends on the signal probability pp and also on how the signal is correlated in time. For temporally independent values (ρ=0\rho = 0) it is 2p(1−p)2 p (1 - p), at most 1/21/2. A signal that alternates every cycle has ρ=−1\rho = -1 and α=1\alpha = 1; a constant signal or one that changes very rarely has ρ\rho near 1 and α\alpha near 0.

Examples and non-examples

A random bit. A fresh fair bit each cycle has p=1/2p = 1/2 and ρ=0\rho = 0, so α=1/2\alpha = 1/2 and α0→1=1/4\alpha_{0 \to 1} = 1/4.

An AND gate. With two fresh fair inputs, P(y=1)=1/4P(y = 1) = 1/4, and values in different cycles are independent, so α=2⋅14⋅34=3/8\alpha = 2 \cdot \frac{1}{4} \cdot \frac{3}{4} = 3/8 and α0→1=3/16\alpha_{0 \to 1} = 3/16. The gate is less active than its inputs because its output is mostly 0.

A binary counter. Bit kk of a counter that increments every cycle toggles once every 2k2^k cycles, so α=2−k\alpha = 2^{-k} and α0→1=2−(k+1)\alpha_{0 \to 1} = 2^{-(k+1)}. The bits together toggle ∑k=0m−12−k<2\sum_{k=0}^{m-1} 2^{-k} < 2 times per cycle. A Gray code counter toggles exactly one bit per step, so its total activity is 1. Here the activity of each bit is far from 2p(1−p)2 p (1 - p): bit 0 has p=1/2p = 1/2 and α=1\alpha = 1, because it alternates.

A clock. A clock rises and falls once per cycle, so α=2\alpha = 2 and α0→1=1\alpha_{0 \to 1} = 1. It is the most active net of a design, and clock power is often a large part of the total.

A glitch. For y=AND(a,aˉ)y = \mathrm{AND}(a, \bar a) with a delay on the inverter, yy is always 0 under zero delay, so its zero-delay activity is 0. With the delay, each rising edge of aa makes a short pulse on yy, two transitions, so the true activity is α(y)=2α0→1(a)=α(a)\alpha(y) = 2 \alpha_{0 \to 1}(a) = \alpha(a), and α0→1(y)=α0→1(a)\alpha_{0 \to 1}(y) = \alpha_{0 \to 1}(a). Glitches are part of the activity and of the power; see glitch power.

Non-example: signal probability. P(y=1)P(y = 1) alone does not fix the activity. A node with P(y=1)=1/2P(y = 1) = 1/2 can switch every cycle (ρ=−1\rho = -1, α=1\alpha = 1) or almost never (ρ\rho near 1).

Non-example: toggle coverage. In verification, toggle coverage records whether each bit went from 0 to 1 and back at least once in a test. It is a yes or no measure of test quality, not a rate, and says nothing about power.

Non-example: transition density. The transition density of a signal is its mean number of transitions per second, a rate in continuous time. In a synchronous circuit it is the activity times the clock frequency, but it is defined also for signals without a clock.

  • Signal probability. P(y=1)P(y = 1), the fraction of cycles in which the node is 1; signal probability propagation computes it. With temporally independent inputs and zero delay it gives the activity by Fact 2.
  • Transition density. The continuous-time rate of transitions, with Najm's propagation rule; see transition density.
  • Glitch activity. The part of α\alpha beyond the zero-delay activity; see glitch power.
  • Hamming distance. For a bus, the number of bits that change between consecutive words is the Hamming distance between them, and its mean is the sum of the bit activities. Bus-invert coding lowers it.
  • Effective capacitance. ∑yα0→1(y)Cy\sum_y \alpha_{0 \to 1}(y) C_y, the switched capacitance per cycle, which multiplied by VDD2fV_{DD}^2 f gives the dynamic power.

References

  1. Anantha P. Chandrakasan, Samuel Sheng and Robert W. Brodersen, Low-power CMOS digital design, IEEE Journal of Solid-State Circuits 27(4), 473 to 484, April 1992, the section on the sources of power dissipation, with the activity factor of rising transitions and its dependence on signal statistics and logic style
  2. Farid N. Najm, A survey of power estimation techniques in VLSI circuits, IEEE Transactions on VLSI Systems 2(4), 446 to 455, December 1994, the definitions of signal probability and of transition activity, and the overview of the methods that estimate them
  3. Abhijit Ghosh, Srinivas Devadas, Kurt Keutzer and Jacob White, Estimation of average switching activity in combinational and sequential circuits, Proceedings of the 29th ACM/IEEE Design Automation Conference, 253 to 259, 1992, the definition of the average switching activity of a gate over pairs of consecutive input vectors

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/FXC7EF/text.yaml