Skip to content
SachinGoollaPublic

About

Open bottom-up DTCO: sky130 Vth shift -> re-characterized cells -> PicoRV32 timing/leakage, pre-registered gates (ngspice, lctime, Yosys, OpenSTA)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

Repository files navigation

ml-dtco

CI

Bottom-up design-technology co-optimization (DTCO) on an open stack. This repo connects transistor-level changes to chip-level PPA using only open tools: ngspice + sky130 BSIM4 models → cell characterization → Yosys/ABC synthesis → OpenSTA on the PicoRV32 RISC-V core. The end goal is ML-driven optimization across all layers.

The ML layers live in sibling repos:

The program plan is in docs/program/ROADMAP.md.

To our knowledge, no open-source, reproducible pipeline couples device models, cell characterization and open-PDK synthesis/timing under ML-driven optimization. That is a web-search absence, not a proof.

Phase 1 result: a threshold-voltage shift propagated to PicoRV32 (all pre-registered gates pass)

Setup:

  • Vth knob: the sky130 nfet_01v8 and pfet_01v8_hvt vth0 are shifted by a calibrated ΔV ∈ {−60, −30, 0, +30, +60} mV. The knob is verified within 0.34 mV on held-out points.
  • Cell set: 7 cells (inv_1, inv_2, buf_2, nand2_1, nor2_1, a21oi_1, o21ai_0) are re-characterized from Magic-extracted netlists with lctime + ngspice.
  • Design: PicoRV32 is synthesized once against the ΔV = 0 library, buffered (max fanout 16), frozen, and timed with OpenSTA against each library.
ΔV (mV) critical path D (ns) vs 0 mV leakage of the 7 cells (nW)
−60 3.131 −8.6 % 9.31
−30 3.271 −4.5 % 4.09
0 3.424 — 1.80
+30 3.590 +4.8 % 0.79
+60 3.773 +10.2 % 0.35
  • Delay: +4.8 % at +30 mV, inside the pre-registered +2…+8 % band.
  • Leakage: falls 26× from −60 to +60 mV. It stays within 2× of the 10^(−ΔV/SS) prediction, using the measured device SS of 96.5 mV/dec.
  • Self-consistency: our characterized path delay matches OpenSTA within −2.9 % (rise) and −2.3 % (fall), against a ±10 % gate.

How we got there: five runs, each one stopped at the first failed gate

Every criterion was written down before its run, in docs/PREREG*.md. Failures are kept in results/run1..run4.

run stopped at cause fix (pre-registered amendment)
1 G1(b) The pfet_01v8_hvt vth0 offset moves the extracted Vth by only 0.95×. 1b: calibrated knob
2 G2 The PDK liberty is not reproducible from the open models (23.7 % median error). 1c: self-consistency gate G2′ on extracted netlists
3 G2′ The characterizer's slew stimulus used 0–100 % ramps while the library uses 20–80 %. RUN4_BUGFIX.md
4 G4 The netlist was unbuffered (fanout 681), so STA extrapolated far outside the characterized tables. 1d: frozen buffering plus a table-range validity check
5 — all pass —

Disclosure: a run-4 diagnostic on in-range paths was seen before run 5, so the P1 delay prediction in run 5 is not blind.

Honest scope

  • This is a sky130-derived BSIM4-perturbation study at the typical corner: no FinFET, no PDK sign-off claim.
  • The flip-flops (dfxtp_1) are deliberately not re-characterized. Their leakage (≈13.5 nW) exceeds that of the 7 tuned cells, so chip-level leakage gains are much smaller than 26×.
  • Timing is pre-placement with zero wire RC.
  • The PDK's own pfet-off leakage is 30–150× higher than what the open models give; the cause is open.

Layout

  • src/p4slice/: model rewriting, ngspice drivers, lctime driver, liberty parsing.
  • scripts/: per-run gate scripts (*4.py / *5.py are the current ones).
  • docs/: pre-registrations and amendments.
  • results/runN/: gate outputs per run, with results/run5/phase1_results.md as the final report.
  • diag/: extraction diagnostics.
  • netlists/: extracted cells and the frozen buffered PicoRV32.
  • docs/program/: roadmap, toolchain versions, venv freeze.

Reproduce

Requirements:

  • the toolchain in docs/program/TOOLCHAIN.md: OpenLane 2.3.10 nix env, ngspice-42, Python venv as in venv-freeze.txt;
  • lctime 0.0.26 in its own venv;
  • SKY130A pointing to the sky130A PDK (volare hash 0fe599b2).

Run pytest -q (29 tests). Run 5 = scripts/char_lib4.py + build_libs4.py (libraries), synth4.py + buffer5.py + buf5_check.py (frozen buffered netlist, equivalence), sta5.py (G3/G4/P1/P2). run_all.sh reproduces run 2 only. Characterization takes about 18 min per ΔV point on 16 cores.

Next

  • ML on top of the loop: BO over device knobs → PPA (Project 4 outer loop).
  • A DEVSIM device front end (Project 1).
  • Feeding in the synthesis and sizing agents from the sibling repos.

License: Apache-2.0 (see NOTICE for the third-party material).

About

Open bottom-up DTCO: sky130 Vth shift -> re-characterized cells -> PicoRV32 timing/leakage, pre-registered gates (ngspice, lctime, Yosys, OpenSTA)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages