← Analog & Mixed-Signal Interviews

Interview Question · Code Writing

Monte Carlo on an Amplifier's Offset

L1 JuniorL2 Mid-Levelmismatchoffsetmonte carlo
  • Likely at Infineon
  • Likely at NVIDIA
  • Likely at AMD

The Question

The interviewer asks

Set up a Monte Carlo run for an OTA's offset. What do you report from it, and what number do you sign off?

Reveal the Model Answer

Give every transistor in every copy its own random draw. In sky130, turn mismatch on with MC_MM_SWITCH=1 and fix the seed, so the run repeats. Report the mean and σ. The mean is the systematic offset plus a small sampling error. Sign off at the mean plus or minus 3σ, not at the worst die you happened to sample. In the lesson 30 dies gave a mean of -2.62 mV and σ of 1.83 mV.

One Die: OTA-A as a FollowerThe output drives M2's gate, so the output follows the input. Every transistor draws its own threshold shift.
One die: OTA-A as a followerVDD1.8 VM3load 8/1M4load 8/1M1pair 10/1M2pair 10/1IB20 µAMB8/1M58/1outin
  1. The input pair

    A threshold shift of M2 against M1 appears at the input one to one.

  2. The load mirror

    A shift of M4 against M3 changes M4's current by gm3ΔV. M2 must absorb it, so the input sees ΔV·gm3/gm1, 0.57 times the shift.

  3. The bias

    MB and M5 change the tail current, which both halves share: what is left after the pair and load parts spreads by 24 µV.

Read the circuit as text
  • M3 PMOS transistor (load 8/1): gate → n1, source → VDD, drain → n1
  • M4 PMOS transistor (load 8/1): gate → n1, source → VDD, drain → n2
  • M1 NMOS transistor (pair 10/1): gate → n3, drain → n1, source → n4
  • M2 NMOS transistor (pair 10/1): gate → n2, drain → n2, source → n4
  • IB current source (20 µA): + → VDD, − → n5
  • MB NMOS transistor (8/1): gate → n5, drain → n5, source → 0
  • M5 NMOS transistor (8/1): gate → n5, drain → n4, source → 0
  • out port: terminal → n2
  • in port: terminal → n3

OTA-A of E5.3 (W/L in µm). In SKY130 the mismatch model shifts the threshold of each transistor only.

HistogramOffset of 30 OTA-A Followers, Pair 10/1, Load 8/1Offset = output − input, at 0.9 V in.
012345678Dies-8 mV-6 mV-4 mV-2 mV02 mV4 mVOffsetmean − 3σmean −2.62 mVmean + 3σ02468Dies-5 mV0Offsetmean − 3σmean −2.62 mVmean + 3σ
Read the histogram as a table
Offset fromtoDies
-9 mV-8 mV0
-8 mV-7 mV0
-7 mV-6 mV0
-6 mV-5 mV3
-5 mV-4 mV5
-4 mV-3 mV5
-3 mV-2 mV6
-2 mV-1 mV7
-1 mV0 V2
0 V1 mV1
1 mV2 mV0
2 mV3 mV0
3 mV4 mV1

30 values in 13 bins.

Offset of 30 Monte Carlo dies, seed 5: mean -2.62 mV, σ 1.83 mV.

Self-Check

Tick each key point you covered in your answer.

What Interviewers Listen For (Junior)

A good junior answer turns mismatch on with a fixed seed, so the run repeats. It reports the mean and σ of the offset.

Cross-Questions

Where the interviewer goes next. Open a node to practise that follow-up.

