---
title: Physical design and timing closure
heading: Placement and wire length, power grids and IR drop, electromigration, on-chip variation and closing timing
eyebrow: S3 · Lesson 47 · Physical design and timing closure
xp: 50
---

::: hook
After synthesis, a design is a netlist that meets timing on paper, with wire delays estimated. Physical design makes it real: cells get places, wires get lengths, and the power grid has to carry amps of current to every cell without letting the supply sag. Timing that looked fine often fails once real wires appear, and the last weeks of a chip project are spent on timing closure: resizing gates, adding buffers, swapping threshold voltages, nudging clocks and rerouting, corner by corner, until every path at every process, voltage and temperature corner has positive slack.
:::

::: play
- The voltage drop along a power rail of total resistance R carrying a total current I drawn evenly along its length, against position. Solid: fed from one end. Dashed: fed from both ends.
- Fed from one end, the far end sags by IR/2. Fed from both, the worst point is the middle, at only IR/8: a quarter of the drop for the same metal.
- Real power grids are meshes fed from hundreds of bumps across the die, for the same reason.
:::
:::

```sim plot
view: graph
x: x = 0..1
y: v = 0..300 mV
slider: I = 5..100 = 50 mA
slider: R = 1..20 = 10 Ω
plot: I*R*(x - x^2/2) | label: fed from one end, mV
plot: I*R*x*(1 - x)/2 | dashed | color: ch2 | label: fed from both ends, mV
readout: worst drop from one end, mV = I*R/2
readout: worst drop from both ends, mV = I*R/8
```

::: predict
## A rail of total resistance 10 Ω feeds 50 mA drawn evenly along it. It's fed from one end and the far end sags 250 mV. If it's fed from both ends instead, what's the worst drop?

- [ ] 125 mV
- [x] 62.5 mV
- [ ] 31 mV
- [ ] 0 mV

::: reveal
62.5 mV, at the middle. Feeding both ends halves the length each half carries current over, and halves the current each half carries: a quarter of the drop. With a 0.8 V supply, 250 mV would slow the far cells drastically (or stop them); 62.5 mV is still about 8%, more than a typical 5% budget, so the grid needs more straps or more feed points.
:::
:::

::: nameit
## Placement and wire length

Placement tools minimize total wire length, estimated per net by the **half-perimeter wire length** (HPWL): the width plus height of the box around the net's pins. For three pins at x coordinates a, b and c, the width is $\frac{|a - b| + |b - c| + |a - c|}{2}$. They also spread cells to avoid **congestion**, regions where nets need more routing tracks than exist.

## Power delivery

- A rail of resistance R with current I drawn evenly drops $IR/2$ fed from one end and $IR/8$ fed from both.
- Static IR drop budgets are typically 5% or less of $V_{DD}$; dynamic drop (from simultaneous switching) is handled with decoupling capacitance near the cells.
- **Electromigration:** sustained current pushes metal atoms along a wire until it opens. Each layer has a maximum current density, so a wire of width w carries at most $J_\text{max}w$ (quoted per µm of width).

## Variation and sign-off timing

- **Corners:** timing is checked at slow, typical and fast process, at low and high voltage and temperature, and in each mode of operation (MCMM).
- **On-chip variation (OCV):** within one die, a path can be a little slower or faster than its neighbors. Setup analysis derates the launch clock and data paths late (×$d_\text{late}$, such as 1.08) and the capture clock early (×$d_\text{early}$, such as 0.92):

$$\text{slack} = T + d_\text{early}t_\text{cap} - d_\text{late}(t_\text{launch} + t_\text{data}) - t_\text{su}$$

- **Common path pessimism removal (CRPR):** the clock path shared by launch and capture can't be both slow and fast at once, so $t_\text{common}(d_\text{late} - d_\text{early})$ is credited back.

## Closing timing

Upsize gates on critical paths, add buffers or split fanout, swap cells to low-threshold (faster, leakier) versions, move registers (retiming) or clocks (useful skew), and fix hold by adding delay on short paths. Late changes are made as small **ECOs** (engineering change orders) to avoid re-running the whole flow.
:::

::: example
## A launch clock path of 400 ps, a data path of 600 ps and a capture clock path of 380 ps, with a 1000 ps clock and 30 ps setup. What's the setup slack without derating, and with derates of 1.08 late and 0.92 early? The two clock paths share their first 300 ps.

::: solution
1. **Without derating.**
   $$\begin{aligned} S &= 1000 + 380 - 400 \\ &\quad - 600 - 30 \\ &= 350\ \text{ps} \end{aligned}$$
2. **Derated arrival.** The launch side is late:
   $$\begin{aligned} t_a &= (400 + 600) \times 1.08 \\ &= 1080\ \text{ps} \end{aligned}$$
