spice-sim
Add or run an ngspice-backed Zener testbench with `pcb sim`.
By diodeinc · 1,218 installs
npx skills add diodeinc/pcb --skill spice-sim
Source repository · Upstream listing
Spice Simulation
Use a focused testbench such as <package /testbench/test <scenario .zen for
one behavior: startup, enable, a protection threshold, or current limit. Reuse
an existing bench when it covers the request. Run it with pcb sim <file .zen ;
a separate dummy simulation is only useful when diagnosing setup problems.
Model and testbench
The leaf component needs spice model=SpiceModel(...) . Obtain a vendor model
or, when appropriate, use a behavioral model with explicit limitations. Match
nets to the subcircuit's declared terminal order:
Instantiate the module under test and needed loads/passives in Zener. Put
sources, waveforms, analysis, and plot commands in the raw ngspice setup
string of a top level Simulation :
Adapt the source and analysis to the behavior; for example, PULSE(...) for
enable timing or PWL(...) for a changing input. Write plots under
testbench/output/ and inspect only the signals needed to establish the result.
Distinguish a model or simulator failure from an electrical finding, and state
what the model and analysis actually verify.