* Z:\tmp\asc_dec_bjh7r6w2\0628f98d720a_VCO_logic_2-3-curr-mirr_6-sw_2_dec1.asc
* Generated by LTspice 26.0.1 for Windows.
V2 9 0 PULSE(0 6 0 1500u 1u 1u 1700u)
R8 A 12 100k
R5 A N004 10
A3 N009 N003 0 0 0 Gate1 Gate2 0 SRFLOP Td=10ns Trise=10ns Tfall=10ns
M3 11 11 N005 N005 QP
D4 0 C1A 1N746
B1 VCO_out 0 V=V(Gate2)*V(Vref)
S2 C1B N001 Gate2 0 SW
D3 C1A N001 1N746
B4 _VCO_out 0 V=V(Gate1)*V(Vref)
.model D D
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.dio
.model NMOS NMOS
.model PMOS PMOS
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.mos
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 3256 1204
WIRE 608 -480 608 -528
WIRE 736 -480 736 -512
WIRE 608 -368 608 -400
WIRE 736 -368 736 -400
WIRE 224 -176 176 -176
WIRE 336 -160 288 -160
WIRE 368 -160 336 -160
WIRE 224 -144 192 -144
WIRE 1136 -144 1104 -144
WIRE 1440 -128 1408 -128
WIRE 1104 -112 1104 -144
WIRE 1200 -112 1152 -112
WIRE 1408 -112 1408 -128
WIRE 1488 -112 1456 -112
WIRE 448 -80 448 -144
WIRE 560 -80 448 -80
WIRE 2256 -80 2256 -144
WIRE 192 -64 192 -144
WIRE 192 -64 176 -64
WIRE 224 -64 192 -64
WIRE 336 -64 336 -160
WIRE 336 -64 304 -64
WIRE 1088 -64 1040 -64
WIRE 1280 -64 1168 -64
WIRE 1392 -64 1280 -64
WIRE 1488 -64 1488 -112
WIRE 1488 -64 1472 -64
WIRE 1504 -64 1488 -64
WIRE 576 0 576 -32
WIRE 672 0 576 0
WIRE 576 32 576 0
WIRE 1040 32 1040 -64
WIRE 1120 32 1040 32
WIRE 1280 32 1280 -64
WIRE 1280 32 1184 32
WIRE 1360 32 1280 32
WIRE 1456 32 1424 32
WIRE 2256 32 2256 0
WIRE 1824 64 1760 64
WIRE 1872 64 1856 64
WIRE 448 80 448 -80
WIRE 464 80 448 80
WIRE 560 80 544 80
WIRE 128 96 128 64
WIRE 1856 96 1856 64
WIRE 1280 112 1280 32
WIRE 1280 112 1264 112
WIRE 1040 128 1040 32
WIRE 1040 128 1008 128
WIRE 1456 128 1456 32
WIRE 1488 128 1456 128
WIRE 1824 128 1824 64
WIRE 1856 128 1824 128
WIRE 2000 128 1968 128
WIRE 1280 160 1264 160
WIRE 464 176 448 176
WIRE 560 176 544 176
WIRE 720 176 656 176
WIRE 896 176 784 176
WIRE 1856 176 1824 176
WIRE 2000 176 1952 176
WIRE 1712 192 1696 192
WIRE 1040 240 1040 128
WIRE 1120 240 1040 240
WIRE 1280 240 1280 160
WIRE 1280 240 1184 240
WIRE 1360 240 1280 240
WIRE 1456 240 1456 128
WIRE 576 256 576 224
WIRE 672 256 576 256
WIRE 1824 256 1824 176
WIRE 1824 256 1760 256
WIRE 576 288 576 256
WIRE 2256 288 2256 224
WIRE 1040 320 1040 240
WIRE 1088 320 1040 320
WIRE 1280 320 1280 240
WIRE 1280 320 1168 320
WIRE 1392 320 1280 320
WIRE 448 336 448 176
WIRE 560 336 448 336
WIRE 672 336 672 256
WIRE 672 336 656 336
WIRE 704 336 672 336
WIRE 1184 368 1152 368
WIRE 1104 400 1104 368
WIRE 1152 400 1104 400
WIRE 2256 400 2256 368
SYMBOL voltage 736 -496 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value PULSE(0 6 0 1500u 1u 1u 1700u)
SYMBOL res 320 -80 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R8
SYMATTR Value 100k
SYMBOL res 448 96 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R5
SYMATTR Value 10
SYMBOL Digital\\srflop 1904 224 M180
WINDOW 3 -74 -20 Left 0
SYMATTR Value Td=10ns Trise=10ns Tfall=10ns
SYMATTR InstName A3
SYMBOL pmos 656 288 R90
SYMATTR InstName M3
SYMATTR Value QP
SYMBOL zener 1424 16 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName D4
SYMATTR Value 1N746
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL bv 2256 -96 R0
WINDOW 3 -90 165 Left 0
SYMATTR Value V=V(Gate2)*V(Vref)
SYMATTR InstName B1
SYMBOL sw 1184 320 M270
SYMATTR InstName S2
SYMBOL zener 1184 16 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName D3
SYMATTR Value 1N746
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL bv 2256 272 R0
WINDOW 3 -99 111 Left 0
SYMATTR Value V=V(Gate1)*V(Vref)
SYMATTR InstName B4
FLAG 736 -368 0
FLAG 608 -368 0
FLAG 608 -528 Vref
FLAG 176 -176 Vref
FLAG 1504 -64 0
FLAG 1136 -144 Gate1
FLAG 1152 400 Gate2
FLAG 1264 112 C1A
FLAG 1264 160 C1B
FLAG 2000 128 Gate1
FLAG 1488 128 0
FLAG 368 -160 A
FLAG 448 -144 A
FLAG 128 64 12
FLAG 176 -64 12
FLAG 736 -512 9
FLAG 704 336 11
FLAG 2256 32 0
FLAG 2256 400 0
FLAG 2000 176 Gate2
FLAG 1200 -112 0
FLAG 1184 368 0
FLAG 1440 -128 Gate2
FLAG 1712 192 0
FLAG 1872 64 0
FLAG 2256 -144 VCO_out
FLAG 2256 224 _VCO_out