---
title: Synthesis and the ASIC flow
heading: From RTL to gates to layout, timing constraints, and what a chip costs
eyebrow: S3 · Lesson 30 · Synthesis and the ASIC flow
xp: 50
---

::: hook
Between a Verilog file and a packaged chip lies a long chain of tools. Synthesis turns the RTL into a netlist of cells from a foundry's standard-cell library, meeting timing constraints the designer writes. Placement puts each cell on the die, clock-tree synthesis builds the clock network, routing draws the metal, and sign-off checks timing, power, design rules and that the layout matches the netlist before the masks are made. The masks cost millions, so a design is checked over and over before tapeout. Cost also follows area much more steeply than linearly, because a bigger die both fits fewer times on a wafer and is more likely to catch a defect.
:::

::: play
- Cost per working die against die area, for a 300 mm wafer with Poisson yield $e^{-D_0A}$. Dies per wafer are $\frac{\pi(d/2)^2}{A} - \frac{\pi d}{\sqrt{2A}}$ (the second term is the partial dies lost at the edge).
- At small areas cost grows about in proportion to area; past $1/D_0$ the yield falls off and cost climbs exponentially. Raise the defect density, as in a new process, and big dies become unaffordable first.
- This is why large chips are increasingly split into several smaller dies (chiplets) in one package.
:::
:::

```sim plot
view: graph
x: A = 10..800 mm² log
y: c = 0.1..10000 log
slider: D = 0.02..1 = 0.1 /cm² log
slider: W = 3000..20000 = 10000
plot: W/((pi*150^2/A - pi*300/sqrt(2*A))*exp(-D*A/100)) | samples: 400 | label: cost per good die, dollars
plot: W/(pi*150^2/A - pi*300/sqrt(2*A)) | samples: 400 | dashed | color: ch2 | label: if every die worked, dollars
readout: yield of a 100 mm² die, % = 100*exp(-D)
```

::: predict
## A 100 mm² die costs about 17 dollars to make. Roughly what does a 400 mm² die cost in the same process (0.1 defects per cm²)?

- [ ] 17 dollars
- [ ] 68 dollars
- [x] About 100 dollars
- [ ] About 1,000 dollars

::: reveal
About 104 dollars. Four times the area fits only 143 dies on the wafer against 640 (the edge wastes more), and the yield falls from 90% to 67%. Together that's six times the cost for four times the area. At 600 mm² it would be about 200 dollars.
:::
:::

::: nameit
## Synthesis

Synthesis reads RTL, builds generic logic, optimizes it, and **maps** it onto library cells (NAND2, NOR2, AOI, flip-flops, each in several drive strengths) to meet the constraints with the least area and power. Design size is often quoted in **NAND2-equivalent gates**: total cell area over the area of one NAND2.

Constraints are written in SDC (Synopsys Design Constraints):

```tcl
create_clock -period 1.0 [get_ports clk]
set_input_delay 0.3 -clock clk [get_ports din]
set_output_delay 0.2 -clock clk [get_ports dout]
```

An input arriving 0.3 ns after the clock leaves $T - 0.3 - t_\text{setup}$ for the logic inside; an output with a 0.2 ns external requirement must be ready by $T - 0.2$.

## The physical flow

1. **Floorplanning:** die size, I/O, large blocks and power grid. Core area = cell area / target **utilization** (often 60 to 80%, leaving room for routing and buffers).
2. **Placement** of the standard cells in rows, optimized for timing and wire length.
3. **Clock-tree synthesis:** buffered trees for low skew (lesson 46).
4. **Routing** on many metal layers, then **hold fixing** (lesson 16).
5. **Sign-off:** STA at every process, voltage and temperature corner; IR drop and electromigration; design-rule checks (DRC); layout versus schematic (LVS); equivalence checking between RTL and netlist.
6. **Tapeout:** the masks are made from the final layout.

## Cost

