* SPICE netlist
V1 S 0 12
R1 D 0 50
XM1 D G S DMP4065S ;pnba D)G)S
R2 S G {WC1(10k,0.05,3)}
XQ1 G N002 N003 BC847B ;pnba C)B)E
R3 N003 0 {WC1(1k,0.05,4)}
R4 N001 N002 {WC1(22k,0.01,1)}
R5 N002 0 {WC1(10k,0.05,2)}
V2 N001 0 PULSE(0 5 1m 10u 10u 3m)
V3 STEPPING 0 {STEPPING}
.tran 5m startup
.SUBCKT DMP4065S 10 20 30
M1 1 2 3 3 PMOS L = 1E-006 W = 1E-006
RD 10 1 0.04289
RS 30 3 0.001
RG 20 2 10.24
CGS 2 3 5.75E-010
EGD 12 30 2 1 1
VFB 14 30 0
FFB 2 1 VFB 1
CGD 13 14 4.5E-010
R1 13 30 1
D1 13 12 DLIM
DDG 14 15 DCGD
R2 12 15 1
D2 30 15 DLIM
DSD 10 3 DSUB
+ TOX = 6E-008 NSUB = 1E+016 KP = 8.015 KAPPA = 19.32 VTO = -1.585
.FUNC MOD(a,b) {a-FLOOR(a/b)*b}
.FUNC BIT(x) {if(MOD(STEPPING,2**(X+1))>=2**x,1,0)}
.FUNC EVA1 (nom, tol, param_num) {if(STEPPING == -1, nom, nom*(1-tol)+2*nom*tol*BIT(param_num))}
.FUNC EVA2 (nom, min, max, param_num) {if(STEPPING == -1, nom, IF(BIT(param_num),max,min))}
.FUNC WC1 (nom, tol, param_num) EVA1(nom, tol, param_num)
.FUNC WC2 (nom, min, max, param_num) EVA2(nom, min, max, param_num)
.step param STEPPING -1 31 1
.SUBCKT BC847B 1 2 3
Q1 1 2 3 MAIN 0.8636
Q2 11 2 33 MAIN 0.1364
RQ 11 1 324.8
D1 2 1 DIODE
+ IS = 1.124E-14
+ NF = 0.9872
+ ISE = 2.566E-15
+ NE = 1.661
+ BF = {WC2(290,200,450,0)}
+ IKF = 0.09455
+ VAF = 36.27
+ NR = 0.9859
+ ISC = 7.015E-18
+ NC = 0.9228
+ BR = 7.047
+ IKR = 0.8167
+ VAR = 16.61
+ RB = 150
+ IRB = 0.0008356
+ RBM = 0.8289
+ RE = 0.804
+ RC = 0.2454
+ XTB = 1.382
+ EG = 1.11
+ XTI = 7.452
+ CJE = 1.264E-11
+ VJE = 0.7056
+ MJE = 0.3401
+ TF = 6.258E-10
+ XTF = 25
+ VTF = 2
+ ITF = 0.277
+ PTF = 0
+ CJC = 3.624E-12
+ VJC = 0.5036
+ MJC = 0.365
+ XCJC = 1
+ TR = 1.55E-07
+ CJS = 0
+ VJS = 0.75
+ MJS = 0.333
+ FC = 0.78
+ IS = 1.365E-15
+ N = 0.988
+ BV = 1000
+ IBV = 0.001
+ RS = 2163
+ CJO = 0
+ VJ = 1
+ M = 0.5
+ FC = 0
+ TT = 0
+ EG = 1.11
+ XTI = 3

* LTspice schematic (.asc)
Version 4
SHEET 1 1152 880
WIRE 576 -440 512 -440
WIRE 512 -408 512 -440
WIRE 512 -296 512 -328
WIRE 96 -24 -48 -24
WIRE 384 -24 96 -24
WIRE -48 8 -48 -24
WIRE 96 24 96 -24
WIRE -48 104 -48 88
WIRE 384 136 384 -24
WIRE 96 152 96 104
WIRE 288 152 96 152
WIRE 336 152 288 152
WIRE 96 200 96 152
WIRE -432 248 -576 248
WIRE -192 248 -352 248
WIRE 32 248 -192 248
WIRE 384 248 384 232
WIRE 480 248 384 248
WIRE -192 280 -192 248
WIRE -576 296 -576 248
WIRE 384 312 384 248
WIRE 96 328 96 296
WIRE -576 392 -576 376
WIRE -192 392 -192 360
WIRE 96 440 96 408
WIRE 384 440 384 392
FLAG 384 440 0
FLAG -48 104 0
FLAG 96 440 0
FLAG -192 392 0
FLAG -576 392 0
FLAG 288 152 G
FLAG 384 -24 S
FLAG 480 248 D
FLAG 512 -296 0
FLAG 576 -440 STEPPING
IOPIN 496 -592 Out
SYMBOL voltage -48 -8 R0
SYMATTR InstName V1
SYMATTR Value 12
SYMBOL res 368 296 R0
SYMATTR InstName R1
SYMATTR Value 50
SYMBOL pmos 336 232 M180
SYMATTR InstName M1
SYMATTR Value DMP4065S
SYMATTR Prefix X
SYMBOL res 80 8 R0
SYMATTR InstName R2
SYMATTR Value {WC1(10k,0.05,3)}
SYMBOL npn 32 200 R0
SYMATTR InstName Q1
SYMATTR Value BC847B
SYMATTR Prefix X
SYMBOL res 80 312 R0
SYMATTR InstName R3
SYMATTR Value {WC1(1k,0.05,4)}
SYMBOL res -448 264 R270
SYMATTR InstName R4
SYMATTR Value {WC1(22k,0.01,1)}
SYMBOL res -208 264 R0
SYMATTR InstName R5
SYMATTR Value {WC1(10k,0.05,2)}
SYMBOL voltage -576 280 R0
SYMATTR InstName V2
SYMATTR Value PULSE(0 5 1m 10u 10u 3m)
SYMBOL voltage 512 -424 R0
SYMATTR InstName V3
SYMATTR Value {STEPPING}