Algorithm Search⌘K

Problemadvanced

Multiple threshold voltage assignment

Also called dual-Vt assignment, multi-Vt optimization.

Choose a low or high threshold voltage cell for each gate so that leakage is least while every timing path still meets its required time.

Multiple threshold voltage assignment is the problem of choosing, for each gate of a circuit, one of a few versions of its cell that differ only in the threshold voltage VTV_T of their transistors, so that the total leakage power is least and every timing path still meets its required time. A low threshold gives a fast cell that leaks much. A high threshold gives a slower cell that leaks much less, often 10 to 20 times less for a step of 100 mV. Most gates of a circuit are not on a critical path, so they can take the high threshold with no loss of speed, and only the gates on the near-critical paths need the low one. Modern libraries offer two to four threshold flavors of every cell, and every flow for low leakage does this assignment. The problem is NP-hard even on a single chain of gates, by a direct reduction from 0-1 knapsack, and on a chain it is exactly a knapsack, so it is NP-hard only in the weak sense there.

In plain words

Each gate comes in two versions with the same function: a fast one that wastes much power even when idle, and a slow one that wastes little. You want the slow version wherever you can afford it.

The catch is the clock. Every path from an input to an output must finish in time. Putting slow gates on a path uses up its spare time, and gates that share many paths use up the spare time of all of them. So the choice is a puzzle: pick which gates to slow down so that the most leakage is saved and no path is late.

Definition

Instance. A combinational circuit as a directed acyclic graph of gates VV, as in static timing analysis. For each gate vv and each threshold flavor tt from a small set, ordered from lowest to highest VTV_T, a delay dt(v)d_t(v) and a leakage ℓt(v)\ell_t(v), with dt(v)d_t(v) not falling and ℓt(v)\ell_t(v) not rising as VTV_T rises. A required time TT at the outputs, with arrival time 0 at the inputs. In the dual case there are two flavors, L and H.

Output. An assignment τ:V→\tau : V \to flavors such that, for every path pp from an input to an output,

∑v∈pdτ(v)(v)≤T,\sum_{v \in p} d_{\tau(v)}(v) \le T,

with the least total leakage ∑v∈Vℓτ(v)(v)\sum_{v \in V} \ell_{\tau(v)}(v). If the all-L assignment misses TT, there is no feasible assignment.

Decision version. Given also a bound BB, is there a feasible assignment with total leakage at most BB?

The fixed delays dt(v)d_t(v) are a simplification. In a real cell the delay also depends on the load, including the wires, whose delay models such as the Elmore delay estimate, on the input slope and on the sizes of the other gates, and the timing of the full circuit is checked by static timing analysis. The leakage ℓt(v)\ell_t(v) is often weighted by the probability of each input state, since the leakage of a cell depends on its inputs.

What is fitted. The subthreshold leakage of a transistor is close to I0e(VGS−VT)/(n vT)I_0 e^{(V_{GS} - V_T)/(n\, v_T)}, where vT=kT/q≈25.9v_T = kT/q \approx 25.9 mV at 300 K is the thermal voltage (here TT is the temperature, a different use of the letter), and the slope factor nn, usually between 1.2 and 1.6, and the prefactor I0I_0 are fitted to measured or simulated devices, as on the leakage power page. With n=1.5n = 1.5, a step of 100 mV in VTV_T cuts the leakage by e0.1/(1.5⋅0.02585)≈13e^{0.1/(1.5 \cdot 0.02585)} \approx 13. The delay follows the alpha-power law of Sakurai and Newton (1990), d∝CVDD/(VDD−VT)ad \propto C V_{DD} / (V_{DD} - V_T)^a, with the exponent aa fitted, between 1 and 2 for short channels. With VDD=1V_{DD} = 1 V, VTV_T of 0.3 V and 0.4 V and a=1.3a = 1.3, the high flavor is slower by (0.7/0.6)1.3≈1.22(0.7/0.6)^{1.3} \approx 1.22. In practice the library gives dtd_t and ℓt\ell_t in tables from characterization, and the formulas only explain their trend.

