From 5de157ba5abebb600a7426d40df355a438c25167 Mon Sep 17 00:00:00 2001 From: Mario Romero Date: Sat, 29 Apr 2023 16:06:34 -0400 Subject: [PATCH 1/4] Add tgate --- figures/tgate.svg | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 figures/tgate.svg diff --git a/figures/tgate.svg b/figures/tgate.svg new file mode 100644 index 0000000..6d09039 --- /dev/null +++ b/figures/tgate.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +out + + + +in + + + +¯ +A + + + +A + + \ No newline at end of file From 75c37d5ed74f0173de96d03816adf665419f21f2 Mon Sep 17 00:00:00 2001 From: Mario Romero Date: Sat, 29 Apr 2023 20:39:23 +0000 Subject: [PATCH 2/4] Add 'spice/comp.spice' --- spice/comp.spice | 249 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 249 insertions(+) create mode 100644 spice/comp.spice diff --git a/spice/comp.spice b/spice/comp.spice new file mode 100644 index 0000000..d3fe0ba --- /dev/null +++ b/spice/comp.spice @@ -0,0 +1,249 @@ +** sch_path: /foss/designs/personal/SKY130_SAR-ADC/xschem/adc_comp_latch_tb.sch +**.subckt adc_comp_latch_tb +V1 VDD GND 1.8 +V2 clk GND 0 PULSE(0 1.8 400n 1f 1f 400n 800n) +V3 inp GND 0 PULSE({vcm-5m} {vcm+5m} 0 8u 8u 8u 16u) +V4 inn GND 0 PULSE({vcm+5m} {vcm-5m} 0 8u 8u 8u 16u) +x1 VDD GND clk inp inn comp_trig qn q adc_comp_latch +**** begin user architecture code + +.param mc_mm_switch=0 +.param mc_pr_switch=0 +.include /content/conda-env/share/pdk/sky130A/libs.tech/ngspice/corners/tt.spice +.include /content/conda-env/share/pdk/sky130A/libs.tech/ngspice/r+c/res_typical__cap_typical.spice +.include /content/conda-env/share/pdk/sky130A/libs.tech/ngspice/r+c/res_typical__cap_typical__lin.spice +.include /content/conda-env/share/pdk/sky130A/libs.tech/ngspice/corners/tt/specialized_cells.spice + + +.save all +.temp 25 +.OPTIONS RELTOL=.001 TRTOL=1 ABSTOL=1e-16 CHGTOL=1.0e-16 DEFAD=1.0e-16 +.param vcm=900m +.control + tran 1n 8u + set wr_singlescale + wrdata plot1.txt v(inp)-v(inn) + wrdata plot2.txt v(q) v(comp_trig) + wrdata delay.txt v(clk) v(comp_trig) v(q) + wrdata plot4.txt v(x1.x1.on) v(x1.x1.op) + wrdata plot5.txt v(x1.x1.bn) v(x1.x1.bp) +.endc + +**** end user architecture code +**.ends + +* expanding symbol: adc_comp_latch.sym # of pins=8 +** sym_path: /foss/designs/personal/SKY130_SAR-ADC/xschem/adc_comp_latch.sym +** sch_path: /foss/designs/personal/SKY130_SAR-ADC/xschem/adc_comp_latch.sch +.subckt adc_comp_latch VDD VSS clk inp inn comp_trig latch_qn latch_q +*.iopin VDD +*.iopin VSS +*.ipin clk +*.ipin inp +*.ipin inn +*.opin comp_trig +*.opin latch_qn +*.opin latch_q +x4 VDD VSS clk net1 adc_inverter +x5 VDD VSS net1 net2 adc_inverter +x1 VDD VSS net2 net1 inp inn comp_outp comp_outn adc_comp_circuit +x3 comp_outp comp_outn VDD comp_trig VSS adc_nor +x2 comp_outp latch_qn VDD latch_q VSS comp_outn adc_nor_latch +.ends + + +* expanding symbol: adc_inverter.sym # of pins=4 +** sym_path: /foss/designs/personal/SKY130_SAR-ADC/xschem/adc_inverter.sym +** sch_path: /foss/designs/personal/SKY130_SAR-ADC/xschem/adc_inverter.sch +.subckt adc_inverter VDD VSS in out +*.iopin VDD +*.iopin VSS +*.ipin in +*.opin out +XM2 out in VDD VDD sky130_fd_pr__pfet_01v8 L=0.15 W=0.84 nf=2 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +XM1 out in VSS VSS sky130_fd_pr__nfet_01v8 L=0.15 W=0.42 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +.ends + + +* expanding symbol: adc_comp_circuit.sym # of pins=8 +** sym_path: /foss/designs/personal/SKY130_SAR-ADC/xschem/adc_comp_circuit.sym +** sch_path: /foss/designs/personal/SKY130_SAR-ADC/xschem/adc_comp_circuit.sch +.subckt adc_comp_circuit VPWR VGND clk nclk inp inn outp outn +*.iopin VPWR +*.iopin VGND +*.ipin clk +*.ipin nclk +*.ipin inp +*.ipin inn +*.opin outp +*.opin outn +XM3 on inp in_stage_net1 VGND sky130_fd_pr__nfet_01v8_lvt L=0.15 W=8 nf=4 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM4 op inn in_stage_net1 VGND sky130_fd_pr__nfet_01v8_lvt L=0.15 W=8 nf=4 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM5 in_stage_net1 clk VGND VGND sky130_fd_pr__nfet_01v8 L=0.15 W=4 nf=8 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM6 in_stage_net2 bp VPWR VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=4 nf=2 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM7 in_stage_net3 bn VPWR VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=4 nf=2 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM8 bn op in_stage_net2 VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=4 nf=2 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM9 bp on in_stage_net3 VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=4 nf=2 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM10 bn bp VGND VGND sky130_fd_pr__nfet_01v8 L=0.15 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +XM11 bn nclk VGND VGND sky130_fd_pr__nfet_01v8 L=0.15 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +XM12 bp nclk VGND VGND sky130_fd_pr__nfet_01v8 L=0.15 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +XM13 bp bn VGND VGND sky130_fd_pr__nfet_01v8 L=0.15 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +XM2 op clk VPWR VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=2 nf=4 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +XM1 on clk VPWR VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=2 nf=4 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +x1 VPWR VGND bp outp adc_comp_buffer +x2 VPWR VGND bn outn adc_comp_buffer +x3 VGND VGND on VGND VGND adc_noise_decoup_cell2 +x4 VGND VGND op VGND VGND adc_noise_decoup_cell2 +XM4_DUMMY in_stage_net1 inn in_stage_net1 VGND sky130_fd_pr__nfet_01v8_lvt L=0.15 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM3_DUMMY in_stage_net1 inp in_stage_net1 VGND sky130_fd_pr__nfet_01v8_lvt L=0.15 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM5_DUMMY2 in_stage_net1 clk in_stage_net1 VGND sky130_fd_pr__nfet_01v8 L=0.15 W=0.5 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM5_DUMMY1 in_stage_net1 clk in_stage_net1 VGND sky130_fd_pr__nfet_01v8 L=0.15 W=0.5 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM2_DUMMY VPWR clk VPWR VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=0.5 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM1_DUMMY VPWR clk VPWR VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=0.5 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM8_DUMMY in_stage_net2 op in_stage_net2 VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM9_DUMMY in_stage_net3 on in_stage_net3 VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM6_DUMMY in_stage_net2 bp in_stage_net2 VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM7_DUMMY in_stage_net3 bn in_stage_net3 VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM12_DUMMY VGND VGND VGND VGND sky130_fd_pr__nfet_01v8 L=0.15 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +XM11_DUMMY VGND VGND VGND VGND sky130_fd_pr__nfet_01v8 L=0.15 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' ++ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/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 mult=1 m=1 +.ends + + +* expanding symbol: adc_nor.sym # of pins=5 +** sym_path: /foss/designs/personal/SKY130_SAR-ADC/xschem/adc_nor.sym +** sch_path: /foss/designs/personal/SKY130_SAR-ADC/xschem/adc_nor.sch +.subckt adc_nor b a VDD q VSS +*.iopin VDD +*.iopin VSS +*.ipin b +*.ipin a +*.opin q +XM5 q b VSS VSS sky130_fd_pr__nfet_01v8 L=0.15 W=0.42 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +XM6 q a VSS VSS sky130_fd_pr__nfet_01v8 L=0.15 W=0.42 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +XM1 q b net1 VDD sky130_fd_pr__pfet_01v8 L=0.15 W=0.8 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +XM2 q a net2 VDD sky130_fd_pr__pfet_01v8 L=0.15 W=0.8 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +XM3 net2 b VDD VDD sky130_fd_pr__pfet_01v8 L=0.15 W=0.8 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +XM4 net1 a VDD VDD sky130_fd_pr__pfet_01v8 L=0.15 W=0.8 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +.ends + + +* expanding symbol: adc_nor_latch.sym # of pins=6 +** sym_path: /foss/designs/personal/SKY130_SAR-ADC/xschem/adc_nor_latch.sym +** sch_path: /foss/designs/personal/SKY130_SAR-ADC/xschem/adc_nor_latch.sch +.subckt adc_nor_latch s qn VDD q VSS r +*.iopin VDD +*.iopin VSS +*.ipin s +*.ipin r +*.opin q +*.opin qn +x1 q s VDD qn VSS adc_nor +x2 qn r VDD q VSS adc_nor +.ends + + +* expanding symbol: adc_comp_buffer.sym # of pins=4 +** sym_path: /foss/designs/personal/SKY130_SAR-ADC/xschem/adc_comp_buffer.sym +** sch_path: /foss/designs/personal/SKY130_SAR-ADC/xschem/adc_comp_buffer.sch +.subckt adc_comp_buffer VDD VSS in out +*.iopin VDD +*.iopin VSS +*.ipin in +*.opin out +XM5 buf_mid in VSS VSS sky130_fd_pr__nfet_01v8 L=0.15 W=0.5 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +XM1 buf_mid in VDD VDD sky130_fd_pr__pfet_01v8 L=0.15 W=1 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +XM2 out buf_mid VDD VDD sky130_fd_pr__pfet_01v8 L=0.15 W=2 nf=2 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +XM6 out buf_mid VSS VSS sky130_fd_pr__nfet_01v8 L=0.15 W=1 nf=2 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' ++ pd='2*int((nf+1)/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 mult=1 m=1 +.ends + + +* expanding symbol: adc_noise_decoup_cell2.sym # of pins=5 +** sym_path: /foss/designs/personal/SKY130_SAR-ADC/xschem/adc_noise_decoup_cell2.sym +** sch_path: /foss/designs/personal/SKY130_SAR-ADC/xschem/adc_noise_decoup_cell2.sch +.subckt adc_noise_decoup_cell2 mimcap_top mimcap_bot nmoscap_top nmoscap_bot pwell +*.iopin nmoscap_top +*.iopin mimcap_top +*.iopin mimcap_bot +*.iopin nmoscap_bot +*.iopin pwell +XC1 mimcap_top mimcap_bot sky130_fd_pr__cap_mim_m3_1 W=18.9 L=5.1 MF=1 m=1 +XC2 nmoscap_top nmoscap_bot pwell sky130_fd_pr__cap_var_lvt W=18.4 L=3.9 VM=1 m=1 +.ends + +.GLOBAL GND +.GLOBAL VDD +.end \ No newline at end of file From 9fdc94424de3fa9ef1286594f2e6c64af523617e Mon Sep 17 00:00:00 2001 From: Mario Romero Date: Sun, 30 Apr 2023 01:49:07 +0000 Subject: [PATCH 3/4] Change transient limits --- spice/comp.spice | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spice/comp.spice b/spice/comp.spice index d3fe0ba..6505b26 100644 --- a/spice/comp.spice +++ b/spice/comp.spice @@ -20,7 +20,7 @@ x1 VDD GND clk inp inn comp_trig qn q adc_comp_latch .OPTIONS RELTOL=.001 TRTOL=1 ABSTOL=1e-16 CHGTOL=1.0e-16 DEFAD=1.0e-16 .param vcm=900m .control - tran 1n 8u + tran 100p 4.403u 4.3995u set wr_singlescale wrdata plot1.txt v(inp)-v(inn) wrdata plot2.txt v(q) v(comp_trig) From c875390943710866182b3c92a4b7efc38f6b8e99 Mon Sep 17 00:00:00 2001 From: Mario Romero Date: Tue, 2 May 2023 18:32:26 -0400 Subject: [PATCH 4/4] Fix m7 --- figures/preamp.svg | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/figures/preamp.svg b/figures/preamp.svg index 938a764..45da71e 100644 --- a/figures/preamp.svg +++ b/figures/preamp.svg @@ -25,6 +25,7 @@ + @@ -109,10 +110,13 @@ text.f3 {font-family:cmr7;font-size:6.973848px} - + + - + + + @@ -158,6 +162,8 @@ text.f3 {font-family:cmr7;font-size:6.973848px} 5 M 6 +M +7 M 8 M