---
title: Problem set 11
heading: "Problem set 11: designing digital systems"
eyebrow: S3 · Problem set 11
type: problems
---

::: hook
These problems size whole systems the way an architecture review does: from a throughput or latency requirement to the number of units, the clock, the memory and bus bandwidth, the area, the power and the verification effort. Each is a short chain of estimates; keep the units straight and round counts up.
:::

::: pool
pick: 12

::: check
kind: parts
given: R = 2 | 10 | 50; f = 250 | 500 | 800; g = 20 | 80

## A block must perform {R} G operations a second; each unit does one per cycle at {f} MHz and takes {g} thousand gates.

::: part
answer: ceil(R*1000/f)
tolerance: 0

### How many units does it need?

::: misses
- [any] $\lceil R/f\rceil$.
:::
:::

::: part
answer: ceil(R*1000/f)*g/1000
tolerance: 0.5%

### How many million gates is that?

::: misses
- [any] Units × gates per unit.
:::
:::
:::

::: check
kind: parts
given: G = 10 | 50 | 200; d = 2 | 8; u = 0.6 | 0.75

## A design has {G} million NAND2-equivalent gates, in a process with {d} million gates per mm² of cell area, placed at {u} utilization.

::: part
answer: G/d
unit: mm²
tolerance: 0.5%

### How much cell area is that?

::: misses
- [any] Gates over density.
:::
:::

::: part
answer: G/d/u
unit: mm²
tolerance: 0.5%

### How big is the core?

::: misses
- [any] Cell area over utilization.
:::
:::
:::

::: check
kind: parts
given: G = 10 | 50; c = 1 | 2; a = 0.1 | 0.2; V = 0.75 | 0.9; f = 0.5 | 1.5; l = 1 | 10

## A chip has {G} million gates, each switching {c} fF at activity {a}, at {V} V and {f} GHz; each gate leaks {l} nW.

::: part
answer: G*1e6*c*1e-15*a*V^2*f*1e9
unit: W
tolerance: 0.5%

### What dynamic power does it burn?

::: misses
- [any] $N\alpha CV^2f$.
:::
:::

::: part
answer: G*1e6*l*1e-9
unit: W
tolerance: 0.5%

### What leakage?

::: misses
- [any] Gates × leakage per gate.
:::
:::
:::

::: check
kind: parts
given: W = 1920 | 3840; H = 1080 | 2160; b = 2 | 4; r = 30 | 60; k = 3 | 4; B = 12.8 | 25.6

## A video pipeline reads and writes each {W} × {H} frame {k} times in total, {b} bytes per pixel, {r} frames a second; DRAM channels give {B} GB/s each at 70% efficiency.

::: part
answer: W*H*b*r*k/1e9
unit: GB/s
tolerance: 0.5%

### What memory bandwidth does it need?

::: misses
- [any] Pixels × bytes × frame rate × passes.
:::
:::

::: part
answer: ceil(W*H*b*r*k/1e9/(B*0.7))
tolerance: 0

### How many channels?

::: misses
- [any] Round up the bandwidth over the 70% sustained figure per channel.
:::
:::
:::

::: check
kind: parts
given: n = 10 | 16 | 24; o = 3 | 4; t = 10 | 15 | 25

## A design puts {n} FO4 delays of logic in each pipeline stage plus {o} FO4 of register and clock overhead; the process's FO4 delay is {t} ps.

::: part
answer: 1e6/((n + o)*t)
unit: MHz
tolerance: 0.5%

### What clock can it reach?

::: misses
- [1e6/(n*t)] Count the overhead.
- [any] $1/((n + o)t_{FO4})$.
:::
:::

::: part
answer: o/(n + o)*100
unit: %
tolerance: 0.5%

### What fraction of each cycle is overhead?

::: misses
- [any] Overhead over the whole stage.
:::
:::
:::

::: check
kind: parts
given: R = 10 | 100 | 400; f = 300 | 500 | 800

## A packet processor must handle {R} Gb/s of minimum-size Ethernet frames (64 bytes plus 20 bytes of preamble and gap), on a {f} MHz clock.

::: part
answer: R*1e9/(84*8)/1e6
unit: Mpps
tolerance: 0.5%

### How many packets a second is that, in millions?

::: misses
- [R*1e9/(64*8)/1e6] Count the 20 bytes of overhead on the wire.
- [any] Line rate over 84 × 8 bits.
:::
:::

::: part
answer: f/(R*1e9/(84*8)/1e6)
unit: cycles
tolerance: 0.5%

### How many clock cycles does it get per packet?

::: misses
- [any] Clock rate over packet rate.
:::
:::
:::

::: check
kind: parts
given: N = 63 | 127 | 255; s = 10 | 50; f = 250 | 400; c = 1 | 4

## An FPGA filters {c} channel(s), each with a symmetric {N}-tap FIR at {s} MS/s, on a {f} MHz clock with time-shared DSP slices.

::: part
answer: c*ceil(ceil(N/2)*s/f)
tolerance: 0

### How many DSP slices does it need?