- Dies per wafer of diameter d: $\frac{\pi(d/2)^2}{A} - \frac{\pi d}{\sqrt{2A}}$.
- Poisson yield: $Y = e^{-D_0A}$ (other models, such as Murphy's, are a little kinder to big dies).
- Cost per good die: wafer cost / (dies per wafer × Y), plus test and packaging.
- **NRE** (masks, tools, engineering) is millions of dollars in an advanced node, so an ASIC beats an FPGA only above a break-even volume, $\frac{\text{NRE}}{c_\text{FPGA} - c_\text{ASIC}}$.
:::

::: example
## A 300 mm wafer costs 10,000 dollars and the defect density is 0.1 per cm². What does a working 100 mm² die cost?

::: solution
1. **Dies per wafer.** The wafer's area over the die's, less the partial dies around the edge:
   $$\begin{aligned} N &= \frac{\pi \times 150^2}{100} \\ &\quad - \frac{\pi \times 300}{\sqrt{200}} \\ &= 706.9 - 66.6 \\ &= 640 \end{aligned}$$
2. **Yield.** The die is 1 cm²:
   $$e^{-0.1 \times 1} = 0.905$$
   so about 579 good dies.
3. **Cost per good die.**
   $$\frac{10{,}000}{579} = 17.26\ \text{dollars}$$
   before test and packaging.

**Answer:** about 17.26 dollars per working die, before test and packaging.
:::
:::

::: example
## An ASIC needs 2 million dollars of NRE and costs 5 dollars a unit; the FPGA that would do the same job costs 45 dollars. At what volume does the ASIC win? And how big is the ASIC's core if synthesis reports 1.8 mm² of cells at 70% utilization?

::: solution
1. **Break-even volume.** The ASIC saves 45 − 5 = 40 dollars a unit:
   $$\frac{2\ \text{million}}{40} = 50{,}000\ \text{units}$$
   Below that the FPGA is cheaper, with no mask risk and a design that can still change.
2. **Core area.**
   $$\frac{1.8}{0.7} = 2.57\ \text{mm}^2$$
3. **Gate count.** With 0.5 µm² per NAND2, 1.8 mm² of cells is 3.6 million NAND2-equivalent gates.

**Answer:** the ASIC wins above 50,000 units, and its core is 2.57 mm².
:::
:::

::: example
## A design is constrained with a 1 ns clock, a 0.3 ns input delay and a 0.2 ns output delay; its flip-flops have 0.08 ns clock-to-Q and 0.05 ns setup. How much time does the logic get from an input to a register, and from a register to an output?

::: solution
1. **Input to register.**
   $$1 - 0.3 - 0.05 = 0.65\ \text{ns}$$
2. **Register to output.** The output must be ready by $1 - 0.2 = 0.8$ ns and leaves 0.08 ns after the edge:
   $$0.8 - 0.08 = 0.72\ \text{ns}$$
3. **Where the delays come from.** The external delays come from the neighbors' timing; getting them wrong either wastes speed or ships a chip that fails at the board level.

**Answer:** 0.65 ns from an input to a register, and 0.72 ns from a register to an output.
:::
:::

::: check
given: A = 50 | 150 | 400
answer: pi*150^2/A - pi*300/sqrt(2*A)
tolerance: 1%

## How many {A} mm² dies fit on a 300 mm wafer, by the formula with the edge correction?

::: right
Right. {answer} dies.
:::

::: misses
- [pi*150^2/A] Subtract the partial dies around the edge.
- [pi*300^2/A] Use the radius, 150 mm, in the area.
- [any] Not yet. Wafer area over die area, less the edge loss.
:::
:::

::: check
given: D = 0.2 | 0.5; A = 80 | 200 | 600
answer: 100*exp(-D*A/100)
unit: %
tolerance: 0.5%

## With {D} defects per cm², what's the Poisson yield of a {A} mm² die?

::: right
Right. $e^{-D_0A}$ = {answer}%.
:::

::: misses
- [100*exp(-D*A)] Convert the area to cm² first.
- [100*(1 - D*A/100)] That's only the first term of the exponential.
- [any] Not yet. $e^{-D_0A}$ with A in cm².
:::
:::

::: check
given: W = 5000 | 15000; A = 80 | 300; D = 0.1 | 0.3
answer: W/((pi*150^2/A - pi*300/sqrt(2*A))*exp(-D*A/100))
tolerance: 1%

## A 300 mm wafer costs {W} dollars and has {D} defects per cm². What does a working {A} mm² die cost, in dollars?

::: right
Right. Wafer cost over good dies: {answer} dollars.
:::

::: misses
- [W/(pi*150^2/A - pi*300/sqrt(2*A))] Divide by the working dies only.
- [any] Not yet. Dies per wafer times yield, into the wafer cost.
:::
:::

::: check
given: N = 1 | 3 | 10; a = 3 | 8; f = 20 | 60
answer: N*1e6/(f - a)
tolerance: 0.5%

## An ASIC needs {N} million dollars of NRE and costs {a} dollars a unit; an FPGA doing the same job costs {f} dollars. Above what volume is the ASIC cheaper?

::: right
Right. {answer} units.
:::

::: misses
- [N*1e6/f] Each unit saves the difference in unit cost.
- [any] Not yet. NRE over the savings per unit.
:::
:::

::: check
given: C = 0.8 | 2.5 | 6; u = 0.6 | 0.75
answer: C/u
unit: mm²
tolerance: 0.5%

## Synthesis reports {C} mm² of cells. At {u} utilization, what core area is needed?

::: right
Right. {answer} mm².
:::

::: misses
- [C*u] Utilization is the fraction of the core the cells fill: divide.
- [any] Not yet. Cell area over utilization.
:::
:::

::: check
given: T = 1 | 1.6 | 2.5; i = 0.2 | 0.5; s = 0.05 | 0.1
answer: T - i - s
unit: ns
tolerance: 0.5%

## The clock period is {T} ns, an input arrives {i} ns after the clock edge (set_input_delay), and the capturing flip-flop needs {s} ns of setup. How much time is left for logic?

::: right
Right. $T - t_\text{in} - t_\text{su}$ = {answer} ns.
:::

::: misses
- [T - i] Leave the setup time.
- [any] Not yet. The external part of the path has already used the input delay.
:::
:::

::: check
given: C = 0.5 | 2 | 8; n = 0.4 | 0.6
answer: C/n
tolerance: 0.5%

## A block has {C} mm² of standard cells, and a NAND2 is {n} µm². About how many million NAND2-equivalent gates is it?

::: right
Right. {answer} million gates.
:::

::: misses
- [C/n*1e6] That's the count in gates; the question asks for millions.
- [any] Not yet. Cell area over one NAND2's area.
:::
:::

::: check
kind: parts
given: d = 200 | 300; A = 25 | 100 | 400; D = 0.1 | 0.5; w = 5000 | 15000

## A {d} mm wafer costs {w} dollars and carries {A} mm² dies at a defect density of {D} per cm².

::: part
answer: pi*(d/2)^2/A - pi*d/sqrt(2*A)
tolerance: 0.5%

### About how many dies fit on it?

::: misses
- [pi*(d/2)^2/A] Subtract the partial dies around the edge.
- [any] $\pi(d/2)^2/A - \pi d/\sqrt{2A}$.
:::
:::

::: part
answer: exp(-D*A/100)*100
unit: %
tolerance: 0.5%

### What is the Poisson yield?

::: misses
- [exp(-D*A)*100] Convert the area to cm².
- [any] $e^{-D_0A}$.
:::
:::

::: part
answer: w/((pi*(d/2)^2/A - pi*d/sqrt(2*A))*exp(-D*A/100))
tolerance: 0.5%

### What does each good die cost, in dollars?

::: misses
- [any] Wafer cost over good dies.
:::
:::
:::

::: check
kind: derivation
vars: N = 1e5..1e8, a = 1..100, b = 5..500, V = 1e3..1e7

## An ASIC costs N in NRE and a per unit; the FPGA alternative costs b per unit (b > a).

::: step
answer: N/(b - a)

### At what volume do they cost the same?
:::

::: step
answer: a + N/V

### What does each ASIC cost, NRE included, at volume V?
:::

::: step
answer: (b - a)*V - N

### What does the ASIC save in total at volume V?
:::

::: right
Right. NRE makes ASICs a volume game: below break-even the FPGA is cheaper however expensive each one is.
:::
:::

::: explain
## Why does the cost of a chip rise faster than its area?

::: model
Two effects multiply. A larger die fits fewer times on a wafer, and the loss is worse than proportional because more of the wafer's round edge is wasted on partial dies. And each die has to be free of defects to work: if defects land randomly at some density, the chance a die escapes them falls exponentially with its area. The cost of a working die is the wafer cost divided by the number of dies that fit times the fraction that work, so both the shrinking count and the shrinking yield push it up. Past an area of about one over the defect density, the yield term dominates and cost climbs steeply, which is why very large designs are often split into chiplets.
:::
:::

::: practice

::: check
given: A = 50 | 70 | 100 | 150 | 250 | 400 | 600
answer: pi*150^2/A - pi*300/sqrt(2*A)
tolerance: 1%

## Dies of {A} mm² on a 300 mm wafer?

::: misses
- [any] $\pi r^2/A - \pi d/\sqrt{2A}$.
:::
:::

::: check
given: D = 0.08 | 0.4; A = 100 | 500
answer: 100*exp(-D*A/100)
unit: %
tolerance: 0.5%

## Poisson yield: {D} /cm², {A} mm²?

::: misses
- [any] $e^{-D_0A}$, A in cm².
:::
:::

::: check
given: N = 2 | 5; a = 4 | 10; f = 30 | 80
answer: N*1e6/(f - a)
tolerance: 0.5%

## Break-even volume: {N} million dollars of NRE, {a} dollars per ASIC, {f} dollars per FPGA?

::: misses
- [any] NRE over the difference.
:::
:::
:::
