$npx -y skills add Arcadia-1/gmoverid-skill --skill gmoveridgm/ID transistor characterization and design methodology, based on ngspice + Python. Two independent workflows: (1) Characterization — generates three standard curve sets for any MOSFET model: gate capacitance (Cgg/Cgs/Cgd/Cgb vs Vgs), gm/ID four-quadrant characteristics (gm/Id v
| 1 | # gm/ID Characterization and Design Skill |
| 2 | |
| 3 | > **Important — do not modify skill files during normal use.** |
| 4 | > All code edits, new scripts, plots, and simulation outputs should go into the user's **project working directory** (outside `.claude/`), not into this skill folder. Only modify the skill assets (`assets/`, `SKILL.md`, `references/`) when the user explicitly asks to improve or extend the skill itself. |
| 5 | |
| 6 | **Dependency**: `ngspice` skill (netlist execution, wrdata parsing). Model files are built in — the `transistor-models` skill is not required. |
| 7 | |
| 8 | ## Asset Files |
| 9 | |
| 10 | ``` |
| 11 | assets/ |
| 12 | ├── simulate_gmoverid.py — ngspice simulation engine, data extraction, analytical caps, MODEL_INFO registry |
| 13 | ├── plot_gmoverid.py — all matplotlib plotting functions |
| 14 | ├── run_gmoverid.py — 180 nm single-node orchestration (NMOS/PMOS + channel-length sweep) |
| 15 | ├── run_multinode.py — multi-node orchestration (45/22 nm HP) |
| 16 | ├── design_gmoverid.py — GmIdTable lookup/sizing API + print_op() |
| 17 | ├── models/ — built-in PTM model files (ready to use) |
| 18 | │ ├── nmos180.lib — 180 nm BSIM3v3 (VDD = 1.8 V) |
| 19 | │ ├── pmos180.lib |
| 20 | │ ├── nmos45hp.lib — 45 nm HP BSIM4 (VDD = 1.0 V) |
| 21 | │ ├── pmos45hp.lib |
| 22 | │ ├── nmos22hp.lib — 22 nm HP BSIM4 (VDD = 0.8 V) |
| 23 | │ └── pmos22hp.lib |
| 24 | └── netlist/ |
| 25 | ├── gmoverid_vgs.cir.tmpl — NMOS Vgs sweep (fixed Vds) |
| 26 | ├── gmoverid_vds.cir.tmpl — NMOS Vds sweep (fixed Vgs) |
| 27 | ├── gmoverid_pmos_vsg.cir.tmpl — PMOS |Vsg| sweep (fixed |Vsd|) |
| 28 | └── gmoverid_pmos_vsd.cir.tmpl — PMOS |Vsd| sweep (fixed |Vsg|) |
| 29 | ``` |
| 30 | |
| 31 | Built-in models are from [PTM — Arizona State University (ptm.asu.edu)](https://ptm.asu.edu), free for academic research. When citing, use: W. Zhao and Y. Cao, "New Generation of Predictive Technology Model for Sub-45 nm Early Design Exploration," *IEEE Trans. Electron Devices*, vol. 53, no. 11, pp. 2816–2823, Nov. 2006. doi: 10.1109/TED.2006.884077. For nodes beyond the three built-in ones, install the `transistor-models` skill (full PTM library, requires manual MODEL_INFO configuration) or download from [mec.umn.edu/ptm](https://mec.umn.edu/ptm) and copy the `.lib` file into the project's `models/` directory. |
| 32 | |
| 33 | --- |
| 34 | |
| 35 | ## Workflow 1: Characterization (Simulation + Plotting) |
| 36 | |
| 37 | ### Deployment |
| 38 | |
| 39 | 1. Copy all assets (including the `models/` subdirectory) to `<project>/` |
| 40 | 2. Create empty directories `plots/` and `logs/` |
| 41 | 3. Run `python run_gmoverid.py` (180 nm) or `python run_multinode.py` (HP multi-node) |
| 42 | |
| 43 | For additional nodes, simply copy the extra `.lib` file into `<project>/models/`. |
| 44 | |
| 45 | All paths resolve automatically via `Path(__file__).resolve().parent` — no path configuration needed. |
| 46 | |
| 47 | ### Three Standard Plot Sets (per model) |
| 48 | |
| 49 | | Set | Function | Output file | |
| 50 | |-----|----------|-------------| |
| 51 | | Gate capacitance | `plot_caps()` | `gmoverid_caps_{model}_L{node}nm.png` | |
| 52 | | gm/ID four-quadrant | `plot_main()` | `gmoverid_{model}_L{node}nm.png` | |
| 53 | | IV characteristics | `plot_iv()` | `gmoverid_iv_{model}_L{node}nm.png` | |
| 54 | |
| 55 | **gm/ID four-quadrant layout (`plot_main`, 2×2):** |
| 56 | ``` |
| 57 | (0,0) gm/Id [V⁻¹] vs Vov | (0,1) Id/W [uA/um] vs gm/Id (log Y) |
| 58 | (1,0) fT [GHz] vs gm/Id | (1,1) gm·ro vs gm/Id |
| 59 | ``` |
| 60 | - All four panels use Vds as the curve parameter (VDS_LIST) |
| 61 | - gm/Id X-axis: xlim = [4, 24], one grid division per 2 V⁻¹ |
| 62 | - Panels (0,1), (1,0), (1,1) apply `_fall_mask(gmid)` before plotting — the gm/ID array is double-valued (same gm/ID appears on the subthreshold rising side and the inversion falling side); only the falling (inversion) side is kept to prevent curve fold-back. Panel (0,0) is exempt because its X-axis is Vov, which is monotonic. |
| 63 | |
| 64 | ### Adding a New Technology Node |
| 65 | |
| 66 | 1. Copy the model `.lib` into `models/` (download from [mec.umn.edu/ptm](https://mec.umn.edu/ptm) or install the `transistor-models` skill) |
| 67 | 2. Add an entry to `MODEL_INFO` in `simulate_gmoverid.py` (see conventions.md §3) |
| 68 | 3. Add an entry to `NODE_CFG` in `run_multinode.py` |
| 69 | |
| 70 | --- |
| 71 | |
| 72 | ## Plotting Conventi |