spice-sim

Installation
SKILL.md

Spice Simulation

Add a small ngspice-backed testbench to a .zen design.

Workflow

  1. Confirm the target is simulation-capable by running a dummy sim. pcb sim <path/to/file.zen> --setup "* empty setup check"

  2. If the SPICE model is missing, add it. Find a vendor model, download it, or create a simple behavioral model if needed. Wire it through the leaf component with spice_model=SpiceModel(...) before writing the testbench.

  3. Create a focused testbench file. Use a generic package-local path such as <package>/testbench/test_<scenario>.zen.

  4. Keep the structure simple:

  • top docstring
  • imports
  • nets/interfaces
  • module-under-test instantiation
Related skills

More from diodeinc/pcb

Installs
344
Repository
diodeinc/pcb
GitHub Stars
230
First Seen
Apr 10, 2026