* Z:\tmp\asc_dec_bjh7r6w2\0628f98d720a_VCO_logic_2-3-curr-mirr_6-sw_2_dec0.asc
* Generated by LTspice 26.0.1 for Windows.
S4 C1A N003 Gate1 0 SW
R9 11 B 100k
D5 C1B N003 1N746
XU16 11 9 B opamp Aol=100K GBW=10Meg ;pnba invin)noninvin)out
R2 12 0 100k
V1 Vref 0 5
C2 C1B C1A 220p
A1 C1B 0 0 0 0 0 N004 0 SCHMITT Vt=1.1 Vh=0
D6 0 C1B 1N746
M2 N007 12 N006 N006 QP
.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 1136 -144 1104 -144
WIRE 1104 -112 1104 -144
WIRE 1200 -112 1152 -112
WIRE 560 -80 448 -80
WIRE 672 -80 656 -80
WIRE 704 -80 672 -80
WIRE 192 -64 192 -144
WIRE 192 -64 176 -64
WIRE 224 -64 192 -64
WIRE 336 -64 304 -64
WIRE 1088 -64 1040 -64
WIRE 1280 -64 1168 -64
WIRE 1392 -64 1280 -64
WIRE 1504 -64 1488 -64
WIRE 1712 -16 1696 -16
WIRE 576 0 576 -32
WIRE 672 0 672 -80
WIRE 672 0 576 0
WIRE 1696 16 1696 -16
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 1696 48 1648 48
WIRE 1824 64 1760 64
WIRE 1872 64 1856 64
WIRE 464 80 448 80
WIRE 560 80 544 80
WIRE 720 80 656 80
WIRE 896 80 784 80
WIRE -16 96 -16 64
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 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 1712 192 1696 192
WIRE -16 208 -16 176
WIRE 128 208 128 176
WIRE 1696 208 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 1456 240 1424 240
WIRE 1696 240 1648 240
WIRE 576 256 576 224
WIRE 1824 256 1824 176
WIRE 1824 256 1760 256
WIRE 16 304 -16 304
WIRE 128 304 80 304
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 1488 320 1472 320
WIRE 1504 320 1488 320
WIRE 448 336 448 176
WIRE 560 336 448 336
WIRE 1184 368 1152 368
WIRE 1488 368 1488 320
WIRE 1488 368 1456 368
WIRE 1408 384 1408 368
WIRE 1440 384 1408 384
WIRE 1104 400 1104 368
WIRE 1152 400 1104 400
WIRE 448 432 448 336
WIRE 240 448 192 448
WIRE 352 464 304 464
WIRE 384 464 352 464
WIRE 240 480 208 480
WIRE 208 560 208 480
WIRE 208 560 176 560
WIRE 224 560 208 560
WIRE 352 560 352 464
WIRE 352 560 304 560
SYMBOL sw 1184 -64 R90
SYMATTR InstName S4
SYMBOL res 208 544 M90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R9
SYMATTR Value 100k
SYMBOL zener 1184 224 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName D5
SYMATTR Value 1N746
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL Opamps\\opamp 272 528 M180
SYMATTR InstName U16
SYMBOL res 112 80 R0
SYMATTR InstName R2
SYMATTR Value 100k
SYMBOL voltage 608 -496 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL cap 80 288 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName C2
SYMATTR Value 220p
SYMBOL Digital\\schmitt 1696 112 M180
WINDOW 3 46 100 Left 0
SYMATTR Value Vt=1.1 Vh=0
SYMATTR InstName A1
SYMBOL zener 1424 224 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName D6
SYMATTR Value 1N746
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL pmos 656 32 R90
SYMATTR InstName M2
SYMATTR Value QP
FLAG 736 -368 0
FLAG 608 -368 0
FLAG 608 -528 Vref
FLAG 128 208 0
FLAG 1504 -64 0
FLAG 1504 320 0
FLAG 1136 -144 Gate1
FLAG 1152 400 Gate2
FLAG 1264 112 C1A
FLAG 1264 160 C1B
FLAG -16 208 0
FLAG 1488 128 0
FLAG 384 464 B
FLAG 448 432 B
FLAG -16 64 11
FLAG 128 64 12
FLAG 176 -64 12
FLAG 176 560 11
FLAG 192 448 9
FLAG 736 -512 9
FLAG -16 304 C1A
FLAG 128 304 C1B
FLAG 704 -80 12
FLAG 1200 -112 0
FLAG 1184 368 0
FLAG 1440 384 Gate1
FLAG 1712 -16 0
FLAG 1712 192 0
FLAG 1648 240 C1A
FLAG 1648 48 C1B
FLAG 1872 64 0