3. **Derated required time.** The capture side is early:
   $$\begin{aligned} t_r &= 1000 + 380 \times 0.92 - 30 \\ &= 1319.6\ \text{ps} \end{aligned}$$
   so the slack is $1319.6 - 1080 = 239.6$ ps.
4. **CRPR.** Removing the pessimism on the shared 300 ps credits back
   $$300 \times (1.08 - 0.92) = 48\ \text{ps}$$
   for 287.6 ps of slack.

**Answer:** 350 ps without derating, 239.6 ps with the derates, and 287.6 ps after CRPR.
:::
:::

::: example
## A block draws 1.2 W at 0.75 V. How much current is that, and how wide must a single feeding wire be if its layer allows 2 mA per µm of width?

::: solution
1. **Current.**
   $$\begin{aligned} I &= \frac{1.2\ \text{W}}{0.75\ \text{V}} \\ &= 1.6\ \text{A} \end{aligned}$$
2. **Wire width.** At 2 mA/µm:
   $$\frac{1600\ \text{mA}}{2\ \text{mA/µm}} = 800\ \text{µm}$$
   of total wire width.
3. **What designs do.** That's why power comes in through many wide straps on the thick top metal layers and hundreds of bumps.

**Answer:** 1.6 A, which would need a wire 800 µm wide.
:::
:::

::: example
## A net connects pins at (0, 0), (30, 10), (10, 40) and (50, 20) µm. What half-perimeter wire length does the placer estimate, and what if the last pin moves to (20, 20)?

::: solution
1. **Bounding box.** It spans 0 to 50 in x and 0 to 40 in y:
   $$\begin{aligned} \text{HPWL} &= 50 + 40 \\ &= 90\ \text{µm} \end{aligned}$$
2. **After the move.** With the last pin at (20, 20), x spans only 0 to 30:
   $$\begin{aligned} \text{HPWL} &= 30 + 40 \\ &= 70\ \text{µm} \end{aligned}$$
3. **How placers use it.** Moving one cell shortened the estimate by 20 µm; placers make millions of such moves, guided by HPWL because it's quick to update.

**Answer:** 90 µm, and 70 µm after the move.
:::
:::

::: check
given: a = 10 | 40 | 90; b = 25 | 70; c = 5 | 55; p = 0 | 30; q = 15 | 80; r = 50 | 60
answer: (abs(a - b) + abs(b - c) + abs(a - c))/2 + (abs(p - q) + abs(q - r) + abs(p - r))/2
unit: µm
tolerance: 0.5%

## A net connects pins at ({a}, {p}), ({b}, {q}) and ({c}, {r}) µm. What's its half-perimeter wire length?

::: right
Right. Bounding-box width plus height: {answer} µm.
:::

::: misses
- [abs(a - b) + abs(b - c) + abs(a - c) + abs(p - q) + abs(q - r) + abs(p - r)] That's twice the box's half-perimeter.
- [any] Not yet. Width of the box around the x coordinates plus its height.
:::
:::

::: check
given: I = 20 | 80; R = 2 | 8 | 15
answer: I*R/2
unit: mV
tolerance: 0.5%

## A rail of {R} Ω carries {I} mA drawn evenly along it, fed from one end. What's the drop at the far end?

::: right
Right. $IR/2$ = {answer} mV.
:::

::: misses
- [I*R] The current tapers to zero at the far end: half of IR.
- [I*R/8] That's for a rail fed from both ends.
- [any] Not yet. Integrate the drop of a tapering current.
:::
:::

::: check
given: I = 20 | 80; R = 2 | 8 | 15
answer: I*R/8
unit: mV
tolerance: 0.5%

## The same kind of rail, {R} Ω with {I} mA drawn evenly, is fed from both ends. What's the worst drop?

::: right
Right. $IR/8$ = {answer} mV, at the middle.
:::

::: misses
- [I*R/4] Each half has half the resistance and carries half the current.
- [any] Not yet. Two half-rails, each fed from one end.
:::
:::

::: check
given: P = 0.5 | 2 | 15; V = 0.7 | 0.9; J = 1 | 2.5
answer: P/V*1000/J
unit: µm
tolerance: 0.5%

## A block draws {P} W at {V} V. If the metal allows {J} mA per µm of width, how much total wire width must carry its current?

::: right
Right. $I/J_\text{max}$ = {answer} µm.
:::

::: misses
- [P*V*1000/J] Current is power over voltage.
- [any] Not yet. Find the current, then divide by the allowed current per µm.
:::
:::

