Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sky130 two-stage Miller OTA — characterization harness

Native toolchain (arm64 macOS): ngspice + a Python venv + sky130A PDK via volare. Build the measuring instrument first; the DUT (ota.spice) drops in last.

Run

# gm/ID device tables + design charts
.venv/bin/python gmid/sweep.py nfet      # -> nfet.h5
.venv/bin/python gmid/sweep.py pfet      # -> pfet.h5
.venv/bin/python gmid/plot.py            # -> nfet_gmid.png, pfet_gmid.png

# any testbench standalone
ngspice -b tb/ac.sp                       # gain / UGB / PM
ngspice -b tb/{tran_sr,psrr,cmrr,noise,offset_mc}.sp

# 45-corner sweep (needs a real ota.spice) + report
.venv/bin/python run/run.py               # --dummy to skip the PDK lib
.venv/bin/python report/report.py         # corner_summary.md, bode.png, mc_offset.png

Dropping in your ota.spice

The harness is validated against an ideal 2-pole dummy (tb/dummy_ota.spice). To characterize the real amp:

  1. Port order (exact): .subckt ota inp inn out vdd vss
  2. Do NOT include the sky130 lib inside ota.spice. The harness injects the process corner via tb/corner.inc (run/run.py writes the .lib ... <corner> line). If ota.spice pins its own corner, the process sweep silently won't vary. ota.spice should reference sky130_fd_pr__{nfet,pfet}_01v8 devices only.
  3. In each tb/*.sp, change .include tb/dummy_ota.spice.include ota.spice.
  4. run/run.py (no --dummy) then sweeps {tt,ss,ff,sf,fs}×{−40,27,125}C×{1.62,1.8,1.98}V.

Known gaps (deliberate)

  • PSRR/CMRR/noise/offset numbers are meaningless on the dummy by construction (no supply path, perfect symmetry, no mismatch). They validate with real devices.
  • offset_mc.sp needs sky130 mismatch models active (mc_mm_switch=1, already set).

About

Sky130 (130nm) two-stage Miller-compensated OTA: gm/ID sizing + open-source ngspice characterization harness (corners, PSRR/CMRR/noise, MC offset)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages