* Auto-generated testbench for decoupling analysis: VBUS rail
* 3 capacitor(s) in parallel, series R-L-C model
* Model: ESR/ESL from pdn_impedance (package-based)

R_esr_C7 rail n_esr_0 15.8m
L_par_C7 n_esr_0 n_lpar_0 900p
C7 n_lpar_0 0 10u
R_esr_C3 rail n_esr_1 100m
L_par_C3 n_esr_1 n_lpar_1 7.5n
C3 n_lpar_1 0 100u
R_esr_C8 rail n_esr_2 15.8m
L_par_C8 n_esr_2 n_lpar_2 900p
C8 n_lpar_2 0 10u

* 1A AC current source into the rail node — V(rail) = Z(f)
IAC 0 rail DC 0 AC 1

.control
ac dec 200 100 100Meg
let z_mag = vm(rail)
meas ac z_min min z_mag
meas ac f_at_zmin when z_mag=z_min
meas ac z_at_1M find vm(rail) at=1Meg
meas ac z_at_100k find vm(rail) at=100k
echo "z_min=$&z_min f_at_zmin=$&f_at_zmin z_at_1M=$&z_at_1M z_at_100k=$&z_at_100k n_caps=3" > analysis/spice_runs/decoupling_C7_C3_C8.out
quit
.endc

.end