Variants

  • Dual-Vt and multi-Vt. Two flavors, or three to four flavors such as ultra-low, low, standard and high threshold.
  • With gate sizing. Choose the size and the threshold of each gate together. The delay of a gate then depends on the sizes of the gates it drives, as on the gate sizing page.
  • With supply voltages. Choose both a supply and a threshold for each gate, which adds the level conversion rules of clustered voltage scaling.
  • Per transistor or per stack. Give a high threshold to some transistors of a cell only, for example those in a series stack, at a finer grain than a cell.
  • Statistical. The thresholds vary from die to die and within a die, so the leakage and the delays are random, and the target is a yield or a high percentile of the leakage.
  • Standby and active. In standby, power gating cuts the leakage of whole blocks, and the threshold assignment matters for the leakage while the block is active.

Examples

A small circuit. Gate aa feeds gates bb and cc, which both feed gate dd. The paths are abda b d and acda c d, and T=45T = 45 ps. The table gives the delays in ps and the leakages in nW.

gate dLd_L dHd_H ℓL\ell_L ℓH\ell_H
a 10 12 13 1
b 20 25 39 3
c 10 12 13 1
d 10 12 13 1

With all gates at L the paths take 40 ps and 30 ps, and the leakage is 78 nW. The path abda b d has only 5 ps of slack. Gate bb at H uses all of it, and then aa and dd must stay at L, but cc can go to H: the assignment {b,c}\{b, c\} at H gives delays of 45 ps and 32 ps and a leakage of 30 nW. The other way to use the slack of abda b d is aa and dd at H, 2 ps each, with cc also at H: delays of 44 ps and 36 ps and a leakage of 42 nW. This choice moves three gates to H and saves less than the choice that moves two. An enumeration of all 16 assignments shows that {b,c}\{b, c\} is the unique optimum. Gates aa and dd are on both paths, so each picosecond added to them costs slack on both, while the large gate bb saves the most leakage per picosecond.

A chain is a knapsack. On a chain of gates 1,…,n1, \ldots, n there is one path. With two flavors, moving gate jj to H costs dH(j)−dL(j)d_H(j) - d_L(j) of the slack T−∑jdL(j)T - \sum_j d_L(j) and saves ℓL(j)−ℓH(j)\ell_L(j) - \ell_H(j) of leakage. Choosing the set of gates at H is a 0-1 knapsack with these weights, values and capacity.

Known algorithms

  • Slack-based greedy rules. Wei et al. (1998) give gates off the critical paths the high threshold and keep the critical gates at the low one, guided by the slack of each gate. Later rules rank the gates by leakage saved per unit of delay added, in the manner of TILOS for gate sizing. These are heuristics with no bound on the gap.
  • Lagrangian relaxation. Move the path constraints into the objective with multipliers on the timing arcs, as for gate sizing, and solve each gate on its own for fixed multipliers.
  • Integer linear programming. One 0-1 variable per gate and flavor, with arrival time variables at each gate. Exact, and used for small circuits or for windows of a large one.
  • Knapsack dynamic programming on a chain, with integer delays. Exact in time pseudo-polynomial in TT.

Bounds

Theorem (weak NP-hardness on a chain). The decision version is NP-complete, even when the circuit is a chain and there are two flavors.

Proof. It is in NP: given an assignment, static timing analysis finds the longest path in linear time, and the leakage is a sum. For hardness, reduce from the decision form of 0-1 knapsack: given items 1,…,n1, \ldots, n with positive integer weights wjw_j and values pjp_j, a capacity WW and a target PP, is there a set SS with ∑j∈Swj≤W\sum_{j \in S} w_j \le W and ∑j∈Spj≥P\sum_{j \in S} p_j \ge P? Build a chain of nn gates. Gate jj has dL(j)=1d_L(j) = 1, dH(j)=1+wjd_H(j) = 1 + w_j, ℓL(j)=pj+1\ell_L(j) = p_j + 1 and ℓH(j)=1\ell_H(j) = 1. Set T=n+WT = n + W and B=n+∑jpj−PB = n + \sum_j p_j - P. Let SS be the set of gates at H. The only path has delay n+∑j∈Swjn + \sum_{j \in S} w_j, which is at most TT if and only if ∑j∈Swj≤W\sum_{j \in S} w_j \le W. The leakage is n+∑j∉Spj=n+∑jpj−∑j∈Spjn + \sum_{j \notin S} p_j = n + \sum_j p_j - \sum_{j \in S} p_j, which is at most BB if and only if ∑j∈Spj≥P\sum_{j \in S} p_j \ge P. So the chain has a feasible assignment of leakage at most BB if and only if the knapsack has a set of weight at most WW and value at least PP. The instance has size polynomial in that of the knapsack, with its numbers written in binary. Since 0-1 knapsack is NP-complete (Garey and Johnson, 1979), so is this problem. □\square

