comparing various comparator topologies
diff --git a/comparator/comparator-preamp-selfbias.spice b/comparator/comparator-preamp-selfbias.spice new file mode 100644 index 0000000..2dac93e --- /dev/null +++ b/comparator/comparator-preamp-selfbias.spice
@@ -0,0 +1,33 @@ +* scale: 1e6 units = 1 micron + +.subckt comparator-preamp-selfbias VP VN VPAMP VNAMP VGND VPWR + +*constant current source: paralleled to allow for size matching +* X0 VI VI VGND VGND sky130_fd_pr__nfet_03v3_nvt w=1e+6u l=0.6e+6u +* X1 VI VI VGND VGND sky130_fd_pr__nfet_03v3_nvt w=1e+6u l=0.6e+6u +* +* *Diff Pair +* X12 VPAMP VP VI VGND sky130_fd_pr__nfet_03v3_nvt w=1e+6u l=0.6e+6u +* X13 VNAMP VN VI VGND sky130_fd_pr__nfet_03v3_nvt w=1e+6u l=0.6e+6u +* +* *Load transistors +* X24 VPWR VPAMP VPAMP VPWR sky130_fd_pr__pfet_g5v0d10v5 w=1.5e+6u l=0.5e+6u +* X25 VPWR VNAMP VNAMP VPWR sky130_fd_pr__pfet_g5v0d10v5 w=1.5e+6u l=0.5e+6u + +* extracted +*.option scale=1u + + +X2 VPAMP VPAMP VPWR VPWR sky130_fd_pr__pfet_g5v0d10v5 ad=0 pd=0 as=-0 ps=0 w=1.5e+06u l=500000u +X3 VNAMP VPAMP VPWR VPWR sky130_fd_pr__pfet_g5v0d10v5 ad=0 pd=0 as=-0 ps=0 w=1.5e+06u l=500000u + +X4 VGND VI VI VGND sky130_fd_pr__nfet_03v3_nvt ad=0 pd=0 as=-0 ps=0 w=1e+06u l=600000u +X5 VGND VGND VGND VGND sky130_fd_pr__nfet_03v3_nvt ad=0 pd=0 as=0 ps=0 w=1e+06u l=600000u +X6 VI VI VGND VGND sky130_fd_pr__nfet_03v3_nvt ad=-0 pd=0 as=0 ps=0 w=1e+06u l=600000u + +X12 VI VN VNAMP VGND sky130_fd_pr__nfet_03v3_nvt ad=-0 pd=0 as=-0 ps=0 w=1e+06u l=600000u +X13 VI VP VPAMP VGND sky130_fd_pr__nfet_03v3_nvt ad=-0 pd=0 as=-0 ps=0 w=1e+06u l=600000u +C0 VPWR VGND 8.16fF + + +.ends \ No newline at end of file
diff --git a/comparator/simulation.spice b/comparator/simulation.spice index ac9e253..3e93e5f 100644 --- a/comparator/simulation.spice +++ b/comparator/simulation.spice
@@ -5,11 +5,16 @@ .include comparator-decision.spice .include comparator-diffamp.spice .include comparator-whole.spice +.include comparator-preamp-selfbias.spice * instantiate the comparator -*Xpre VP VN VPAMP VNAMP VI BIASN VGND VPWR comparator-preamp -*Xdec VPAMP VNAMP VOP VON VGND VPWR comparator-decision -Xdif VP VN VOUTdiff VGND VDD1v8 comparator-diffamp +*Xpre VP VN VPAMP VNAMP VI BIASN VGND VDD3v3 comparator-preamp +Xpre VP VN VPAMP VNAMP VGND VDD3v3 comparator-preamp-selfbias +Xdec VPAMP VNAMP VOP VON VGND VDD3v3 comparator-decision +Xdif VOP VON VOUTdiff VGND VDD1v8 comparator-diffamp + +Xpuredif VP VN VOUTpurediff VGND VDD1v8 comparator-diffamp + Xcomp VP VN BIASN VOUT VGND VDD3v3 VDD1v8 comparator-whole @@ -36,7 +41,8 @@ run set color0 = white set color1 = black -plot VP VN VOUT VOUTdiff VDD3v3 +plot VOUT VOUTdiff VDD3v3 +plot VOUTdiff VOUTpurediff VDD3v3 *plot VPAMP VNAMP VI *plot VOP VON plot i(Vdd3v3) i(Vdd1v8)