Practice

Hands-On Labs

Nine labs, each reproducing one chapter's key results in both PDKs: from the first simulation to a laid-out, verified amplifier. Every testbench runs in IIC-OSIC-TOOLS, and every checkpoint value is what it printed there.

Contents

The nine labs

Lab 0

Set Up the Tools

Install IIC-OSIC-TOOLS, get the lab files and run your first testbench in both PDKs.

Lab 1

Device Characterization

Measure the threshold, the square-law parameters, the subthreshold slope, the small-signal parameters, fT, the ZTC point and the corner spread of the core transistors.

Lab 2

gm/ID Lookup Tables

Produce the four gm/ID charts of your PDK from the characterization testbench, see which of them move with the process corner, and size a stage from the lookup tables.

Lab 3

The Common-Source Amplifier

Compare the three loads of the common-source stage, see why a high-gain stage has no output bias of its own, and measure its poles, its zero and what a cascode does to them.

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.

Lab 5

The 5T OTA

Build Chapter 10's five-transistor OTA as a subcircuit and verify its hand design: gain, bandwidth, phase margin, slew rate, input range, offset and power.

Lab 6

The Two-Stage OTA

Verify the course OTA of Chapter 12 with the double-injection probe over corners and temperature, see how the Miller capacitor and the nulling resistor set the phase margin, and why a naive loop break misleads.

Lab 7

Noise and Monte Carlo

Measure the input-referred noise of both course OTAs and compare it with Eq. (13.8); measure the random offset of 200 copies of the 5T OTA and of a version with a four times larger input pair.

Lab 8

Layout and Verification

Generate the layout of the course OTA, check it with DRC and LVS, find errors from the reports, extract it and compare the post-layout simulation with the schematic.

How the labs work

Every lab has a folder in the course files, labs/, with one subfolder per PDK: labs/lab3/sg13g2/ and labs/lab3/sky130/ hold the same testbenches drawn with each PDK’s own symbols. Each testbench is an Xschem schematic (*_tb.sch) with the circuit, a MODELS block that loads the PDK models and an NGSPICE block with the analyses and meas statements that print the numbers of the checkpoint table. Every file was netlisted and simulated in IIC-OSIC-TOOLS 2026.10, and every checkpoint value in this chapter is what those runs printed.

From Lab 1 on, the testbenches are generated rather than drawn by hand: tools/labs/build_labs.py describes each one once and writes it with the symbols of both PDKs, so the SG13G2 and SKY130 versions are the same circuit. Nets are joined by named labels rather than long wires, so read a schematic by its labels: two pins with the label tail are connected. tools/labs/run_labs.py reruns every testbench in the container, exactly as below, and stores what it prints in tools/labs/lab_numbers.json, from which the checkpoint tables are taken.

You can run a testbench in two ways, with the same result:

  • In the Xschem GUI. Open the schematic, press Netlist, then Simulate. ngspice opens in a terminal, runs the NGSPICE block and leaves its prompt open, where plot v(out) and print work.
  • From a terminal, with the helper script labs/sim.sh. It does what the two buttons do, without a display, and saves the netlist, the output and every file the simulation writes in ./simulations:
cd /foss/designs/art_of_aicd/labs/lab3/sg13g2
../../sim.sh cs_loads_tb.sch

To run one testbench in several process corners and temperatures, use labs/corners.py. It netlists the schematic once, changes the corner word of the MOSFET .lib line (mos_tt in SG13G2, tt in SKY130) and the temperature for each run, and prints one table with every value the testbench prints:

../../corners.py corner_tb.sch                      # tt ss ff sf fs at 27 C
../../corners.py ota2s_tb.sch --temps=-40,27,125   # every corner at three temperatures

Write negative temperatures with an equals sign, as above, or the argument parser mistakes them for an option.

Each lab follows the rhythm of the book: a short hand calculation that you do before you simulate, the simulation, and a checkpoint table with the values you should see in both PDKs. If your number differs from the table by more than the last digit, stop and find out why before you go on: a wrong .lib line, a unit mistake (W=2 against W=2u, Section 2.6) or a PDK that is not selected explains almost every case. The questions after each table are for thinking, not for simulating; the extension task is where you leave the prepared path.

  • Every lab follows the same rhythm: a hand calculation, a ready-made testbench in both PDKs, a checkpoint table to compare with, and questions that ask why the numbers are what they are.
  • The testbenches are generated from one description for both PDKs (tools/labs/build_labs.py) and every checkpoint value is what they printed in IIC-OSIC-TOOLS 2026.10 (tools/labs/run_labs.py); labs/sim.sh and labs/corners.py run them without a display.
  • Labs 1–7 reproduce the device, building-block and amplifier results of Chapters 4–14; Lab 8 takes the course OTA through layout, DRC, LVS, extraction and post-layout simulation.
  • When your number differs from the table, find out why before you go on: most differences are a wrong model line, a unit or a PDK that is not selected, and the rest are worth a question in class.

Further reading

  • H. Pretl, M. Koefinger and S. Dorrer [2]: the JKU analog circuit design course, with its own SG13G2 exercises in the same tools.
  • The IHP Analog Academy [3]: SG13G2 design examples from schematic to layout.
  • IIC-OSIC-TOOLS [35]: the container used by every lab, with the release notes of each tool version.

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.