Also dL<dHd_L < d_H and ℓL>ℓH\ell_L > \ell_H for every gate, so the hard instances meet the trend of real libraries. A script checked the identity optchain=n+∑jpj−optknapsack\text{opt}_{\text{chain}} = n + \sum_j p_j - \text{opt}_{\text{knapsack}} by enumeration on 300 random small instances with seed 1.

  • Weak, not strong, on a chain. The reduction uses large numbers. Conversely, on a chain with integer delays, the problem is a 0-1 knapsack with capacity T−∑jdL(j)T - \sum_j d_L(j), which a dynamic program solves in O(nT)O(n T) time, pseudo-polynomial. So on chains the problem is not NP-hard in the strong sense unless P = NP. See weak NP-hardness.
  • Not proved here: strong hardness on DAGs. On a general DAG the constraints are one per path, and a gate on many paths takes slack from all of them. This page does not prove that the problem on DAGs with fixed delays is NP-hard in the strong sense, nor does it give a pseudo-polynomial algorithm for it. We leave the question unsettled on this page.
  • Easy cases. If every path meets TT with all gates at H, the all-H assignment is feasible and optimal. If moving any single gate to H makes the circuit miss TT, the all-L assignment is the only feasible one.
  • What is measured. The leakage savings that the papers report, often a large fraction of the leakage at no loss of speed, are measurements on their circuits and libraries. This page does not repeat them.

Reductions

  • From 0-1 knapsack. On a chain, the problem and 0-1 knapsack reduce to each other, by the theorem above and the example.
  • To integer programming. The problem is a 0-1 program with a linear objective and one linear constraint per path, or with arrival time variables, one constraint per timing arc.
  • To gate sizing. Threshold flavors act as discrete sizes with their own delay and leakage, so a solver for discrete gate sizing with a leakage objective solves it.

Applications

  • Leakage reduction in every low-power flow. After timing closure, the gates with slack are moved to higher threshold flavors.
  • Mixed with other methods. Threshold assignment works with clustered voltage scaling for the dynamic power and with power gating for the standby leakage.
  • Engineering changes. A late swap of a threshold flavor keeps the footprint of the cell, so it can fix timing or leakage without moving any cell.

References

  1. Liqiong Wei, Zhanping Chen, Mark Johnson, Kaushik Roy and Vivek De, Design and optimization of low voltage high performance dual threshold CMOS circuits, Proceedings of the 35th Design Automation Conference, 489 to 494, 1998, the dual threshold problem, a high threshold for gates off the critical paths and a low threshold on them, with the leakage and delay models
  2. Liqiong Wei, Zhanping Chen, Kaushik Roy, Mark C. Johnson, Yibin Ye and Vivek K. De, Design and optimization of dual-threshold circuits for low-voltage low-power applications, IEEE Transactions on Very Large Scale Integration (VLSI) Systems 7(1), 16 to 24, 1999, the journal form of the problem and of its algorithm for the threshold assignment
  3. Takayasu Sakurai and A. Richard Newton, Alpha-power law MOSFET model and its applications to CMOS inverter delay and other formulas, IEEE Journal of Solid-State Circuits 25(2), 584 to 594, 1990, the delay of a gate as a function of the supply and threshold voltages, with the fitted exponent alpha
  4. Michael R. Garey and David S. Johnson, Computers and Intractability, A Guide to the Theory of NP-Completeness, W. H. Freeman, 1979, the NP-completeness of 0-1 knapsack in its decision form, and the meaning of NP-complete in the weak sense

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)
WritingW2 basic
  • a known algorithm
  • a contract.yaml