** two_balance.sch


xa vcasc inp inn ib0 op on vdd gnd balance_simple
xb vcasc op on ib1 outp outn vdd gnd balance_simple

.include ngspice_stimuli2

* expanding    balance_simple
.subckt balance_simple vcasc inp inn ib outn outp vdd gnd
*.ipin inp
*.ipin inn
*.ipin ib
*.ipin vcasc
*.opin outp
*.opin outn
*.iopin vdd
*.iopin gnd
M3 a inp vcm gnd nch w=10u l=0.18u m=1000
M1 b inn vcm gnd nch w=10u l=0.18u m=1000
M2 outn vcasc a gnd nch w=10u l=0.18u m=100
M4 outp vcasc b gnd nch w=10u l=0.18u m=100
M5 vcm ib gnd gnd nch w=10u l=0.6u m=100
M8 ib ib gnd gnd nch w=10u l=0.6u m=100
R1 vp outn 10meg m=1
R2 vp outp 10meg m=1
M6 outn vp vdd vdd pch w=5u l=0.25u m=500
M7 outp vp vdd vdd pch w=5u l=0.25u m=500
.ends

.end
