---
title: Problem set 2
heading: "Problem set 2: CMOS gates, logical effort and buses"
eyebrow: C7 · Problem set 2
type: problems
---

::: hook
These problems use lessons 7 to 11: the CMOS inverter and CMOS gates, logical effort, tri-state and open-drain outputs, and interfacing logic to LEDs and other supply voltages. Sizes are relative to a unit inverter (NMOS 1, PMOS 2) unless a problem says otherwise.
:::

::: pool
pick: 12

::: check
kind: parts
given: a = 0.05 | 0.1 | 0.5; C = 1 | 5; V = 0.8 | 0.9 | 1.2; f = 0.5 | 2; N = 1e5 | 1e7

## {N} nodes each switch {C} fF with activity {a} at {f} GHz on {V} V.

::: part
answer: N*a*C*1e-15*V^2*f*1e9
unit: W
tolerance: 0.5%

### What dynamic power do they draw?

::: misses
- [N*a*C*1e-15*V*f*1e9] Power goes as $V^2$.
- [any] $N\alpha CV^2f$.
:::
:::

::: part
answer: N*a*C*1e-15*(0.8*V)^2*f*1e9
unit: W
tolerance: 0.5%

### What would they draw with the supply cut by 20%?

::: misses
- [N*a*C*1e-15*V^2*f*1e9*0.8] The supply enters squared: $0.8^2$.
- [any] Scale by $0.64$.
:::
:::
:::

::: check
kind: parts
given: N = 1e8 | 1e9; I = 1 | 20; V = 0.7 | 1

## A chip has {N} transistors leaking {I} nA each on {V} V.

::: part
answer: N*I*1e-9*V
unit: W
tolerance: 0.5%

### What's its leakage power?

::: misses
- [any] $NIV$.
:::
:::

::: part
answer: N*I*1e-9*V*0.1
unit: W
tolerance: 0.5%

### What if power gating turns off 90% of it?

::: misses
- [any] A tenth remains.
:::
:::
:::

::: check
kind: parts
given: n = 2 | 3 | 4

## Gates with n = {n} inputs are sized to match a unit inverter.

::: part
answer: (n + 2)/3
tolerance: 0.5%

### What's the NAND's logical effort?

::: misses
- [any] $\frac{n + 2}{3}$.
:::
:::

::: part
answer: n*n + 2*n
tolerance: 0.5%

### What total transistor width does the NAND use?

::: misses
- [n*n] Add the PMOS: n devices 2 wide.
- [any] n NMOS n wide plus n PMOS 2 wide.
:::
:::
:::

::: check
kind: parts
given: H = 20 | 100 | 1000; N = 2 | 3 | 5

## An inverter chain of N = {N} stages drives a load {H} times its input.

::: part
answer: N*H^(1/N) + N
tolerance: 0.5%

### What's its least delay, in τ?

::: misses
- [any] $NH^{1/N} + N$.
:::
:::

::: part
answer: log(H)/log(4)
tolerance: 0.5%

### About how many stages would be best?

::: misses
- [any] $\log_4H$.
:::
:::
:::

::: check
kind: parts
given: H = 10 | 30 | 60

## A path of a NAND2, a NOR2 and an inverter drives a load {H} times the NAND2's input.

::: part
answer: (4/3*5/3*H)^(1/3)
tolerance: 0.5%

### What's the best stage effort?

::: misses
- [H^(1/3)] Include the logical efforts in the path effort.
- [any] $(GH)^{1/3}$ with $G = \frac43 \cdot \frac53$.
:::
:::

::: part
answer: 3*(4/3*5/3*H)^(1/3) + 5
tolerance: 0.5%

### What's the least delay, in τ?

::: misses
- [3*(4/3*5/3*H)^(1/3)] Add the parasitic delays, 2 + 2 + 1.
- [any] $3f + \sum p$.
:::
:::
:::

::: check
kind: parts
given: g = 1 | 1.333 | 1.667; Cin = 1 | 4; Cout = 4 | 16 | 64; p = 1 | 2

## A gate with logical effort {g}, input capacitance {Cin} and parasitic delay {p} drives {Cout} units.

::: part
answer: Cout/Cin
tolerance: 0.5%

### What's its electrical effort?

::: misses
- [any] $\frac{C_\text{out}}{C_\text{in}}$.
:::
:::

::: part
answer: g*Cout/Cin + p
tolerance: 0.5%

### What's its delay, in τ?

::: misses
- [any] $gh + p$.
:::
:::
:::

::: check
kind: parts
given: H = 64 | 256; f = 4 | 8

## A buffer chain must drive {H} times its input, with each stage scaled up by {f}.

::: part
answer: log(H)/log(f)
tolerance: 0.5%

### How many stages does it take?

::: misses
- [any] $\log_fH$.
:::
:::

::: part
answer: log(H)/log(f)*(f + 1)
tolerance: 0.5%

### What's the delay, in τ?

::: misses
- [any] Each stage costs $f + 1$.
:::
:::
:::

::: check
kind: parts
given: V = 1.8 | 3.3 | 5; R1 = 30 | 60; R2 = 20 | 70

## Two tri-state drivers on a {V} V bus fight: {R1} Ω high, {R2} Ω low.

::: part
answer: V/(R1 + R2)*1000
unit: mA
tolerance: 0.5%

### What current flows?

::: misses
- [any] $\frac{V}{R_1 + R_2}$.
:::
:::

::: part
answer: V^2/(R1 + R2)*1000
unit: mW
tolerance: 0.5%

### What power do they dissipate together?