WhyWhat IfProve ItCompare

  1. Monte Carlo on an Amplifier's Offset
  2. WhyPelgrom's LawL1 JuniorL2 Mid-Level

    Why does a bigger device match better, and by how much?

    Reveal the Model Answer

    Random variations in doping and edges average out over a larger gate. For a pair, σ of the threshold difference is A_VT divided by √(W·L). Four times the area halves it. For sky130 the lesson found A_VT of about 4.75 mV·µm for the NMOS and 8.28 mV·µm for the PMOS.

    DC sweepThreshold Mismatch of a Pair Against 1/√(W·L)The straight line is Pelgrom's law with AVT = 4.746 mV·µm. The curve adds the model's size factor for square devices. The points are 20 measured pairs at each size.
    • Pelgrom, 4.746 mV·µm
    • model, square devices
    01 mV2 mV3 mV4 mV5 mV6 mV7 mV8 mVsigma of the threshold difference0.20.30.40.50.60.70.80.91.01/sqrt(W·L) (1/µm)1/1: 5.103 mV2/2: 2.895 mV4/4: 1.131 mV10/1: 1.370 mV02 mV4 mV6 mV8 mVsigma of the threshold difference0.20.40.60.81.01/sqrt(W·L) (1/µm)1/1: 5.103 mV2/2: 2.895 mV4/4: 1.131 mV10/1: 1.370 mV
    1. 1/sqrt(W·L) (1/µm) 0.25Pelgrom, 4.746 mV·µm = 1.187 mV · model, square devices = 1.23 mV

      The 4/4 pairs, 16 µm2: 1.131 mV measured, 1.230 mV on the model curve.

    2. 1/sqrt(W·L) (1/µm) 0.5Pelgrom, 4.746 mV·µm = 2.373 mV · model, square devices = 2.677 mV

      The 2/2 pairs, 4 µm2: 2.895 mV measured against 2.677 mV on the curve. A quarter of the area, about twice the mismatch.

    3. 1/sqrt(W·L) (1/µm) 1Pelgrom, 4.746 mV·µm = 4.746 mV · model, square devices = 6.398 mV

      The 1/1 pairs, 1 µm2: the model curve is 6.398 mV, 35 % above the straight line's 4.746 mV. That is the model's size factor. The 20 pairs measure 5.103 mV.

    Read the plot as a table
    1/sqrt(W·L) (1/µm)Pelgrom, 4.746 mV·µmmodel, square devices
    0.2949.2 µV968.3 µV
    0.251.187 mV1.23 mV
    0.31.424 mV1.501 mV
    0.41.898 mV2.07 mV
    0.52.373 mV2.677 mV
    0.62.848 mV3.325 mV
    0.73.322 mV4.018 mV
    0.83.797 mV4.759 mV
    0.94.271 mV5.551 mV
    14.746 mV6.398 mV

    Measured on ngspice 42 with 20 pairs per size and seed 5. The 10/1 device is not square, so it sits near the line and off the curve.

    Self-Check

    Tick each key point you covered in your answer.

  3. Prove ItSolve E7.5.1: Offset by the Square MicrometreSimulator-graded

    Show it, don't just say it: this Silicon Lab problem is graded by the simulator.

    Open Problem E7.5.1

  4. WhyWhy Mismatch Falls as the Square Root of AreaL2 Mid-Level

    Why does mismatch fall with 1/√(W·L), and not with 1/(W·L)?

    Reveal the Model Answer

    The threshold error comes from many small random events, such as single dopant atoms, spread over the gate. Their number grows with the area. The spread of a sum of random events grows only as its square root. Averaged over the area, the error therefore falls as 1/√(W·L).

    Self-Check

    Tick each key point you covered in your answer.

    Misconception

    "Double the width to halve the offset."

    Doubling W doubles the area, which cuts σ only by √2. Halving σ needs four times the area.

    Source Pelgrom, Duinmaijer and Welbers, Matching Properties of MOS Transistors, IEEE JSSC 1989

  5. What IfWhich Device to Make BiggerL2 Mid-LevelL3 Senior

    Asked if they say to make every device bigger

    What if you can afford more area for only one device pair? Which do you grow?

    Reveal the Model Answer

    Grow the pair whose share dominates the offset. Each pair's part adds as a power: the input pair one to one, the load mirror scaled by g_m3/g_m1. Four times the area of every device halves σ. Sixteen times the area of one pair leaves the other pair's part untouched, so it helps only if that pair dominated.

    DC sweepPair Part and Load Part of Each Die, Pair 10/1The lab's 30 dies. Neither part dominates.
    • offset − mean
    • pair part
    • load part
    -4 mV-2 mV02 mV4 mV6 mV8 mVRandom offset51015202530Die-4 mV-2 mV02 mV4 mV6 mV8 mVRandom offset102030Die
    1. Die 8offset − mean = -2.568 mV · pair part = -3.491 mV · load part = 869.4 µV

      Die 8: the pair part is −3.49 mV and the load part +0.87 mV, together −2.62 mV. The die sits 2.57 mV below the mean: the two parts leave 0.05 mV over.

    2. Die 17offset − mean = 5.798 mV · pair part = 2.062 mV · load part = 3.728 mV

      Die 17: +2.06 mV from the pair and +3.73 mV from the load, so the die sits 5.80 mV above the mean.

    Read the plot as a table
    Dieoffset − meanpair partload part
    5-1.543 mV-1.144 mV-434.1 µV
    8-2.568 mV-3.491 mV869.4 µV
    101.395 mV146.1 µV1.228 mV
    15-1.191 mV-888.5 µV-319.6 µV
    175.798 mV2.062 mV3.728 mV
    201.413 mV778.9 µV682.6 µV
    25-392.1 µV1.437 mV-1.81 mV
    30-636.4 µV-559 µV-94.61 µV

    Each die's offset split into the pair part and the load part. Here neither dominates, so growing one pair alone helps little.

    Self-Check

    Tick each key point you covered in your answer.

  6. CompareProcess Corners vs Monte CarloL1 JuniorL2 Mid-Level

    Compare process corners with a mismatch Monte Carlo run. Do you need both?

    Reveal the Model Answer

    Yes. A process corner moves every transistor of a type together, the global spread between wafers. Mismatch moves each transistor alone, the local spread on one die. Offset comes mostly from mismatch, while bias currents and speed move mostly with corners. Sign-off runs corners crossed with supply and temperature, plus Monte Carlo.

    Self-Check

    Tick each key point you covered in your answer.

  7. Prove ItSolve E7.6.1: Nine Settings, One VerdictSimulator-graded

    Show it, don't just say it: this Silicon Lab problem is graded by the simulator.

    Open Problem E7.6.1

  8. Prove ItSolve E7.5.1: Offset by the Square MicrometreSimulator-graded

    Show it, don't just say it: this Silicon Lab problem is graded by the simulator.

    Open Problem E7.5.1

What People Get Wrong

Common wrong answers and why they fail.

Misconception

"Sign off at the worst die in the Monte Carlo run."

The worst of 30 samples depends on luck. The lesson's worst sampled die was -5.19 mV, while mean minus 3σ is about -8.1 mV. Use the statistics, not the sample.

Source ASIC Point lesson E7.5 (measured)

Half-Truth

"Thirty samples give an exact σ."

Thirty samples know σ only to about ±13 %. Add margin, or run more samples, before trusting a tight budget.

Source ASIC Point lesson E7.4

Learn It, Then Prove It