* SPICE netlist
M1 N002 N006 N008 N008 2N7002
R1 N001 N009 {Ri}
M2 N009 N009 0 0 2N7002
M3 N008 N009 0 0 2N7002
M4 OUT N007 N008 N008 2N7002
V1 IN_P N010 SINE(0 {Vdiff} 500k 0 0 0) AC 1
V2 IN_N N010 SINE(0 {Vdiff} 500k 0 0 180) AC 1 180
V3 N001 0 {VCC}
C2 N004 NC_01 100n
R4 N004 0 100k
M5 N002 N002 N001 N001 BSS84
M6 OUT N002 N001 N001 BSS84
V4 N010 0 SINE({Vcm} {Vdd} 5k 0 0 180)
R3 N005 IN_N 10k
R6 N007 0 10k
R7 OUT N007 1k
R8 N002 N006 100Mega
Q1 N001 N003 N006 0 2N3904
R9 N003 IN_P 10k
R10 N006 0 10k
Q2 N001 N005 N007 0 2N3904
;.tran 1000u
.param VCC=10
.param Ri=250
.param Vcm=5
.param Vdiff=10m
;.step param Vcm 1 15 1
.param Vdd=0.000100m
.ac dec 100 10k 100mega
.param Lb=3m

* LTspice schematic (.asc)
Version 4
SHEET 1 2336 1200
WIRE -272 -600 -1168 -600
WIRE 96 -600 -272 -600
WIRE 464 -600 96 -600
WIRE 832 -600 464 -600
WIRE 464 -488 464 -600
WIRE 464 -488 368 -488
WIRE 576 -488 464 -488
WIRE 368 -408 368 -488
WIRE 576 -408 576 -488
WIRE 832 -408 832 -600
WIRE -272 -392 -272 -600
WIRE 464 -392 416 -392
WIRE 528 -392 464 -392
WIRE -496 -344 -560 -344
WIRE -336 -344 -416 -344
WIRE 368 -280 368 -312
WIRE 368 -280 272 -280
WIRE 368 -264 368 -280
WIRE 464 -264 464 -392
WIRE 464 -264 368 -264
WIRE 576 -264 576 -312
WIRE 672 -264 576 -264
WIRE 704 -264 672 -264
WIRE 1168 -264 1056 -264
WIRE 96 -104 96 -600
WIRE 704 -72 704 -264
WIRE 32 -56 -16 -56
WIRE 272 -56 272 -280
WIRE 368 -24 368 -264
WIRE 576 -24 576 -264
WIRE -672 56 -896 56
WIRE -560 56 -560 -344
WIRE -560 56 -672 56
WIRE -272 56 -272 -296
WIRE 272 56 272 24
WIRE 272 56 -272 56
WIRE 320 56 272 56
WIRE 704 56 704 8
WIRE 704 56 624 56
WIRE -672 104 -752 104
WIRE -400 104 -672 104
WIRE -16 104 -16 -56
WIRE -16 104 -320 104
WIRE 96 104 96 -8
WIRE 704 104 704 56
WIRE 704 104 96 104
WIRE 1168 120 1168 -264
WIRE 368 136 368 72
WIRE 480 136 368 136
WIRE 576 136 576 72
WIRE 576 136 480 136
WIRE 832 136 832 -328
WIRE 832 136 720 136
WIRE -1168 168 -1168 -600
WIRE -896 168 -896 56
WIRE -752 168 -752 104
WIRE 480 168 480 136
WIRE 832 168 832 136
WIRE 720 248 720 136
WIRE 720 248 528 248
WIRE 784 248 720 248
WIRE -272 296 -272 56
WIRE 96 312 96 104
WIRE -896 328 -896 248
WIRE -832 328 -896 328
WIRE -752 328 -752 248
WIRE -752 328 -832 328
WIRE -832 392 -832 328
WIRE -1168 552 -1168 248
WIRE -832 552 -832 472
WIRE -832 552 -1168 552
WIRE -272 552 -272 376
WIRE -272 552 -832 552
WIRE 96 552 96 392
WIRE 96 552 -272 552
WIRE 480 552 480 264
WIRE 480 552 96 552
WIRE 624 552 480 552
WIRE 832 552 832 264
WIRE 832 552 624 552
WIRE 1168 552 1168 200
WIRE 1168 552 832 552
WIRE 624 600 624 552
FLAG 672 -264 OUT
FLAG 624 600 0
FLAG -672 56 IN_P
FLAG -672 104 IN_N
SYMBOL nmos 320 -24 R0
SYMATTR InstName M1
SYMATTR Value 2N7002
SYMBOL res 816 -424 R0
SYMATTR InstName R1
SYMATTR Value {Ri}
SYMBOL nmos 784 168 R0
SYMATTR InstName M2
SYMATTR Value 2N7002
SYMBOL nmos 528 168 M0
SYMATTR InstName M3
SYMATTR Value 2N7002
SYMBOL nmos 624 -24 M0
SYMATTR InstName M4
SYMATTR Value 2N7002
SYMBOL voltage -896 152 R0
SYMATTR Value SINE(0 {Vdiff} 500k 0 0 0)
SYMATTR Value2 AC 1
SYMATTR InstName V1
SYMBOL voltage -752 152 R0
SYMATTR Value SINE(0 {Vdiff} 500k 0 0 180)
SYMATTR Value2 AC 1 180
SYMATTR InstName V2
SYMBOL voltage -1168 152 R0
SYMATTR InstName V3
SYMATTR Value {VCC}
SYMBOL cap 1056 -280 R90
SYMATTR InstName C2
SYMATTR Value 100n
SYMBOL res 1152 104 R0
SYMATTR InstName R4
SYMATTR Value 100k
SYMBOL pmos 416 -312 R180
SYMATTR InstName M5
SYMATTR Value BSS84
SYMBOL pmos 528 -312 M180
SYMATTR InstName M6
SYMATTR Value BSS84
SYMBOL voltage -832 376 R0
SYMATTR Value SINE({Vcm} {Vdd} 5k 0 0 180)
SYMATTR InstName V4
SYMBOL res -304 88 R90
SYMATTR InstName R3
SYMATTR Value 10k
SYMBOL res 80 296 R0
SYMATTR InstName R6
SYMATTR Value 10k
SYMBOL res 688 -88 R0
SYMATTR InstName R7
SYMATTR Value 1k
SYMBOL res 256 -72 R0
SYMATTR InstName R8
SYMATTR Value 100Mega
SYMBOL npn2 -336 -392 R0
SYMATTR InstName Q1
SYMATTR Value 2N3904
SYMBOL res -400 -360 R90
SYMATTR InstName R9
SYMATTR Value 10k
SYMBOL res -288 280 R0
SYMATTR InstName R10
SYMATTR Value 10k
SYMBOL npn2 32 -104 R0
SYMATTR InstName Q2
SYMATTR Value 2N3904