6 subckt dumb_resistor (a b)
11 subckt foo (vcc in out)
16 Re (e 0 vcc) dumb_resistor r=abs(-z)/10
17 Rb1 (b vcc) resistor r=100k
18 Rb2 (b 0) dumb_resistor r=r
19 Cin (b in vcc) capacitor c=1u
20 Cout (c) capacitor c=1u
21 Rin in 0 vcc resistor r=100k
22 Rout out resistor r=100k
25 X1 (V_cc amp_in out) foo r=10k
26 Rin1 (in amp_in) resistor r=10*(1-gain)
27 Rin2 (amp_in 0) resistor r=10*gain
29 simulator lang=spice insensitive=no
30 Vin (in 0) vsource ac .2
31 Vcc (V_cc 0) vsource dc=20.
32 .simulator lang=spectre
36 - probe op v(V_cc) v(in) v(out) iter(0) vc(X1.q1) vce(X1.q1)
38 - probe ac v(V_cc) v(in) v(amp_in) v(out)
41 Rload (out 0) resistor r=100k