::: misses
- [c*ceil(N*s/f)] Symmetry halves the multiplies.
- [any] $c\lceil\lceil N/2\rceil f_s/f_\text{clk}\rceil$.
:::
:::
:::

::: check
kind: parts
given: k = 3 | 5 | 7; W = 1920 | 3840; b = 8 | 10 | 24

## An image filter keeps {k} lines of {W} pixels, {b} bits each, in 36 Kb block RAMs (36 864 bits each).

::: part
answer: k*W*b/1024
unit: Kb
tolerance: 0.5%

### How much storage do the line buffers need?

::: misses
- [any] Lines × pixels × bits.
:::
:::

::: part
answer: ceil(k*W*b/36864)
tolerance: 0

### How many block RAMs, if the bits pack perfectly?

::: misses
- [any] Round up the bits over 36 864.
:::
:::
:::

::: check
kind: parts
given: s = 5 | 12 | 20; f = 500 | 1000; m = 50 | 80; n = 100 | 10000

## A request passes a {s}-stage pipeline at {f} MHz and one {m} ns memory access; {n} requests are issued back to back.

::: part
answer: s*1000/f + m
unit: ns
tolerance: 0.5%

### What is one request's latency?

::: misses
- [any] Pipeline stages plus memory.
:::
:::

::: part
answer: (n - 1)*1000/f + s*1000/f + m
unit: ns
tolerance: 0.5%

### How long until all {n} have finished, if the memory is pipelined too?

::: misses
- [any] One more result each cycle after the first.
:::
:::
:::

::: check
kind: parts
given: N = 1 | 5; M = 50 | 200; e = 0.5 | 2; x = 20 | 100

## An inference runs {N} G multiply-accumulates at {e} pJ each and moves {M} MB to and from DRAM at {x} pJ per byte.

::: part
answer: (N*1e9*e + M*1e6*x)*1e-12*1000
unit: mJ
tolerance: 0.5%

### How much energy does it take?

::: misses
- [N*1e9*e*1e-12*1000] Memory traffic often costs more than the arithmetic.
- [any] MACs × energy + bytes × energy.
:::
:::

::: part
answer: M*1e6*x/(N*1e9*e + M*1e6*x)*100
unit: %
tolerance: 0.5%

### What fraction is data movement?

::: misses
- [any] Memory energy over total.
:::
:::
:::

::: check
kind: parts
given: B = 4 | 16 | 50; f = 250 | 500 | 1000; e = 0.8 | 0.9

## A bus must sustain {B} GB/s at {f} MHz with {e} efficiency.

::: part
answer: B*8*1000/(f*e)
unit: bits
tolerance: 0.5%

### How wide must it be?

::: misses
- [B*8*1000/f] Divide by the efficiency too.
- [any] $8B/(f\,e)$.
:::
:::

::: part
answer: 2^ceil(log(B*8*1000/(f*e))/log(2) - 1e-9)
unit: bits
tolerance: 0

### What power-of-two width would you build?

::: misses
- [any] Round up to a power of two.
:::
:::
:::

::: check
kind: parts
given: N = 100000 | 1000000; a = 2 | 10; b = 20 | 50; let c = 3*a + 20

## An ASIC needs {b} million dollars of NRE and costs {a} dollars a unit; the FPGA that would do the same job costs {c} dollars a unit.

::: part
answer: b*1e6/(2*a + 20)
tolerance: 0.5%

### What is the break-even volume?

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

::: part
answer: a + b*1e6/N
tolerance: 0.5%

### What does each ASIC cost, NRE included, at {N} units, in dollars?

::: misses
- [any] Unit cost plus NRE spread over the volume.
:::
:::
:::

::: check
kind: parts
given: a = 16 | 32; b = 4 | 8 | 16; t = 0.1 | 2

## A cross coverpoint of {a} × {b} bins must be filled by random tests that take {t} s each.

::: part
answer: a*b*(ln(a*b) + 0.577)
tolerance: 1%

### About how many tests are expected?

::: misses
- [any] $N(\ln N + 0.577)$.
:::
:::

::: part
answer: a*b*(ln(a*b) + 0.577)*t/3600
unit: hours
tolerance: 1%

### How long is that on one machine?

::: misses
- [any] Tests × time per test.
:::
:::
:::

::: check
kind: parts
given: m = 64 | 128; B = 25.6 | 51.2

## A DRAM channel delivers {B} GB/s of raw transfers; each {m}-bit data word is stored with SECDED check bits.

::: part
answer: m + ceil(log(m + 1 + ceil(log(m + 1)/log(2)))/log(2)) + 1
unit: bits
tolerance: 0

### How wide is each stored word?

::: misses
- [any] Data + Hamming + parity.
:::
:::

::: part
answer: B*m/(m + ceil(log(m + 1 + ceil(log(m + 1)/log(2)))/log(2)) + 1)
unit: GB/s
tolerance: 0.5%

### What data bandwidth remains, if the checks ride on the same pins?

::: misses
- [any] Raw rate × data fraction.
:::
:::
:::
:::
