blob: ca28219d13bee79a43cc4b2bbaa30690af59786b [file] [log] [blame]
v {xschem version=2.9.9 file_version=1.2 }
G {}
K {}
V {}
S {}
E {}
N -1410 240 -1310 240 { lab=vpulse_p}
N -1930 390 -1930 420 { lab=vref}
N -1930 480 -1930 520 { lab=GND}
N -1160 50 -1100 50 { lab=vref}
N -1170 90 -1100 90 { lab=feedback_p}
N -1040 20 -1040 50 { lab=vdd}
N -1040 90 -1040 130 { lab=GND}
N -720 100 -690 100 { lab=vcmp_p}
N -40 -20 -40 0 { lab=#net1}
N -40 200 -40 210 { lab=GND}
N -30 100 -20 100 { lab=out_p}
N -1290 -90 -920 -90 { lab=feedback_p}
N -1310 90 -1290 90 { lab=feedback_p}
N -1420 90 -1370 90 { lab=vin_p}
N -770 20 -770 50 { lab=vdd}
N -770 150 -770 180 { lab=GND}
N -1160 450 -1100 450 { lab=vref}
N -860 530 -820 530 { lab=vtriang}
N -1170 490 -1100 490 { lab=feedback_n}
N -990 470 -950 470 { lab=error_n}
N -1040 420 -1040 450 { lab=vdd}
N -1040 490 -1040 530 { lab=GND}
N -950 470 -860 470 { lab=error_n}
N -40 600 -40 610 { lab=GND}
N -1310 490 -1290 490 { lab=feedback_n}
N -1160 590 -1090 590 { lab=feedback_n}
N -1160 490 -1160 590 { lab=feedback_n}
N -1030 590 -960 590 { lab=error_n}
N -960 470 -960 590 { lab=error_n}
N -1420 490 -1370 490 { lab=vin_n}
N -770 420 -770 450 { lab=vdd}
N -770 550 -770 580 { lab=GND}
N 80 100 160 100 { lab=audio_p}
N 100 100 100 110 { lab=audio_p}
N 100 170 100 190 { lab=GND}
N 100 570 100 590 { lab=GND}
N -40 270 -40 290 { lab=GND}
N -40 670 -40 690 { lab=GND}
N -860 470 -820 470 { lab=error_n}
N -1440 490 -1420 490 { lab=vin_n}
N -1440 90 -1420 90 { lab=vin_p}
N -40 100 -30 100 { lab=out_p}
N -110 30 -80 30 { lab=vp_p}
N -110 170 -80 170 { lab=vn_p}
N -720 500 -710 500 { lab=vcmp_n}
N -40 60 -40 140 { lab=out_p}
N -40 170 -20 170 { lab=GND}
N -20 170 -20 210 { lab=GND}
N -40 210 -20 210 { lab=GND}
N -40 30 -20 30 { lab=#net1}
N -20 -10 -20 30 { lab=#net1}
N -40 -10 -20 -10 { lab=#net1}
N -40 460 -40 540 { lab=out_n}
N -40 510 -30 510 { lab=out_n}
N -40 570 -20 570 { lab=GND}
N -20 570 -20 620 { lab=GND}
N -40 620 -20 620 { lab=GND}
N -40 380 -40 400 { lab=#net1}
N -40 430 -20 430 { lab=#net1}
N -20 390 -20 430 { lab=#net1}
N -40 390 -20 390 { lab=#net1}
N -1840 390 -1840 420 { lab=vdd}
N -1840 480 -1840 510 { lab=GND}
N -40 610 -40 620 { lab=GND}
N -140 30 -140 80 { lab=vp_p}
N -140 30 -110 30 { lab=vp_p}
N -140 120 -140 170 { lab=vn_p}
N -140 170 -110 170 { lab=vn_p}
N -20 100 20 100 { lab=out_p}
N -560 40 -560 60 { lab=vdd}
N -560 140 -560 160 { lab=GND}
N -860 -90 10 -90 { lab=out_p}
N 10 -90 10 100 { lab=out_p}
N -440 480 -440 490 { lab=vp_n}
N -440 510 -440 520 { lab=vn_n}
N -140 430 -140 480 { lab=vp_n}
N -140 520 -140 570 { lab=vn_n}
N -560 440 -560 460 { lab=vdd}
N -560 540 -560 560 { lab=GND}
N -710 500 -690 500 { lab=vcmp_n}
N -140 430 -80 430 { lab=vp_n}
N -140 570 -80 570 { lab=vn_n}
N -20 510 10 510 { lab=out_n}
N -30 510 -20 510 { lab=out_n}
N 70 510 100 510 { lab=audio_n}
N 160 100 160 310 { lab=audio_p}
N 160 310 160 320 { lab=audio_p}
N 160 380 160 510 { lab=audio_n}
N 100 510 160 510 { lab=audio_n}
N -990 70 -960 70 { lab=error_p}
N -960 70 -820 70 { lab=error_p}
N -1290 90 -1170 90 { lab=feedback_p}
N -1290 -90 -1290 90 { lab=feedback_p}
N -1160 90 -1160 150 { lab=feedback_p}
N -1100 150 -980 150 { lab=error_p}
N -980 70 -980 150 { lab=error_p}
N -1100 240 -890 240 { lab=vtriang}
N -890 130 -890 240 { lab=vtriang}
N -890 130 -820 130 { lab=vtriang}
N -1290 490 -1170 490 { lab=feedback_n}
N -1450 90 -1440 90 { lab=vin_p}
N -1450 490 -1440 490 { lab=vin_n}
N -1570 230 -1570 250 { lab=vdd}
N -1570 330 -1570 350 { lab=GND}
N -1450 90 -1450 280 { lab=vin_p}
N -1450 300 -1450 490 { lab=vin_n}
N -890 240 -890 520 { lab=vtriang}
N -890 520 -890 530 { lab=vtriang}
N -890 530 -860 530 { lab=vtriang}
N -210 -50 -210 210 { lab=#net1}
N -210 -50 -40 -50 { lab=#net1}
N -40 -50 -40 -20 { lab=#net1}
N -210 190 -140 190 { lab=#net1}
N -140 190 -140 380 { lab=#net1}
N -140 380 -40 380 { lab=#net1}
N -40 620 -40 670 { lab=GND}
N -40 210 -40 270 { lab=GND}
N -1820 300 -1690 300 { lab=#net2}
N -1720 320 -1690 320 { lab=vref}
N -1720 280 -1690 280 { lab=vbias2}
N -1720 260 -1690 260 { lab=vbias1}
N -1760 680 -1760 760 { lab=v1}
N -1760 710 -1690 710 { lab=v1}
N -1760 600 -1760 620 { lab=vdd}
N -1760 820 -1760 830 { lab=GND}
N -1760 790 -1760 820 { lab=GND}
N -1720 790 -1680 790 { lab=v1}
N -1690 710 -1690 790 { lab=v1}
N -1680 790 -1640 790 { lab=v1}
N -1610 830 -1580 830 { lab=GND}
N -1590 830 -1590 860 { lab=GND}
N -1640 830 -1610 830 { lab=GND}
N -1580 830 -1550 830 { lab=GND}
N -1670 830 -1670 880 { lab=vbias1}
N -1520 830 -1520 880 { lab=vbias2}
N -1640 790 -1550 790 { lab=v1}
N 0 510 -0 790 { lab=out_n}
N -830 790 -0 790 { lab=out_n}
N -1250 790 -890 790 { lab=feedback_n}
N -1250 490 -1250 790 { lab=feedback_n}
N -440 480 -140 480 { lab=vp_n}
N -440 520 -140 520 { lab=vn_n}
N -440 90 -140 90 { lab=vp_p}
N -140 80 -140 90 { lab=vp_p}
N -440 110 -140 110 { lab=vn_p}
N -140 110 -140 120 { lab=vn_p}
C {gnd.sym} -1930 520 0 0 {name=l2 lab=GND}
C {vsource.sym} -1820 330 0 0 {name=V1 value="sin(0.9 0.4 1k)"}
C {gnd.sym} -1820 360 0 0 {name=l13 lab=GND}
C {netlist_not_shown.sym} -2260 -290 0 0 {name=s1 only_toplevel=false value="
.include /home/eda/xschem/xschem_library/src/behavior_mdl/comparator.spice
.include /home/eda/xschem/xschem_library/src/behavior_mdl/switch.spice
*.include /home/eda/xschem/xschem_library/src/behavior_mdl/integrator_feedback.spice
*.include /home/eda/xschem/xschem_library/src/behavior_mdl/integrator_input.spice
*.include /home/eda/xschem/xschem_library/src/behavior_mdl/adder.spice
.include /home/eda/xschem/xschem_library/src/behavior_mdl/triang.spice
.include /home/eda/xschem/xschem_library/src/behavior_mdl/ideal_amp.spice
.include /home/eda/xschem/xschem_library/src/behavior_mdl/limiter.spice
"}
C {code_shown.sym} -2790 -180 0 0 {name=s2 only_toplevel=false value="
.option VNTOL=1e-6 ABSTOL=5e-9
.nodeset v(vin_p)=0.9 v(vin_n)=0.9 v(out_p)=0.9 v(out_n)=0.9 v(error_p)=0.9 v(error_n)=0.9
*set the absolute voltage error tolerance and absolute current error tolerance
.control
save vtriang vin_p vin_n error_n error_p vcmp_n vcmp_p vp_p vn_p vp_n vn_n out_p out_n audio_p audio_n feedback_p feedback_n I(V4) I(V2) @r6[i] @r1[i]
tran 1n 10m 1m
*op
*linearize V(audio)
*linearize V(out)
*fft V(out)
*fft V(audio)
*plot mag(V(audio))
*plot mag(V(out))
let pout=@r6[i]*(V(audio_p)-V(audio_n))
let pin=1.8*I(V2)
meas tran pload avg pout from=1m to=4m
meas tran p_supply avg pin from=1m to=4m
print pload/p_supply
set nfreqs=20
fourier 1k V(audio_p)-V(audio_n)
write behavior_1k_04.raw
.endc
"}
C {src/behavior_mdl/triang.sym} -1240 220 0 0 {name=x5}
C {gnd.sym} -1410 300 0 0 {name=l3 lab=GND}
C {lab_wire.sym} -1040 240 0 0 {name=l9 sig_type=std_logic lab=vtriang}
C {lab_wire.sym} -1350 240 0 0 {name=l20 sig_type=std_logic lab=vpulse_p}
C {vsource.sym} -1930 450 0 0 {name=V5 value=0.9}
C {lab_wire.sym} -1930 410 0 0 {name=l26 sig_type=std_logic lab=vref}
C {lab_wire.sym} -1420 90 0 1 {name=l1 sig_type=std_logic lab=vin_p}
C {src/behavior_mdl/ideal_amp.sym} -960 220 0 0 {name=x3}
C {lab_wire.sym} -1040 30 0 0 {name=l6 sig_type=std_logic lab=vdd}
C {gnd.sym} -1040 130 0 0 {name=l12 lab=GND}
C {src/behavior_mdl/comparator.sym} -860 90 0 0 {name=x1}
C {lab_wire.sym} -20 100 0 1 {name=l15 sig_type=std_logic lab=out_p}
C {ind.sym} 50 100 1 0 {name=L1
m=1
value=28u
footprint=1206
device=inductor}
C {capa.sym} 100 140 0 0 {name=C1
m=1
value=2.2u
footprint=1206
device="ceramic capacitor"}
C {res.sym} -890 -90 1 0 {name=R1
value=200k
footprint=1206
device=resistor
m=1}
C {res.sym} -1340 90 1 0 {name=R3
value=200k
footprint=1206
device=resistor
m=1}
C {capa.sym} -1130 150 1 0 {name=C2
m=1
value=20p
footprint=1206
device="ceramic capacitor"}
C {lab_wire.sym} -1290 0 0 0 {name=l18 sig_type=std_logic lab=feedback_p}
C {lab_wire.sym} -700 100 0 0 {name=l19 sig_type=std_logic lab=vcmp_p}
C {lab_wire.sym} -770 30 0 0 {name=l21 sig_type=std_logic lab=vdd}
C {gnd.sym} -770 180 0 0 {name=l22 lab=GND}
C {lab_wire.sym} -910 70 0 0 {name=l8 sig_type=std_logic lab=error_p}
C {lab_wire.sym} -1420 490 0 1 {name=l23 sig_type=std_logic lab=vin_n}
C {src/behavior_mdl/ideal_amp.sym} -960 620 0 0 {name=x6}
C {lab_wire.sym} -1040 430 0 0 {name=l24 sig_type=std_logic lab=vdd}
C {gnd.sym} -1040 530 0 0 {name=l25 lab=GND}
C {src/behavior_mdl/comparator.sym} -860 490 0 0 {name=x7}
C {res.sym} -860 790 1 0 {name=R4
value=200k
footprint=1206
device=resistor
m=1}
C {res.sym} -1340 490 1 0 {name=R5
value=200k
footprint=1206
device=resistor
m=1}
C {capa.sym} -1060 590 1 0 {name=C3
m=1
value=20p
footprint=1206
device="ceramic capacitor"}
C {lab_wire.sym} -770 430 0 0 {name=l38 sig_type=std_logic lab=vdd}
C {gnd.sym} -770 580 0 0 {name=l39 lab=GND}
C {ind.sym} 40 510 3 1 {name=L2
m=1
value=28u
footprint=1206
device=inductor}
C {capa.sym} 100 540 0 1 {name=C4
m=1
value=2.2u
footprint=1206
device="ceramic capacitor"}
C {res.sym} 160 350 2 0 {name=R6
value=8
footprint=1206
device=resistor
m=1}
C {gnd.sym} 100 190 0 1 {name=l41 lab=GND}
C {gnd.sym} 100 590 0 0 {name=l42 lab=GND}
C {lab_wire.sym} -10 510 0 0 {name=l28 sig_type=std_logic lab=out_n}
C {lab_wire.sym} -900 470 0 0 {name=l29 sig_type=std_logic lab=error_n}
C {lab_wire.sym} -1250 680 0 0 {name=l30 sig_type=std_logic lab=feedback_n}
C {lab_wire.sym} -710 500 0 1 {name=l40 sig_type=std_logic lab=vcmp_n}
C {lab_wire.sym} 110 100 0 1 {name=l43 sig_type=std_logic lab=audio_p}
C {lab_wire.sym} 110 510 0 1 {name=l44 sig_type=std_logic lab=audio_n}
C {gnd.sym} -40 290 0 0 {name=l4 lab=GND}
C {vsource.sym} -1410 270 0 0 {name=V11 value="pulse(-1.8 1.8 0 0.1n 0.1n 1u 2u 0)"}
C {gnd.sym} -40 690 0 1 {name=l10 lab=GND}
C {sky130_fd_pr/pfet_01v8.sym} -60 30 0 0 {name=M10
L=0.15
W=6000
nf=200
mult=1
ad="'int((nf+1)/2) * W/nf * 0.29'"
pd="'2*int((nf+1)/2) * (W/nf + 0.29)'"
as="'int((nf+2)/2) * W/nf * 0.29'"
ps="'2*int((nf+2)/2) * (W/nf + 0.29)'"
nrd="'0.29 / W'" nrs="'0.29 / W'"
sa=0 sb=0 sd=0
model=pfet_01v8
spiceprefix=X
}
C {sky130_fd_pr/nfet_01v8.sym} -60 170 0 0 {name=M2
L=0.15
W=1200
nf=100
mult=1
ad="'int((nf+1)/2) * W/nf * 0.29'"
pd="'2*int((nf+1)/2) * (W/nf + 0.29)'"
as="'int((nf+2)/2) * W/nf * 0.29'"
ps="'2*int((nf+2)/2) * (W/nf + 0.29)'"
nrd="'0.29 / W'" nrs="'0.29 / W'"
sa=0 sb=0 sd=0
model=nfet_01v8
spiceprefix=X
}
C {sky130_fd_pr/pfet_01v8.sym} -60 430 0 0 {name=M3
L=0.15
W=6000
nf=200
mult=1
ad="'int((nf+1)/2) * W/nf * 0.29'"
pd="'2*int((nf+1)/2) * (W/nf + 0.29)'"
as="'int((nf+2)/2) * W/nf * 0.29'"
ps="'2*int((nf+2)/2) * (W/nf + 0.29)'"
nrd="'0.29 / W'" nrs="'0.29 / W'"
sa=0 sb=0 sd=0
model=pfet_01v8
spiceprefix=X
}
C {sky130_fd_pr/nfet_01v8.sym} -60 570 0 0 {name=M4
L=0.15
W=1200
nf=100
mult=1
ad="'int((nf+1)/2) * W/nf * 0.29'"
pd="'2*int((nf+1)/2) * (W/nf + 0.29)'"
as="'int((nf+2)/2) * W/nf * 0.29'"
ps="'2*int((nf+2)/2) * (W/nf + 0.29)'"
nrd="'0.29 / W'" nrs="'0.29 / W'"
sa=0 sb=0 sd=0
model=nfet_01v8
spiceprefix=X
}
C {vsource.sym} -1840 450 0 0 {name=V4 value=1.8}
C {lab_wire.sym} -1840 400 0 0 {name=l16 sig_type=std_logic lab=vdd}
C {gnd.sym} -1840 510 0 0 {name=l5 lab=GND}
C {src/dead_time/dead_time.sym} -590 100 0 0 {name=x2}
C {lab_wire.sym} -560 40 0 0 {name=l17 sig_type=std_logic lab=vdd}
C {gnd.sym} -560 160 0 0 {name=l32 lab=GND}
C {src/dead_time/dead_time.sym} -590 500 0 0 {name=x8}
C {lab_wire.sym} -560 440 0 0 {name=l34 sig_type=std_logic lab=vdd}
C {gnd.sym} -560 560 0 0 {name=l37 lab=GND}
C {lab_wire.sym} -120 30 0 0 {name=l49 sig_type=std_logic lab=vp_p}
C {lab_wire.sym} -100 170 0 0 {name=l50 sig_type=std_logic lab=vn_p}
C {lab_wire.sym} -110 430 0 0 {name=l51 sig_type=std_logic lab=vp_n}
C {lab_wire.sym} -100 570 0 0 {name=l52 sig_type=std_logic lab=vn_n}
C {src/S_to_D/S_to_D.sym} -1540 290 0 0 {name=x11}
C {lab_wire.sym} -1570 240 0 0 {name=l57 sig_type=std_logic lab=vdd}
C {gnd.sym} -1570 350 0 0 {name=l58 lab=GND}
C {vsource.sym} -210 240 0 0 {name=V2 value=1.8}
C {gnd.sym} -210 270 0 0 {name=l11 lab=GND}
C {isource.sym} -1760 650 0 0 {name=I0 value=15u}
C {lab_wire.sym} -1760 600 0 0 {name=l53 sig_type=std_logic lab=vdd}
C {gnd.sym} -1760 830 0 0 {name=l14 lab=GND}
C {sky130_fd_pr/nfet_01v8_lvt.sym} -1740 790 0 1 {name=M5
L=2
W=4
nf=2
mult=8
ad="'int((nf+1)/2) * W/nf * 0.29'"
pd="'2*int((nf+1)/2) * (W/nf + 0.29)'"
as="'int((nf+2)/2) * W/nf * 0.29'"
ps="'2*int((nf+2)/2) * (W/nf + 0.29)'"
nrd="'0.29 / W'" nrs="'0.29 / W'"
sa=0 sb=0 sd=0
model=nfet_01v8_lvt
spiceprefix=X
}
C {sky130_fd_pr/nfet_01v8_lvt.sym} -1640 810 3 1 {name=M6
L=2
W=4
nf=2
mult=8
ad="'int((nf+1)/2) * W/nf * 0.29'"
pd="'2*int((nf+1)/2) * (W/nf + 0.29)'"
as="'int((nf+2)/2) * W/nf * 0.29'"
ps="'2*int((nf+2)/2) * (W/nf + 0.29)'"
nrd="'0.29 / W'" nrs="'0.29 / W'"
sa=0 sb=0 sd=0
model=nfet_01v8_lvt
spiceprefix=X
}
C {lab_wire.sym} -1710 710 0 1 {name=l62 sig_type=std_logic lab=v1}
C {sky130_fd_pr/nfet_01v8_lvt.sym} -1550 810 1 0 {name=M7
L=2
W=4
nf=2
mult=8
ad="'int((nf+1)/2) * W/nf * 0.29'"
pd="'2*int((nf+1)/2) * (W/nf + 0.29)'"
as="'int((nf+2)/2) * W/nf * 0.29'"
ps="'2*int((nf+2)/2) * (W/nf + 0.29)'"
nrd="'0.29 / W'" nrs="'0.29 / W'"
sa=0 sb=0 sd=0
model=nfet_01v8_lvt
spiceprefix=X
}
C {gnd.sym} -1590 860 0 0 {name=l54 lab=GND}
C {lab_wire.sym} -1670 870 0 0 {name=l36 sig_type=std_logic lab=vbias1}
C {lab_wire.sym} -1520 880 0 0 {name=l66 sig_type=std_logic lab=vbias2}
C {lab_wire.sym} -1710 260 0 0 {name=l45 sig_type=std_logic lab=vbias1}
C {lab_wire.sym} -1710 280 0 0 {name=l46 sig_type=std_logic lab=vbias2}
C {lab_wire.sym} -1710 320 0 0 {name=l47 sig_type=std_logic lab=vref}
C {lab_wire.sym} -1140 450 0 0 {name=l7 sig_type=std_logic lab=vref}
C {lab_wire.sym} -1140 50 0 0 {name=l27 sig_type=std_logic lab=vref}
C {netlist_not_shown.sym} -2060 -280 0 0 {name=TT_MODELS1
spice_ignore=false
only_toplevel=true
format="tcleval( @value )"
value="
.include /home/eda/pdk/skywater-pdk/libraries/sky130_fd_pr_ngspice/latest/models/corners/tt.spice
.include /home/eda/magic/class_d_audio_amplifier/OTA/OTA_int_post.spice
.include /home/eda/magic/class_d_audio_amplifier/OTA/OTA_post.spice
.include /home/eda/magic/class_d_audio_amplifier/S_to_D/S_to_D_post.spice
.include /home/eda/magic/class_d_audio_amplifier/triang/triangle_post.spice
* Resistor\\\\$::SKYWATER_MODELS\\\\/Capacitor
.include \\\\$::SKYWATER_MODELS\\\\/models/r+c/res_typical__cap_typical.spice
.include \\\\$::SKYWATER_MODELS\\\\/models/r+c/res_typical__cap_typical__lin.spice
* Special cells
.include \\\\$::SKYWATER_MODELS\\\\/models/corners/tt/specialized_cells.spice
"
}