* SPICE netlist
Rin Vcoin Vss {Rin}
Bm M Vss V=(if(v(vcoin,vss)<v(vdd,vss),S1*v(vcoin,vss),S2*(v(vcoin,vss)+v(vdd,vss)))*Kb+Vfree)
Rm M Vss 1
Er2 Vss Ir2 Vdd Ir2 2e8
Er1 Vss Ir1 M Ir1 2e8
Badj Adj Vss V=TABLE ((abs(V(vdd)*V(M)/I(Er2)*I(Er1))),.5,1.43, 1,1.6, 10,1.04, 50,.67, 100,.84, 101,1, 102,1, 1000,1)
Radj Adj Vss 1g
Bim Ce1 Vss I=((M1*I(Er1)*V(adj)+M2*I(Er2))*Kc*V(sqr))
vcext Ce2 Vss 0
Cstray Ce1 Ce2 5p
Rcext Ce1 Ce2 1g
Bsqr Pul Vss V=(1.2e6*V(sqr)-1e7*V(Ce1))
Rint Sqr Pul .1T
Cint Sqr Vss 10f
Dlimh Sqr 13 Dio
Vlimh 13 Vss {Vdd}
Dliml 14 Sqr Dio
Vliml Vss 14 {Vdd}
BOut Vcout Vss V=table ((1-u(v(inh)))*(v(sqr)),.1,.1, v(vdd),v(vdd))
Rinh Inh Vss 1e6
Dz Vss Zener Zen
Rz Zener Vss 1g
bdem Demout Vss V=table (2e8*v(vcoin,demout)*(1-u(v(inh))),-20,-20, 20,20)
Rdem Demout Vss 1g
+Isr=1.8n Nr=2 Bv=7 Ibv=27.721m Nbv=1.178 Ibvl=1.165m Nbvl=21.894 Tbv1=176.47u)