::: check
given: T = 800 | 1200; L = 300 | 450; D = 500 | 700; C = 280 | 420; s = 25; l = 1.05 | 1.1; e = 0.9 | 0.95
answer: T + e*C - l*(L + D) - s
unit: ps
tolerance: 0.5%

## With a {T} ps clock, a launch clock path of {L} ps, a data path of {D} ps, a capture clock path of {C} ps and {s} ps setup, what's the setup slack under OCV derates of {l} late and {e} early?

::: right
Right. $T + d_eC - d_l(L + D) - t_\text{su}$ = {answer} ps.
:::

::: misses
- [T + C - L - D - s] Apply the derates.
- [T + l*C - e*(L + D) - s] For setup, the capture clock is taken early and the launch side late.
- [any] Not yet. Derate the launch side late and the capture clock early.
:::
:::

::: check
given: c = 150 | 400; l = 1.05 | 1.1; e = 0.9 | 0.95
answer: c*(l - e)
unit: ps
tolerance: 0.5%

## Launch and capture clock paths share their first {c} ps. With derates {l} late and {e} early, how much pessimism does CRPR remove?

::: right
Right. $t_\text{common}(d_l - d_e)$ = {answer} ps.
:::

::: misses
- [c*l] Only the difference between the two derates is pessimism.
- [any] Not yet. The common part was counted both late and early.
:::
:::

::: check
kind: parts
given: T = 800 | 1000; l = 350 | 400; d = 300 | 400; c = 300 | 380; m = 150 | 250

## A launch clock path of {l} ps feeds a {d} ps data path; the capture clock path is {c} ps, with the first {m} ps shared with the launch path. The clock is {T} ps and setup is 30 ps.

::: part
answer: T + c - l - d - 30
unit: ps
tolerance: 0.5%

### What is the setup slack without derating?

::: misses
- [any] $T + t_\text{cap} - t_\text{launch} - t_\text{data} - t_\text{su}$.
:::
:::

::: part
answer: T + 0.92*c - 1.08*(l + d) - 30
unit: ps
tolerance: 0.5%

### With OCV derates of 1.08 late and 0.92 early?

::: misses
- [any] Derate launch and data late, capture early.
:::
:::

::: part
answer: T + 0.92*c - 1.08*(l + d) - 30 + m*(1.08 - 0.92)
unit: ps
tolerance: 0.5%

### And after common path pessimism removal?

::: misses
- [any] Credit back $t_\text{common}(d_\text{late} - d_\text{early})$.
:::
:::
:::

::: check
kind: derivation
vars: R = 0.01..10, I = 0.001..5, J = 0.0005..0.02

## A power rail of resistance R carries a current I drawn evenly along it; the layer allows a current density J per µm of width.

::: step
answer: I*R/2

### What does it drop if fed from one end?
:::

::: step
answer: I*R/8

### And if fed from both ends?
:::

::: step
answer: I/J

### How wide must the feed be for electromigration, in µm?
:::

::: right
Right. Feeding from both ends quarters the drop, which is why power grids are meshes fed from many points.
:::
:::

::: explain
## Why are power grids fed from many points across the die instead of from the edges?

::: model
Cells draw current all over the die, and every bit of supply metal between a feed point and a cell drops voltage in proportion to the current through it. Fed from the edges, current for the center cells has to cross half the die on thin on-chip metal, through resistance that grows with the distance, while carrying more and more of the accumulated current, so the drop grows roughly with the square of the distance. Feeding from both ends of a rail already cuts the worst drop to a quarter; feeding through hundreds of bumps spread over the die makes every cell close to a feed point, so the on-chip metal only carries current a short way and the drop stays within a few percent of the supply.
:::
:::

::: practice

::: check
given: I = 30 | 120; R = 3 | 12
answer: I*R/2
unit: mV
tolerance: 0.5%

## Drop at the far end: {I} mA evenly on a {R} Ω rail fed from one end?

::: misses
- [any] $IR/2$.
:::
:::

::: check
given: P = 1 | 8; V = 0.75 | 1; J = 1.5 | 3
answer: P/V*1000/J
unit: µm
tolerance: 0.5%

## Wire width for {P} W at {V} V, {J} mA/µm?

::: misses
- [any] $(P/V)/J$.
:::
:::

::: check
given: T = 1000 | 1500; L = 350 | 500; D = 600 | 900; C = 330 | 470; s = 30; l = 1.06 | 1.12; e = 0.88 | 0.94
answer: T + e*C - l*(L + D) - s
unit: ps
tolerance: 0.5%

## OCV setup slack: T {T}, launch {L}, data {D}, capture {C}, setup {s} ps, derates {l} and {e}?

::: misses
- [any] $T + d_eC - d_l(L + D) - t_\text{su}$.
:::
:::
:::
