Lab 4

Current Mirrors and Bias

Compare the basic, cascode and wide-swing mirrors, weigh their systematic error against random mismatch, and make the beta-multiplier reference start in every corner.

Contents
Lab 4 at a glance  
Goal Compare the basic, cascode and wide-swing mirrors, weigh their systematic error against random mismatch, and make the beta-multiplier reference start in every corner.
Reproduces Chapter 8 (Sections 8.2–8.5, Figure 8.4, Table 8.2), Chapter 13 (Section 13.6) and Chapter 14 (Figure 14.1, Section 14.6)
Time 3 hours
Files labs/lab4: mirrors_tb, mc_mirror_tb, beta_tb, startup_tb (.sch) per PDK; mc_stats.py

Hand calculation

The basic mirror of Figure 8.4 copies 10 µA with devices at \(g_m/I_D\) = 8, L = 1 µm (W = 1.08 µm in SG13G2, 1.41 µm in SKY130; \(V_A\) = 4.0 V and 17.7 V, \(V_{GS}\) = 0.49 V and 0.83 V). Estimate (a) its systematic error with the output at \(V_{DD}/2\), \((V_{DD}/2 - V_{GS})/V_A\), and (b) its random error, \(\sigma(\Delta I/I) \approx (g_m/I_D)\,A_{VT}/\sqrt{WL}\) with the \(A_{VT}\) of Table 13.3 (5.7 and 5.6 mV·µm). Which error is larger?

Steps

  1. Three mirrors. Run ../../sim.sh mirrors_tb.sch. It sweeps the common output node of the three mirrors from 0 to \(V_{DD}\) and prints, for each, the error at \(V_{DD}/2\), the output resistance 0.1 V below the supply and the knee (the lowest output voltage at which the output resistance is within a factor of ten of that value). plot ra rb rc shows Figure 8.4(c, d).
  2. Monte Carlo. mc_mirror_tb.sch holds 100 copies of the basic mirror, each with its own 10 µA reference, all outputs at \(V_{DD}/2\). Its MODELS block selects the mismatch models (mos_tt_mismatch in SG13G2, tt_mm in SKY130; Section 13.8) and fixes the random seed. Run it, then python3 ../mc_stats.py: the mean error is the systematic error of step 1, the spread is the random error.
  3. The reference. Run ../../sim.sh beta_tb.sch: the beta multiplier of Chapter 8, with the PDK’s high-resistance poly resistor, twice, once with the start-up circuit (S1–S3) and once without. It prints the output current, its sensitivity to the supply between 0.9 and 1.1 \(V_{DD}\), and its value at −40 °C and 125 °C.
  4. Start-up. startup_tb.sch ramps the supply from 0 to \(V_{DD}\) in 10 µs. Run it at tt, then in the slow and fast corners at both temperature extremes: ../../corners.py startup_tb.sch --corners ss,ff --temps=-40,125. Compare the final currents of the two copies.

Checkpoint

Table 18.5. Lab 4 results (tt, 27 °C unless stated). Mirror outputs at VDD/2.

Quantity SG13G2 SKY130
Error of basic / cascode / wide-swing mirror +2.88 / −0.99 / +0.41 % +0.56 / −0.52 / +0.02 %
Output resistance 0.1 V below \(V_{DD}\) 574 kΩ / 13.0 MΩ / 12.2 MΩ 1.82 / 141.5 / 66.1 MΩ
Knee 0.17 / 0.63 / 0.49 V 0.26 / 1.07 / 0.64 V
Monte Carlo, 100 basic mirrors: mean error, σ +3.09 %, 4.52 % +0.91 %, 3.81 %
Beta multiplier: current, supply sensitivity 10.00 µA, 40.7 %/V 10.00 µA, 13.7 %/V
Reference current at −40 °C / 125 °C 6.23 / 19.9 µA 8.09 / 12.7 µA
Supply ramp, tt: final current with / without start-up 10.0 / 10.0 µA 10.0 µA / 3 pA
Time to 90 % of the final current (with start-up) 8.15 µs 7.85 µs
Without start-up, ss and ff at −40 °C and 125 °C starts in all four stays off, except ff at 125 °C

Questions

  • The cascode mirrors cut the systematic error to below 1 %, but the Monte Carlo spread of the basic mirror is 4.5 % and 3.8 %. Would a cascode change the spread? What would?
  • The SG13G2 reference starts without a start-up circuit; the SKY130 one stays at 3 pA, except in the ff corner at 125 °C. What decides whether the zero-current state survives a supply ramp, and why is “it started in my simulation” not proof that a design does not need a start-up circuit?
  • The SG13G2 reference current triples between −40 °C and 125 °C, the SKY130 current rises by 56 %. Which component of the reference sets this, and how does Chapter 14 fix it?

Extension

Add 100 copies of the wide-swing mirror to mc_mirror_tb.sch (copy and rename the cells, or edit tools/labs/build_labs.py and rebuild) and confirm that its spread is the same as the basic mirror’s while its mean error is ten times smaller. Then quadruple the area of the mirror devices (twice W, twice L) and check that σ halves.


Back to top

SkillSurf · The Art of Analog IC Design, draft v0.1 (November 2026). Every source is listed on the References page.

© 2025–2026 SkillSurf. Text, figures and 3D models: CC BY 4.0; code: MIT. The SkillSurf name and logo are not covered.

This course was written with the help of AI tools and may contain mistakes. If you find one, please tell us through SkillSurf or email skillsurfedu@gmail.com, and we will correct it.

This site uses Just the Docs, a documentation theme for Jekyll.