spice-sim
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 -v <file>.zen; a separate dummy simulation is only useful when diagnosing setup problems.
pcb sim runs the ngspice executable in batch mode in the testbench's directory and stops it after 5 seconds.
Without -v, a successful run prints only that it passed.
Model and testbench
Every component that is not DNP needs a SPICE model.
The stdlib generics, such as resistors, capacitors, inductors, ferrite beads, crystals, diodes, LEDs, and TVS diodes, have their own.
A 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, and pass every PARAMS: entry in args, because defaults are not applied: