* SPICE netlist
S1 6 N003 7 0 SW
S2 0 7 7 0 SW
S3 7 N003 6 0 SW
S4 0 6 6 0 SW
C1 7 6 10p
C2 7 6 2.2n
B1 0 N003 I=I(R1)*36
B2 4 0 V=ddt(V(6,7))>0 ? 5 : 0 Tripdt=0.007u Tripdv=0.007m
R3 4 0 1G
R1 11 0 10k
R_by-pass-1 11 0 2.7k
G1 0 11 9 11 TABLE(0.05, 0.001m) (0.31, 0.005m) (0.5, 0.011m) (2.29V, 0.091m) (3V, 0.12m)
R2 12 0 100k
R_by-pass-2 12 0 2.7k
G2 0 12 16 12 TABLE(0.05, 0.001m) (0.31, 0.005m) (0.5, 0.011m) (2.29V, 0.091m) (3V, 0.12m)
V2 16 0 5
B3 0 N003 I=I(R2)*90
R4 9 13 110k
R5 9 N004 15k
C3 9 N004 1n
C4 N004 0 10n
V1 14 0 PULSE(0 5 0 10n 10n 5u 10u)
A1 14 4 0 0 0 0 13 0 PHASEDET Vhigh={Vhigh1} Td={td1} ref={ref1}
R6 10 0 100k
R_by-pass-3 10 0 2.7k
G3 0 10 9 10 1
A2 0 14 0 4 0 0 2 0 XOR Vhigh={Vhigh1}
A3 N001 N002 0 0 0 15 0 0 SRFLOP Vhigh={Vhigh2} ref={ref2}
A4 14 0 0 0 0 N001 0 0 BUF Vhigh={Vhigh2} ref={ref2} Trise={Trise2} Tfall={Tfall2}
A5 4 0 0 0 0 N002 0 0 BUF Vhigh={Vhigh2} ref={ref2} Td={Td2}
.ic V(6)=0.5 V(Q)=0 V(_Q)=5
.params: Vhigh1=5 ref1=2.5 Td1=50n Vhigh2=5 ref2=0.5 Td2=50n Trise2=5n Tfall2=5n
.tran 0 120m

* LTspice schematic (.asc)
Version 4
SHEET 1 1840 992
WIRE -88 -496 -120 -496
WIRE 8 -496 -8 -496
WIRE 264 -368 248 -368
WIRE 344 -352 328 -352
WIRE 344 -336 344 -352
WIRE 360 -336 344 -336
WIRE 264 -304 248 -304
WIRE 360 -288 328 -288
WIRE 536 -288 472 -288
WIRE -504 -240 -536 -240
WIRE -584 -224 -728 -224
WIRE -712 -176 -728 -176
WIRE -584 -176 -712 -176
WIRE 344 -176 328 -176
WIRE 536 -176 408 -176
WIRE -712 -144 -712 -176
WIRE -712 -144 -840 -144
WIRE -552 -144 -584 -176
WIRE -504 -144 -504 -240
WIRE -504 -144 -552 -144
WIRE 344 -144 312 -144
WIRE -840 -128 -840 -144
WIRE 680 -96 536 -96
WIRE -232 -80 -248 -80
WIRE -136 -80 -152 -80
WIRE -120 -80 -136 -80
WIRE -24 -80 -40 -80
WIRE 152 -64 152 -464
WIRE 376 -64 152 -64
WIRE 536 -48 536 -96
WIRE 536 -48 504 -48
WIRE 552 -48 536 -48
WIRE 680 -48 680 -96
WIRE 696 -48 680 -48
WIRE 824 -48 776 -48
WIRE 872 -48 824 -48
WIRE 920 -48 872 -48
WIRE 120 -32 120 -464
WIRE 360 -32 120 -32
WIRE 376 -32 360 -32
WIRE 824 -32 824 -48
WIRE 872 -32 872 -48
WIRE -920 0 -920 -16
WIRE -504 0 -536 0
WIRE -136 0 -136 -80
WIRE -136 0 -280 0
WIRE 8 0 -136 0
WIRE -584 16 -728 16
WIRE -280 16 -280 0
WIRE 8 16 8 0
WIRE 872 48 872 32
WIRE 872 48 824 48
WIRE -712 64 -728 64
WIRE -584 64 -712 64
WIRE 360 64 360 -32
WIRE 632 64 360 64
WIRE 872 64 872 48
WIRE -712 96 -712 64
WIRE -712 96 -840 96
WIRE -552 96 -584 64
WIRE -504 96 -504 0
WIRE -504 96 -552 96
WIRE -920 112 -920 80
WIRE -840 112 -840 96
WIRE -280 112 -280 96
WIRE -168 112 -280 112
WIRE 8 112 8 96
WIRE 8 112 -104 112
WIRE 632 112 632 64
WIRE 632 112 360 112
WIRE -200 128 -280 112
WIRE -72 128 8 112
WIRE -280 144 -280 112
WIRE 8 144 8 112
WIRE 872 144 872 128
WIRE 360 176 360 112
WIRE 408 176 360 176
WIRE 536 176 408 176
WIRE 360 192 360 176
WIRE -504 224 -536 224
WIRE -328 224 -328 208
WIRE -280 224 -328 224
WIRE -136 224 -280 224
WIRE 8 224 -136 224
WIRE 56 224 56 208
WIRE 56 224 8 224
WIRE -584 240 -648 240
WIRE -136 240 -136 224
WIRE 408 272 408 256
WIRE -712 288 -728 288
WIRE -584 288 -712 288
WIRE -712 320 -712 288
WIRE -712 320 -840 320
WIRE -552 320 -584 288
WIRE -504 320 -504 224
WIRE -504 320 -552 320
WIRE -840 336 -840 320
WIRE -200 480 -200 128
WIRE -168 480 -200 480
WIRE -72 480 -72 128
WIRE -72 480 -104 480
WIRE -200 496 -200 480
WIRE -72 496 -72 480
FLAG -136 240 0
FLAG -200 496 6
IOPIN 32 320 BiDir
FLAG -72 496 7
IOPIN 160 320 BiDir
FLAG 56 80 0
FLAG -328 80 0
FLAG -328 32 7
FLAG 56 160 7
FLAG -328 160 6
FLAG 56 32 6
FLAG -248 -80 0
FLAG 536 176 4
IOPIN 768 0 Out
FLAG 360 272 0
FLAG 408 272 0
FLAG -840 -48 0
FLAG -504 -64 0
FLAG -536 -160 0
FLAG -728 -176 11
IOPIN -496 -352 Out
FLAG -840 192 0
FLAG -504 176 0
FLAG -536 80 0
FLAG -728 16 16
IOPIN -496 -160 In
FLAG -728 64 12
IOPIN -496 -112 Out
FLAG -920 112 0
FLAG -920 -16 16
FLAG -24 -80 0
FLAG 872 144 0
FLAG 152 -464 14
IOPIN 384 -640 In
FLAG 120 -464 3
IOPIN 352 -640 In
FLAG 920 -48 9
FLAG -728 -224 9
IOPIN -496 -400 In
FLAG -120 -496 0
FLAG 8 -496 14
FLAG -840 416 0
FLAG -504 400 0
FLAG -536 304 0
FLAG -648 240 9
FLAG -728 288 10
IOPIN -496 112 Out
FLAG 328 -176 14
FLAG 312 -144 3
FLAG 536 -176 2
IOPIN 768 -352 Out
FLAG 248 -368 14
FLAG 248 -304 3
FLAG 536 -288 15
IOPIN 768 -464 Out
FLAG 552 -48 13
IOPIN 784 -224 Out
SYMBOL sw -280 112 M180
SYMATTR InstName S1
SYMBOL sw 8 240 R180
SYMATTR InstName S2
SYMBOL sw 8 112 R180
SYMATTR InstName S3
SYMBOL sw -280 240 M180
SYMATTR InstName S4
SYMBOL cap -104 96 R90
SYMATTR InstName C1
SYMATTR Value 10p
SYMBOL cap -104 464 R90
SYMATTR InstName C2
SYMATTR Value 2.2n
SYMBOL bi2 -152 -80 M270
SYMATTR Value I=I(R1)*36
SYMATTR InstName B1
SYMBOL bv 360 176 M0
SYMATTR Value V=ddt(V(6,7))>0 ? 5 : 0
SYMATTR InstName B2
SYMATTR Value2 Tripdt=0.007u Tripdv=0.007m
SYMBOL res 392 160 R0
SYMATTR InstName R3
SYMATTR Value 1G
SYMBOL res -824 -144 M0
SYMATTR InstName R1
SYMATTR Value 10k
SYMBOL res -520 -160 R0
SYMATTR InstName R_by-pass-1
SYMATTR Value 2.7k
SYMBOL g -536 -256 R0
SYMATTR Value TABLE(0.05, 0.001m) (0.31, 0.005m) (0.5, 0.011m) (2.29V, 0.091m) (3V, 0.12m)
SYMATTR InstName G1
SYMBOL res -824 96 M0
SYMATTR InstName R2
SYMATTR Value 100k
SYMBOL res -520 80 R0
SYMATTR InstName R_by-pass-2
SYMATTR Value 2.7k
SYMBOL g -536 -16 R0
SYMATTR Value TABLE(0.05, 0.001m) (0.31, 0.005m) (0.5, 0.011m) (2.29V, 0.091m) (3V, 0.12m)
SYMATTR InstName G2
SYMBOL voltage -920 -16 M0
SYMATTR Value 5
SYMATTR InstName V2
SYMBOL bi2 -120 -80 M90
SYMATTR Value I=I(R2)*90
SYMATTR InstName B3
SYMBOL res 792 -64 R90
SYMATTR InstName R4
SYMATTR Value 110k
SYMBOL res 840 -48 M0
SYMATTR InstName R5
SYMATTR Value 15k
SYMBOL cap 856 -32 R0
SYMATTR InstName C3
SYMATTR Value 1n
SYMBOL cap 856 64 R0
SYMATTR InstName C4
SYMATTR Value 10n
SYMBOL voltage 8 -496 M270
SYMATTR Value PULSE(0 5 0 10n 10n 5u 10u)
SYMATTR InstName V1
SYMBOL Digital\\phidet 408 -48 R0
SYMATTR Value Vhigh={Vhigh1}
SYMATTR InstName A1
SYMATTR Value2 Td={td1} ref={ref1}
SYMBOL res -824 320 M0
SYMATTR InstName R6
SYMATTR Value 100k
SYMBOL res -520 304 R0
SYMATTR InstName R_by-pass-3
SYMATTR Value 2.7k
SYMBOL g -536 208 R0
SYMATTR Value 1
SYMATTR InstName G3
SYMBOL Digital\\xor 392 -224 R0
SYMATTR Value Vhigh={Vhigh1}
SYMATTR InstName A2
SYMBOL Digital\\srflop 408 -384 R0
SYMATTR Value Vhigh={Vhigh2} ref={ref2}
SYMATTR InstName A3
SYMBOL Digital\\buf 264 -432 R0
SYMATTR Value Vhigh={Vhigh2} ref={ref2}
SYMATTR InstName A4
SYMATTR Value2 Trise={Trise2} Tfall={Tfall2}
SYMBOL Digital\\buf 264 -368 R0
SYMATTR Value Vhigh={Vhigh2} ref={ref2}
SYMATTR InstName A5
SYMATTR SpiceLine Td={Td2}