::: misses
- [any] $\frac{V^2}{R_1 + R_2}$.
:::
:::
:::

::: check
kind: parts
given: V = 3.3 | 5; C = 100 | 300; t = 0.3 | 1; I = 3 | 10

## An open-drain bus on {V} V has {C} pF, a {t} µs rise-time limit, and drivers sinking {I} mA at 0.4 V.

::: part
answer: t*1e-6/(ln(7/3)*C*1e-12)/1000
unit: kΩ
tolerance: 0.5%

### What's the largest pull-up?

::: misses
- [any] $\frac{t_r}{0.847C}$.
:::
:::

::: part
answer: (V - 0.4)/I
unit: kΩ
tolerance: 0.5%

### What's the smallest?

::: misses
- [any] $\frac{V - V_{OL}}{I_{OL}}$.
:::
:::
:::

::: check
kind: parts
given: R = 1 | 4.7 | 10; C = 20 | 200

## An open-drain line has a {R} kΩ pull-up and {C} pF.

::: part
answer: ln(7/3)*R*C
unit: ns
tolerance: 0.5%

### What's its 30% to 70% rise time?

::: misses
- [R*C] From 30% to 70% takes $\ln\frac73$ time constants.
- [any] $RC\ln\frac73$.
:::
:::

::: part
answer: ln(2)*R*C
unit: ns
tolerance: 0.5%

### How long until it crosses half the supply?

::: misses
- [any] $RC\ln2$.
:::
:::
:::

::: check
kind: parts
given: V = 1.8 | 3.3; R = 20 | 50; C = 1 | 10; N = 4 | 16

## A CMOS output ({R} Ω) on {V} V drives N = {N} inputs of {C} pF each.

::: part
answer: 0.69*R*N*C/1000
unit: ns
tolerance: 0.5%

### What's its 50% delay?

::: misses
- [any] $0.69R\cdot NC$.
:::
:::

::: part
answer: N*C*1e-12*V^2*1e12
unit: pJ
tolerance: 0.5%

### How much energy does a full cycle (rise and fall) of that load take?

::: misses
- [any] $C_\text{total}V^2$.
:::
:::
:::

::: check
kind: boolean
vars: A, B, C, D
answer: A & B & C & D
ops: and, or, not

## Four open-drain outputs A to D share a line with a pull-up. Write the line.

::: right
Right: the wired-AND, ABCD.
:::

::: misses
- [any] Not yet. Any output pulling low makes the line low.
:::
:::

::: check
kind: parts
given: n = 2 | 3 | 4

## An n-input NOR with n = {n} is sized to match a unit inverter.

::: part
answer: (2*n + 1)/3
tolerance: 0.5%

### What's its logical effort?

::: misses
- [any] $\frac{2n + 1}{3}$.
:::
:::

::: part
answer: (2*n + 1)/(n + 2)
tolerance: 0.5%

### How many times the NAND's logical effort is that?

::: misses
- [any] Ratio of the two.
:::
:::
:::

::: check
kind: parts
given: H = 8 | 64 | 512

## An inverter drives a load {H} times its input, alone or through a chain of the best length.

::: part
answer: H + 1
tolerance: 0.5%

### What's the delay with one inverter, in τ?

::: misses
- [any] $H + 1$.
:::
:::

::: part
answer: (log(H)/log(4))*(H^(1/(log(H)/log(4))) + 1)
tolerance: 0.5%

### What does the formula $N(H^{1/N} + 1)$ give at the best length, $N = \log_4H$?

::: misses
- [any] $N(H^{1/N} + 1)$ with $N = \log_4H$.
:::
:::
:::

::: check
kind: parts
given: a = 0.1 | 0.3; Cn = 2 | 4; Cl = 5 | 20; V = 0.8 | 1

## A node of {Cn} fF switches with activity {a}, and the clock network drives {Cl} fF of clock load per node with activity 1, on {V} V.

::: part
answer: Cl/(Cl + a*Cn)*100
unit: %
tolerance: 0.5%

### What share of the dynamic power goes to the clock?

::: misses
- [any] $\frac{C_\text{clk}}{C_\text{clk} + \alpha C_\text{node}}$.
:::
:::

::: part
answer: (Cl + a*Cn)*1e-15*V^2*1e15
unit: fJ
tolerance: 0.5%

### What energy per cycle is that, per node?

::: misses
- [any] $(C_\text{clk} + \alpha C_\text{node})V^2$.
:::
:::
:::

::: check
kind: parts
given: Vin = 5 | 6; R1 = 1.8 | 2.2 | 10; R2 = 3.3 | 4.7 | 15; C = 5 | 15

## A {Vin} V logic signal reaches a 3.3 V input through a divider of {R1} kΩ over {R2} kΩ, with {C} pF at the input.

::: part
answer: Vin*R2/(R1 + R2)
unit: V
tolerance: 0.5%

### What high level reaches the input? (Compare it with the 3.6 V limit.)

::: misses
- [Vin*R1/(R1 + R2)] The output is across the bottom resistor.
- [any] Not yet. $V_{in}R_2/(R_1 + R_2)$.
:::
:::

::: part
answer: 2.2*R1*R2/(R1 + R2)*C
unit: ns
tolerance: 0.5%

### What's its 10 to 90% rise time? (kΩ times pF is nanoseconds.)

::: misses
- [2.2*R1*C] The input sees $R_1 \| R_2$.
- [any] Not yet. $2.2(R_1 \| R_2)C$.
:::
:::

::: right
Right. Check both numbers: the level must be safe and the edge fast enough for the signal.
:::
:::
:::