* LTspice schematic (.asc)
Version 4
SHEET 1 1072 416
WIRE -536 96 -536 80
WIRE -536 112 -536 96
WIRE -536 208 -536 176
WIRE -520 80 -536 80
WIRE -472 -144 -472 -160
WIRE -472 -32 -472 -64
WIRE -472 96 -536 96
WIRE -472 112 -472 96
WIRE -472 208 -536 208
WIRE -472 208 -472 192
WIRE -456 -160 -472 -160
WIRE -392 -160 -456 -160
WIRE -392 -128 -392 -160
WIRE -392 -32 -472 -32
WIRE -392 -32 -392 -48
WIRE -376 112 -376 96
WIRE -376 208 -472 208
WIRE -376 208 -376 192
WIRE -328 96 -376 96
WIRE -312 -192 -344 -192
WIRE -312 -144 -328 -144
WIRE -312 -144 -312 -192
WIRE -312 -128 -312 -144
WIRE -312 -32 -392 -32
WIRE -312 -32 -312 -48
WIRE -296 96 -328 96
WIRE -296 112 -296 96
WIRE -296 208 -376 208
WIRE -296 208 -296 192
WIRE -280 -192 -312 -192
WIRE -280 -144 -312 -144
WIRE -216 128 -216 96
WIRE -200 128 -216 128
WIRE -184 -192 -200 -192
WIRE -184 -144 -216 -144
WIRE -184 -144 -184 -192
WIRE -184 -128 -184 -144
WIRE -184 -32 -312 -32
WIRE -184 -32 -184 -48
WIRE -152 -192 -184 -192
WIRE -152 96 -216 96
WIRE -152 112 -152 96
WIRE -152 208 -296 208
WIRE -152 208 -152 192
WIRE -136 96 -152 96
WIRE -88 -32 -184 -32
WIRE -56 128 -56 96
WIRE -40 128 -56 128
WIRE -8 -144 -56 -144
WIRE -8 -128 -8 -144
WIRE -8 -32 -88 -32
WIRE -8 -32 -8 -48
WIRE 8 96 -56 96
WIRE 8 112 8 96
WIRE 8 208 -152 208
WIRE 8 208 8 192
WIRE 24 -144 -8 -144
WIRE 24 96 8 96
WIRE 56 208 8 208
WIRE 104 128 104 96
WIRE 120 -144 104 -144
WIRE 152 -144 120 -144
WIRE 152 -144 152 -176
WIRE 152 -112 152 -144
WIRE 152 -32 -8 -32
WIRE 152 -32 152 -48
WIRE 168 96 104 96
WIRE 168 112 168 96
WIRE 168 208 56 208
WIRE 168 208 168 192
WIRE 200 -144 152 -144
WIRE 280 -144 264 -144
WIRE 296 -144 280 -144
WIRE 296 -128 296 -144
WIRE 296 -32 152 -32
WIRE 296 -32 296 -48
WIRE 312 -176 152 -176
WIRE 312 -144 312 -176
WIRE 312 96 296 96
WIRE 312 112 312 96
WIRE 312 208 168 208
WIRE 312 208 312 192
WIRE 344 -144 312 -144
WIRE 408 112 408 96
WIRE 408 208 312 208
WIRE 408 208 408 192
WIRE 424 -144 408 -144
WIRE 440 -144 424 -144
WIRE 440 -128 440 -144
WIRE 440 -32 296 -32
WIRE 440 -32 440 -48
WIRE 520 -192 504 -192
WIRE 520 -128 520 -192
WIRE 520 -32 440 -32
WIRE 520 -32 520 -48
WIRE 520 96 408 96
WIRE 520 112 520 96
WIRE 520 208 408 208
WIRE 520 208 520 192
WIRE 536 80 520 80
WIRE 536 96 520 96
WIRE 536 96 536 80
FLAG 56 208 Vss
FLAG 296 96 Vcoin
IOPIN 464 352 In
FLAG -328 96 M
FLAG -56 128 Ir2
FLAG -40 176 Vdd
FLAG 24 96 r2
IOPIN 192 352 In
FLAG -216 128 Ir1
FLAG -200 176 M
FLAG -136 96 r1
IOPIN 32 352 In
FLAG -88 -32 Vss
FLAG -456 -160 Adj
FLAG -152 -192 Ce1
IOPIN 16 64 In
FLAG -344 -192 Ce2
IOPIN -176 64 In
FLAG -56 -144 Pul
FLAG 120 -144 Sqr
FLAG 280 -144 13
FLAG 424 -144 14
FLAG 504 -192 Vcout
IOPIN 672 64 Out
FLAG 104 128 Inh
IOPIN 272 384 In
FLAG -520 80 Zener
IOPIN -352 336 Out
FLAG 520 80 Demout
IOPIN 688 336 Out
SYMBOL res 296 96 R0
SYMATTR InstName Rin
SYMATTR Value {Rin}
SYMBOL bv -296 96 R0
SYMATTR InstName Bm
SYMATTR Value V=(if(v(vcoin,vss)<v(vdd,vss),S1*v(vcoin,vss),S2*(v(vcoin,vss)+v(vdd,vss)))*Kb+Vfree)
SYMBOL res -392 96 R0
SYMATTR InstName Rm
SYMATTR Value 1
SYMBOL e 8 208 M180
SYMATTR InstName Er2
SYMATTR Value 2e8
SYMBOL e -152 208 M180
SYMATTR InstName Er1
SYMATTR Value 2e8
SYMBOL bv -392 -144 R0
SYMATTR InstName Badj
SYMATTR Value V=TABLE ((abs(V(vdd)*V(M)/I(Er2)*I(Er1))),.5,1.43, 1,1.6, 10,1.04, 50,.67, 100,.84, 101,1, 102,1, 1000,1)
SYMBOL res -488 -160 R0
SYMATTR InstName Radj
SYMATTR Value 1g
SYMBOL bi -184 -128 R0
SYMATTR InstName Bim
SYMATTR Value I=((M1*I(Er1)*V(adj)+M2*I(Er2))*Kc*V(sqr))
SYMBOL voltage -312 -144 R0
SYMATTR InstName vcext
SYMATTR Value 0
SYMBOL cap -216 -160 R90
SYMATTR InstName Cstray
SYMATTR Value 5p
SYMBOL res -184 -208 R90
SYMATTR InstName Rcext
SYMATTR Value 1g
SYMBOL bv -8 -144 R0
SYMATTR InstName Bsqr
SYMATTR Value V=(1.2e6*V(sqr)-1e7*V(Ce1))
SYMBOL res 120 -160 R90
SYMATTR InstName Rint
SYMATTR Value .1T
SYMBOL cap 136 -112 R0
SYMATTR InstName Cint
SYMATTR Value 10f
SYMBOL diode 200 -128 R270
SYMATTR InstName Dlimh
SYMATTR Value Dio
SYMBOL voltage 296 -144 R0
SYMATTR InstName Vlimh
SYMATTR Value {Vdd}
SYMBOL diode 408 -160 R90
SYMATTR InstName Dliml
SYMATTR Value Dio
SYMBOL voltage 440 -32 R180
SYMATTR InstName Vliml
SYMATTR Value {Vdd}
SYMBOL bv 520 -144 R0
SYMATTR InstName BOut
SYMATTR Value V=table ((1-u(v(inh)))*(v(sqr)),.1,.1, v(vdd),v(vdd))
SYMBOL res 152 96 R0
SYMATTR InstName Rinh
SYMATTR Value 1e6
SYMBOL zener -520 176 R180
SYMATTR InstName Dz
SYMATTR Value Zen
SYMBOL res -488 96 R0
SYMATTR InstName Rz
SYMATTR Value 1g
SYMBOL bv 520 96 R0
SYMATTR InstName bdem
SYMATTR Value V=table (2e8*v(vcoin,demout)*(1-u(v(inh))),-20,-20, 20,20)
SYMBOL res 392 96 R0
SYMATTR InstName Rdem
SYMATTR Value 1g