Problemcore
Gate sizing
Also called transistor sizing.
Choose a size for each gate from a library so that the circuit meets its delay target with least area or power.
Gate sizing is the problem of choosing the size of every gate of a circuit, from a library of sizes or from an interval, so that every path meets the delay target and the total area or power is least. A larger gate drives its load faster but costs area and power, and it loads the gates that drive it, so a size change helps one delay and hurts another. With the Elmore delay and continuous sizes, every delay is a posynomial in the sizes and the problem is a geometric program, which convex optimization solves exactly. With discrete sizes the problem is strongly NP-hard (Li, 1994). It is one of the main steps of timing closure, next to buffer insertion and placement.
In plain words
Every logic gate on a chip comes in several sizes. A big gate is fast when it drives a heavy load, but it takes more room and more power, and it is itself a heavy load for the gate in front of it.
The circuit has a clock period to meet. Every path from an input to an output must be fast enough. The task is to pick a size for each gate so that all paths are fast enough and the chip spends as little room or power as possible on it.
If any size in a range is allowed, the problem has a single best answer that good methods find. If only the sizes of a library are allowed, it becomes a hard puzzle.
Definition
Input. A DAG of gates , the timing graph of static timing analysis. For each gate : an intrinsic delay , a drive resistance and an input capacitance at size , an area , a fixed load of wires and outputs, and a set of allowed sizes. A delay target .
Delay. The delay of gate is the Elmore delay of its switch-level RC model,
The arrival time of a gate is the latest arrival time of its fanins plus , starting from 0 before the gates without fanins, and the circuit delay is the latest arrival time.
Output. Sizes with that minimize , or the answer that no sizes meet .
In the continuous problem is an interval ; in the discrete problem it is a finite set. Each is a sum of monomials in with positive coefficients, a posynomial, so the continuous problem with one constraint per path , or with arrival time variables, is a geometric program. After it is a convex optimization problem.
Variants
- Discrete or continuous sizes. Standard cell libraries offer a few sizes of each cell, so the discrete form is the real one. The continuous form is solved first and rounded.
- Power instead of area. Dynamic power grows with the switched capacitance weighted by activity, so it has the same form with other weights. Leakage power leads to the related choice of threshold voltage for each cell.
- Delay under an area budget. Swap the roles: minimize subject to . For a single path with no area cost, the fastest sizing has the closed form of logical effort.
- Gate and wire sizing. The widths of the wire segments of each RC interconnect tree are variables too, with the same posynomial form.
- Sizing with buffers. On long nets, inserting buffers changes the structure of the circuit; see van Ginneken buffer insertion. Both are often solved together.
- Finer granularity. Each device inside a gate can get its own size. The model is the same at the level of single devices.
- Other delay models. With table models of cell libraries, the delays are no longer posynomials and the continuous problem is no longer convex.
Examples
A chain of two gates. A fixed driver of size 1 drives gate 1, which drives gate 2, which drives a load . All and the sizes are . The delay is and the area, with the driver, is .
| \ | 1 | 2 | 4 |
|---|---|---|---|
| 1 | delay 13, area 3 | delay 10, area 4 | delay 10, area 6 |
| 2 | delay 13.5, area 4 | delay 10, area 5 | delay 9, area 7 |
| 4 | delay 15.25, area 6 | delay 11.5, area 7 | delay 10, area 9 |
The delay is not monotone in the sizes: is slower than , because the large gate 1 sees the same weak driver and drives a small gate. For the least area is 4, at . For only is feasible, with area 7. By the inequality of arithmetic and geometric means, , so no sizes, even continuous ones, give a delay below 9; the bound is met only at the equal stage ratios , .
Rounding loses. For the continuous optimum is , , with area about . Among the library sizes only meets , with area 7. Rounding the continuous answer to the nearest sizes misses the target.
Known algorithms
- TILOS (Fishburn and Dunlop, 1985). Greedy: from the smallest sizes, repeatedly make the gate on the critical path with the best delay gain per area one step larger. Sound and fast, but not optimal, and it can fail when a sizing exists.
- Lagrangian relaxation gate sizing (Chen, Chu and Wong, 1998). Multipliers on the timing edges that conserve flow, and a closed-form local resizing for fixed multipliers. Exact for the continuous problem under the Elmore delay, since there is no duality gap.
- Geometric programming solvers. Interior point methods solve the continuous problem to any accuracy in polynomial time; Boyd, Kim, Patil and Horowitz describe this for digital circuits.
- Rounding and local search for discrete sizes. The continuous answer is rounded and repaired by local moves, or the relaxation is used with library cells directly. These give no guarantee.
| Algorithm | Time | Space | Properties | Code |
|---|---|---|---|---|
| Lagrangian relaxation gate sizing | O(S (n + m)) per_round | O(n + m) extra | deterministicexactiterative | 1 language |
| TILOS | O(K (n + m)) worst | O(n + m) extra | deterministicnot exactgreedy | 1 language |
Bounds
- Discrete sizes. Li (1994) proved that gate sizing with discrete sizes is strongly NP-hard, so it has no pseudo-polynomial algorithm unless P = NP. The known exact methods take exponential time in the worst case.
- Continuous sizes. The problem is convex after the change of variables , so a local minimum is global and the optimum is unique when the area weights are positive. It is solvable to accuracy in time polynomial in the size of the input and by interior point methods.
- Feasibility. The least possible delay is itself the optimum of a geometric program. For a chain without area cost and without bounds on the sizes, it is reached when all stage delays above the intrinsic ones are equal, as in the example.
Reductions
- To geometric programming. The continuous problem, with arrival time variables, is a geometric program; with it is a convex program in .
- To a dual over flows. By the KKT conditions, the Lagrangian dual of the continuous problem ranges over multipliers that obey flow conservation on the timing graph, and the arrival times drop out. This is the basis of Lagrangian relaxation gate sizing.
- From hard discrete problems. The NP-hardness of the discrete form is shown by reductions from known NP-hard problems in Li (1994).
Applications
- Timing closure. After placement and routing, gates on failing paths are made larger and gates with spare time smaller, often many times in a flow.
- Power reduction. Gates off the critical paths are made smaller to save dynamic power, with the delay target as the constraint.
- Area recovery. After synthesis and buffering, sizing removes area that the timing does not need.
- Simultaneous optimization. Together with buffer insertion and timing-driven placement, it decides most of the delay of a design that a placer and router have fixed.
References
- Wing Ning Li, Strongly NP-hard discrete gate-sizing problems, IEEE Transactions on Computer-Aided Design 13(8), 1045 to 1051, 1994, the strong NP-hardness of gate sizing with discrete sizes
- Chung-Ping Chen, Chris C. N. Chu and D. F. Wong, Fast and exact simultaneous gate and wire sizing by Lagrangian relaxation, IEEE Transactions on Computer-Aided Design 18(7), 1014 to 1025, 1999, the continuous problem under the Elmore delay and its exact solution
- Stephen Boyd, Seung-Jean Kim, Dinesh D. Patil and Mark A. Horowitz, Digital circuit optimization via geometric programming, Operations Research 53(6), 2005, gate sizing with posynomial delay models as a geometric program
- Andrew B. Kahng, Jens Lienig, Igor L. Markov and Jin Hu, VLSI Physical Design, From Graph Partitioning to Timing Closure, Springer, 2011, Chapter 8, Timing Closure, Section 8.5.1, Gate Sizing
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.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag D5Q8V0 Edit this page History Report an error Markdown