.subckt SII2161_ideal iin vc iout *V1 iin 0 0 R1 iin 0 1p R2 vc 0 10k * Create output current based on the input current and the control voltage B1 iout 0 I=limit(-I(R1), -1m, 1m)*2**(-5.0505*V(vc)) * Limit output voltage with a specialized diode D1 iout 0 clamp_diode .model clamp_diode D(Ron=10 Roff=1Meg Vfwd=.1 Vrev=.1) .ends