translate DSA schematics
diff --git a/xschem/._FB1 b/xschem/._FB1
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/._FB1
+++ /dev/null
Binary files differ
diff --git a/xschem/._FB1.spice b/xschem/._FB1.spice
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/._FB1.spice
+++ /dev/null
Binary files differ
diff --git a/xschem/._compiled.sch b/xschem/._compiled.sch
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/._compiled.sch
+++ /dev/null
Binary files differ
diff --git a/xschem/._compiled.spice b/xschem/._compiled.spice
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/._compiled.spice
+++ /dev/null
Binary files differ
diff --git a/xschem/FB1 b/xschem/FB1
deleted file mode 100644
index f7de620..0000000
--- a/xschem/FB1
+++ /dev/null
@@ -1,88 +0,0 @@
-v {xschem version=2.9.9 file_version=1.2 }
-G {}
-K {}
-V {}
-S {}
-E {}
-T {NMOS Characterization
-} 20 -260 0 0 0.4 0.4 {}
-N 90 -100 90 -90 { lab=vg}
-N 90 -100 130 -100 { lab=vg}
-N 170 -150 170 -130 { lab=vd}
-N 170 -150 260 -150 { lab=vd}
-N 260 -150 260 -130 { lab=vd}
-N 80 -140 90 -140 { lab=vg}
-N 70 -140 80 -140 { lab=vg}
-N 60 -140 70 -140 { lab=vg}
-N 60 -140 60 -100 { lab=vg}
-N 60 -100 90 -100 { lab=vg}
-N 160 -150 170 -150 { lab=vd}
-N 160 -170 160 -150 { lab=vd}
-N 160 -170 190 -170 { lab=vd}
-C {sky130_fd_pr/nfet3_01v8.sym} 150 -100 0 0 {name=M1
-L=0.15
-W=1
-body=GND
-nf=1
-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 {devices/code_shown.sym} 360 -240 0 0 {name=NGSPICE 
-only_toplevel=false 
-value=".option TEMP=27C
-
-.dc v2 0 3 0.01
-
-.control
-  set color0 = rgb:f/f/f
-  alter @v1[dc] = 1
-  print @m.xm1.msky130_fd_pr__nfet_01v8[vdsat]
-  run
-  alter @v1[dc] = 1.2
-  print @m.xm1.msky130_fd_pr__nfet_01v8[vdsat]
-  run
-  alter @v1[dc] = 1.4
-  print @m.xm1.msky130_fd_pr__nfet_01v8[vdsat]
-  run
-  alter @v1[dc] = 1.8
-  print @m.xm1.msky130_fd_pr__nfet_01v8[vdsat]
-  run
-  alter @v1[dc] = 2
-  print @m.xm1.msky130_fd_pr__nfet_01v8[vdsat]
-  run
-
-  plot (-dc1.i(v2)) (-dc2.i(v2)) (-dc3.i(v2)) (-dc4.i(v2)) (-dc5.i(v2))
-
-.endc
-
-.save all
-"}
-C {devices/code.sym} -170 -290 0 0 {name=TT_MODELS
-only_toplevel=true
-format="tcleval( @value )"
-value="** manual skywater pdks install (with patches applied)
-* .lib \\\\$::SKYWATER_MODELS\\\\/models/sky130.lib.spice tt
-
-** opencircuitdesign pdks install
-.lib \\\\$::SKYWATER_MODELS\\\\/sky130.lib.spice tt
-
-.param mc_mm_switch=0
-.param mc_pr_switch=0
-"
-spice_ignore=false}
-C {devices/gnd.sym} 170 -70 0 0 {name=l1 lab=GND}
-C {devices/vsource.sym} 90 -60 0 0 {name=v1 value=1}
-C {devices/vsource.sym} 260 -100 0 0 {name=v2 value=0
-}
-C {devices/gnd.sym} 90 -30 0 0 {name=l2 lab=GND}
-C {devices/gnd.sym} 260 -70 0 0 {name=l3 lab=GND}
-C {devices/opin.sym} 70 -140 0 0 {name=vg lab=vg}
-C {devices/opin.sym} 170 -170 0 0 {name=vd lab=vd}
-C {invert.sym} 660 140 0 0 {}
diff --git a/xschem/FB1.spice b/xschem/FB1.spice
deleted file mode 100644
index 8a754ed..0000000
--- a/xschem/FB1.spice
+++ /dev/null
@@ -1,53 +0,0 @@
-**.subckt FB1 vg vd
-*.opin vg
-*.opin vd
-XM1 vd vg GND GND sky130_fd_pr__nfet_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 
-v1 vg GND 1
-v2 vd GND 0
-**** begin user architecture code
-
-.option TEMP=27C
-
-.dc v2 0 3 0.01
-
-.control
-  set color0 = rgb:f/f/f
-  alter @v1[dc] = 1
-  print @m.xm1.msky130_fd_pr__nfet_01v8[vdsat]
-  run
-  alter @v1[dc] = 1.2
-  print @m.xm1.msky130_fd_pr__nfet_01v8[vdsat]
-  run
-  alter @v1[dc] = 1.4
-  print @m.xm1.msky130_fd_pr__nfet_01v8[vdsat]
-  run
-  alter @v1[dc] = 1.8
-  print @m.xm1.msky130_fd_pr__nfet_01v8[vdsat]
-  run
-  alter @v1[dc] = 2
-  print @m.xm1.msky130_fd_pr__nfet_01v8[vdsat]
-  run
-
-  plot (-dc1.i(v2)) (-dc2.i(v2)) (-dc3.i(v2)) (-dc4.i(v2)) (-dc5.i(v2))
-
-.endc
-
-.save all
-
-
- ** manual skywater pdks install (with patches applied)
-* .lib /ef/tech/SW.2/sky130A/libs.tech/ngspice/models/sky130.lib.spice tt
-
-** opencircuitdesign pdks install
-.lib /ef/tech/SW.2/sky130A/libs.tech/ngspice/sky130.lib.spice tt
-
-.param mc_mm_switch=0
-.param mc_pr_switch=0
-
-**** end user architecture code
-**.ends
-.GLOBAL GND
-** flattened .save nodes
-.end
diff --git a/xschem/attenuator/._basic-invert.sch b/xschem/attenuator/._basic-invert.sch
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._basic-invert.sch
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._basic-invert.sym b/xschem/attenuator/._basic-invert.sym
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._basic-invert.sym
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._dsa.sch b/xschem/attenuator/._dsa.sch
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._dsa.sch
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._dsa.spice b/xschem/attenuator/._dsa.spice
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._dsa.spice
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._dsa.sym b/xschem/attenuator/._dsa.sym
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._dsa.sym
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._gate-switch.sch b/xschem/attenuator/._gate-switch.sch
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._gate-switch.sch
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._gate-switch.spice b/xschem/attenuator/._gate-switch.spice
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._gate-switch.spice
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._gate-switch.sym b/xschem/attenuator/._gate-switch.sym
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._gate-switch.sym
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._invert b/xschem/attenuator/._invert
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._invert
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._invert.sch b/xschem/attenuator/._invert.sch
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._invert.sch
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._invert.spice b/xschem/attenuator/._invert.spice
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._invert.spice
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._invert.sym b/xschem/attenuator/._invert.sym
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._invert.sym
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._passgate.spice b/xschem/attenuator/._passgate.spice
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._passgate.spice
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._trans-gate-testbench.sch b/xschem/attenuator/._trans-gate-testbench.sch
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._trans-gate-testbench.sch
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._trans-gate-testbench.spice b/xschem/attenuator/._trans-gate-testbench.spice
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._trans-gate-testbench.spice
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._trans-gate.sch b/xschem/attenuator/._trans-gate.sch
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._trans-gate.sch
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._trans-gate.sym b/xschem/attenuator/._trans-gate.sym
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._trans-gate.sym
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._transgate-full.sch b/xschem/attenuator/._transgate-full.sch
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._transgate-full.sch
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._transgate-full.spice b/xschem/attenuator/._transgate-full.spice
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._transgate-full.spice
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/._transgate-full.sym b/xschem/attenuator/._transgate-full.sym
deleted file mode 100644
index 6dd15e9..0000000
--- a/xschem/attenuator/._transgate-full.sym
+++ /dev/null
Binary files differ
diff --git a/xschem/attenuator/basic-invert.sch b/xschem/attenuator/basic-invert.sch
deleted file mode 100644
index 10289c3..0000000
--- a/xschem/attenuator/basic-invert.sch
+++ /dev/null
@@ -1,66 +0,0 @@
-v {xschem version=3.0.0 file_version=1.2 }
-G {}
-K {}
-V {}
-S {}
-E {}
-N 170 -200 170 -160 { lab=out}
-N 170 -290 170 -260 { lab=vdd}
-N 170 -100 170 -70 { lab=gnd}
-N 170 -230 190 -230 { lab=vdd}
-N 190 -260 190 -230 { lab=vdd}
-N 170 -260 190 -260 { lab=vdd}
-N 170 -130 190 -130 { lab=gnd}
-N 190 -130 190 -100 { lab=gnd}
-N 170 -100 190 -100 { lab=gnd}
-N 170 -180 260 -180 { lab=out}
-N 100 -230 130 -230 { lab=in}
-N 100 -230 100 -130 { lab=in}
-N 100 -130 130 -130 { lab=in}
-N 60 -180 100 -180 { lab=in}
-C {/Volumes/WORK_DRIVE/open_pdks/sky130/sky130A/libs.tech/xschem/sky130_fd_pr/nfet_01v8.sym} 150 -130 0 0 {name=M1
-L=0.15
-W=1
-nf=1 
-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 {/Volumes/WORK_DRIVE/open_pdks/sky130/sky130A/libs.tech/xschem/sky130_fd_pr/pfet_01v8.sym} 150 -230 0 0 {name=M2
-L=0.15
-W=1
-nf=1
-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 {ipin.sym} 60 -180 0 0 {name=pn lab=in}
-C {ipin.sym} 170 -70 3 0 {name=pnd lab=gnd}
-C {ipin.sym} 170 -290 1 0 {name=pdd lab=vdd}
-C {opin.sym} 260 -180 0 0 {name=put lab=out}
-C {code.sym} 320 -230 0 0 {name=sT_MODELS
-only_toplevel=true
-format="tcleval( @value )"
-value="** manual skywater pdks install (with patches applied)
-* .lib \\\\$::SKYWATER_MODELS\\\\/models/sky130.lib.spice tt\\
-*** remove the /models/
-
-** opencircuitdesign pdks install
-.lib /Volumes/WORK_DRIVE/open_pdks/sky130/custom/models/sky130.lib.spice tt
-
-.param mc_mm_switch=0
-.param mc_pr_switch=0
-"
-spice_ignore=false}
diff --git a/xschem/attenuator/basic-invert.sym b/xschem/attenuator/basic-invert.sym
deleted file mode 100644
index 9accd5d..0000000
--- a/xschem/attenuator/basic-invert.sym
+++ /dev/null
@@ -1,25 +0,0 @@
-v {xschem version=2.9.9 file_version=1.2 }
-G {}
-K {type=subcircuit
-format="@name @pinlist @symname"
-template="name=XI1"}
-V {}
-S {}
-E {}
-L 4 120 -200 120 -120 {}
-L 4 120 -200 200 -160 {}
-L 4 120 -120 200 -160 {}
-L 4 100 -160 120 -160 {}
-L 4 210 -160 230 -160 {}
-L 4 160 -200 160 -180 {}
-L 4 160 -140 160 -120 {}
-B 5 157.5 -202.5 162.5 -197.5 {name=vdd
-dir=in}
-B 5 157.5 -122.5 162.5 -117.5 {name=gnd
-dir=in}
-B 5 227.5 -162.5 232.5 -157.5 {name=out
-dir=out}
-B 5 97.5 -162.5 102.5 -157.5 {name=in
-dir=in}
-A 4 205 -160 7.071067811865476 225 360 {}
-T {@name} 125 -165 0 0 0.2 0.2 {}
diff --git a/xschem/attenuator/dsa.sch b/xschem/attenuator/dsa.sch
index e640a21..0438eba 100644
--- a/xschem/attenuator/dsa.sch
+++ b/xschem/attenuator/dsa.sch
@@ -4,101 +4,125 @@
 V {}
 S {}
 E {}
-N 400 -190 440 -190 { lab=#net1}
-N 400 -150 440 -150 { lab=#net2}
-N 500 -190 540 -190 { lab=#net2}
-N 440 -150 540 -150 { lab=#net2}
-N 540 -190 540 -150 { lab=#net2}
-N 540 -170 560 -170 { lab=#net2}
-N 320 -300 320 -230 { lab=cntrl1}
-N 720 -190 760 -190 { lab=#net3}
-N 720 -150 760 -150 { lab=#net4}
-N 820 -190 860 -190 { lab=#net4}
-N 760 -150 860 -150 { lab=#net4}
-N 860 -190 860 -150 { lab=#net4}
-N 860 -170 880 -170 { lab=#net4}
-N 640 -300 640 -230 { lab=cntrl2}
-N 1040 -190 1080 -190 { lab=#net5}
-N 1040 -150 1080 -150 { lab=#net6}
-N 1140 -190 1180 -190 { lab=#net6}
-N 1080 -150 1180 -150 { lab=#net6}
-N 1180 -190 1180 -150 { lab=#net6}
-N 1180 -170 1200 -170 { lab=#net6}
-N 960 -300 960 -230 { lab=cntrl3}
-N 1360 -190 1400 -190 { lab=#net7}
-N 1360 -150 1400 -150 { lab=out}
-N 1460 -190 1500 -190 { lab=out}
-N 1400 -150 1500 -150 { lab=out}
-N 1500 -190 1500 -150 { lab=out}
-N 1500 -170 1520 -170 { lab=out}
-N 1280 -300 1280 -230 { lab=cntrl4}
-N 1520 -170 1560 -170 { lab=out}
-N 200 -170 240 -170 { lab=in}
-N 1320 -120 1320 -110 { lab=gnd}
-N 1000 -120 1320 -120 { lab=gnd}
-N 1000 -120 1000 -110 { lab=gnd}
-N 680 -120 1000 -120 { lab=gnd}
-N 680 -120 680 -110 { lab=gnd}
-N 360 -120 680 -120 { lab=gnd}
-N 360 -120 360 -110 { lab=gnd}
-N 200 -120 360 -120 { lab=gnd}
-N 320 -110 320 -90 { lab=vbias}
-N 320 -90 640 -90 { lab=vbias}
-N 640 -110 640 -90 { lab=vbias}
-N 640 -90 960 -90 { lab=vbias}
-N 960 -110 960 -90 { lab=vbias}
-N 960 -90 1280 -90 { lab=vbias}
-N 1280 -110 1280 -90 { lab=vbias}
-N 200 -90 320 -90 { lab=vbias}
-N 280 -110 280 -70 { lab=vdd}
-N 600 -110 600 -70 { lab=vdd}
-N 920 -110 920 -70 { lab=vdd}
-N 1240 -110 1240 -70 { lab=vdd}
-N 200 -70 1240 -70 { lab=vdd}
-C {code.sym} 30 -380 0 0 {name=sT_MODELS
-only_toplevel=true
-format="tcleval( @value )"
-value="** manual skywater pdks install (with patches applied)
-* .lib \\\\$::SKYWATER_MODELS\\\\/models/sky130.lib.spice tt\\
-*** remove the /models/
-
-** opencircuitdesign pdks install
-.lib /Volumes/WORK_DRIVE/open_pdks/sky130/custom/models/sky130.lib.spice tt
-
-.param mc_mm_switch=0
-.param mc_pr_switch=0
-"
-spice_ignore=false}
-C {res.sym} 470 -190 3 0 {name=R1
-value=50
-footprint=1206
-device=resistor
-m=1}
-C {res.sym} 790 -190 3 0 {name=R2
-value=200
-footprint=1206
-device=resistor
-m=1}
-C {transgate-full.sym} 40 50 0 0 {name=XDTG1}
-C {transgate-full.sym} 360 50 0 0 {name=XDTG2}
-C {res.sym} 1110 -190 3 0 {name=R3
-value=1k
-footprint=1206
-device=resistor
-m=1}
-C {transgate-full.sym} 680 50 0 0 {name=XDTG3}
-C {res.sym} 1430 -190 3 0 {name=R4
-value=10k
-footprint=1206
-device=resistor
-m=1}
-C {transgate-full.sym} 1000 50 0 0 {name=XDTG4}
-C {ipin.sym} 320 -300 1 0 {name=pntrl1 lab=cntrl1}
-C {ipin.sym} 640 -300 1 0 {name=pntrl2 lab=cntrl2}
-C {ipin.sym} 960 -300 1 0 {name=pntrl3 lab=cntrl3}
-C {ipin.sym} 1280 -300 1 0 {name=pntrl4 lab=cntrl4}
-C {ipin.sym} 200 -170 0 0 {name=pn lab=in}
-C {opin.sym} 1560 -170 0 0 {name=put lab=out}
-C {ipin.sym} 200 -120 0 0 {name=pnd lab=gnd}
-C {ipin.sym} 200 -90 0 0 {name=pbias lab=vbias}
-C {ipin.sym} 200 -70 0 0 {name=pdd lab=vdd}
+N 160 -220 200 -220 {
+lab=in}
+N 270 -340 270 -290 {
+lab=ctr1}
+N 340 -240 380 -240 {
+lab=#net1}
+N 340 -200 380 -200 {
+lab=#net2}
+N 300 -160 300 -140 {
+lab=gnd}
+N 240 -160 240 -120 {
+lab=vdd}
+N 380 -200 480 -200 {
+lab=#net2}
+N 440 -240 480 -240 {
+lab=#net2}
+N 480 -240 480 -200 {
+lab=#net2}
+N 480 -220 520 -220 {
+lab=#net2}
+N 590 -340 590 -290 {
+lab=ctr2}
+N 660 -240 700 -240 {
+lab=#net3}
+N 660 -200 700 -200 {
+lab=#net4}
+N 620 -160 620 -140 {
+lab=gnd}
+N 560 -160 560 -120 {
+lab=vdd}
+N 700 -200 800 -200 {
+lab=#net4}
+N 760 -240 800 -240 {
+lab=#net4}
+N 800 -240 800 -200 {
+lab=#net4}
+N 800 -220 840 -220 {
+lab=#net4}
+N 910 -340 910 -290 {
+lab=ctr3}
+N 980 -240 1020 -240 {
+lab=#net5}
+N 980 -200 1020 -200 {
+lab=#net6}
+N 940 -160 940 -140 {
+lab=gnd}
+N 880 -160 880 -120 {
+lab=vdd}
+N 1020 -200 1120 -200 {
+lab=#net6}
+N 1080 -240 1120 -240 {
+lab=#net6}
+N 1120 -240 1120 -200 {
+lab=#net6}
+N 1120 -220 1160 -220 {
+lab=#net6}
+N 1230 -340 1230 -290 {
+lab=ctr4}
+N 1300 -240 1340 -240 {
+lab=#net7}
+N 1300 -200 1340 -200 {
+lab=out}
+N 1260 -160 1260 -140 {
+lab=gnd}
+N 1200 -160 1200 -120 {
+lab=vdd}
+N 1340 -200 1440 -200 {
+lab=out}
+N 1400 -240 1440 -240 {
+lab=out}
+N 1440 -240 1440 -200 {
+lab=out}
+N 1440 -220 1480 -220 {
+lab=out}
+N 300 -140 620 -140 {
+lab=gnd}
+N 620 -140 940 -140 {
+lab=gnd}
+N 940 -140 1260 -140 {
+lab=gnd}
+N 160 -140 300 -140 {
+lab=gnd}
+N 880 -120 1200 -120 {
+lab=vdd}
+N 560 -120 880 -120 {
+lab=vdd}
+N 240 -120 560 -120 {
+lab=vdd}
+N 160 -120 240 -120 {
+lab=vdd}
+C {/Volumes/WORK_DRIVE/caravel_automatic_gain_control/xschem/attenuator/spdt.sym} -40 40 0 0 {name=XSPDT1}
+C {/Volumes/WORK_DRIVE/open_pdks/sky130/sky130A/libs.tech/xschem/sky130_fd_pr/res_generic_po.sym} 410 -240 3 0 {name=R1
+W=1
+L=1
+model=res_generic_po
+mult=1}
+C {/Volumes/WORK_DRIVE/caravel_automatic_gain_control/xschem/attenuator/spdt.sym} 280 40 0 0 {name=XSPDT2}
+C {/Volumes/WORK_DRIVE/open_pdks/sky130/sky130A/libs.tech/xschem/sky130_fd_pr/res_generic_po.sym} 730 -240 3 0 {name=R2
+W=1
+L=1
+model=res_generic_po
+mult=1}
+C {/Volumes/WORK_DRIVE/caravel_automatic_gain_control/xschem/attenuator/spdt.sym} 600 40 0 0 {name=XSPDT3}
+C {/Volumes/WORK_DRIVE/open_pdks/sky130/sky130A/libs.tech/xschem/sky130_fd_pr/res_generic_po.sym} 1050 -240 3 0 {name=R3
+W=1
+L=1
+model=res_generic_po
+mult=1}
+C {/Volumes/WORK_DRIVE/caravel_automatic_gain_control/xschem/attenuator/spdt.sym} 920 40 0 0 {name=XSPDT4}
+C {/Volumes/WORK_DRIVE/open_pdks/sky130/sky130A/libs.tech/xschem/sky130_fd_pr/res_generic_po.sym} 1370 -240 3 0 {name=R4
+W=1
+L=1
+model=res_generic_po
+mult=1}
+C {ipin.sym} 160 -220 0 0 {name=in lab=in}
+C {ipin.sym} 160 -140 0 0 {name=gnd lab=gnd}
+C {ipin.sym} 160 -120 0 0 {name=vdd lab=vdd}
+C {ipin.sym} 270 -340 1 0 {name=ctr1 lab=ctr1}
+C {ipin.sym} 590 -340 1 0 {name=ctr2 lab=ctr2}
+C {ipin.sym} 910 -340 1 0 {name=ctr3 lab=ctr3}
+C {ipin.sym} 1230 -340 1 0 {name=ctr4 lab=ctr4}
+C {opin.sym} 1480 -220 0 0 {name=out lab=out}
diff --git a/xschem/attenuator/dsa.spice b/xschem/attenuator/dsa.spice
deleted file mode 100644
index 394d046..0000000
--- a/xschem/attenuator/dsa.spice
+++ /dev/null
@@ -1,91 +0,0 @@
-**.subckt dsa cntrl1 cntrl2 cntrl3 cntrl4 in out gnd vbias vdd
-*.ipin cntrl1
-*.ipin cntrl2
-*.ipin cntrl3
-*.ipin cntrl4
-*.ipin in
-*.opin out
-*.ipin gnd
-*.ipin vbias
-*.ipin vdd
-R1 net1 net2 50 m=1
-R2 net3 net4 200 m=1
-XDTG1 in cntrl1 vdd vbias gnd net2 net1 transgate-full
-XDTG2 net2 cntrl2 vdd vbias gnd net4 net3 transgate-full
-R3 net5 net6 1k m=1
-XDTG3 net4 cntrl3 vdd vbias gnd net6 net5 transgate-full
-R4 net7 out 10k m=1
-XDTG4 net6 cntrl4 vdd vbias gnd out net7 transgate-full
-**** begin user architecture code
- ** manual skywater pdks install (with patches applied)
-* .lib /ef/tech/SW.2/sky130A/libs.tech/ngspice/models/sky130.lib.spice tt
-
-** opencircuitdesign pdks install
-.lib /ef/tech/SW.2/sky130A/libs.tech/ngspice/sky130.lib.spice tt
-
-.param mc_mm_switch=0
-.param mc_pr_switch=0
-
-
-
-.tran 0.000001s 0.0001s
-.save all
-
-
-**** end user architecture code
-**.ends
-
-* expanding   symbol:  transgate-full.sym # of pins=7
-* sym_path: /home/u5921_ryanwan/design/FB1/xschem/transgate-full.sym
-* sch_path: /home/u5921_ryanwan/design/FB1/xschem/transgate-full.sch
-.subckt transgate-full  in cntrl vdd vbias gnd out2 out1
-*.ipin cntrl
-*.ipin vdd
-*.ipin in
-*.ipin gnd
-*.ipin vbias
-*.opin out2
-*.opin out1
-XI1 vdd gnd net1 cntrl basic-invert
-XTG1 in out1 gnd vbias net1 cntrl gate-switch
-XTG2 in out2 gnd vbias cntrl net1 gate-switch
-.ends
-
-
-* expanding   symbol:  basic-invert.sym # of pins=4
-* sym_path: /home/u5921_ryanwan/design/FB1/xschem/basic-invert.sym
-* sch_path: /home/u5921_ryanwan/design/FB1/xschem/basic-invert.sch
-.subckt basic-invert  vdd gnd out in
-*.ipin in
-*.ipin gnd
-*.ipin vdd
-*.opin out
-XM1 out in gnd gnd sky130_fd_pr__nfet_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 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 
-.ends
-
-
-* expanding   symbol:  gate-switch.sym # of pins=6
-* sym_path: /home/u5921_ryanwan/design/FB1/xschem/gate-switch.sym
-* sch_path: /home/u5921_ryanwan/design/FB1/xschem/gate-switch.sch
-.subckt gate-switch  in out gnd vbias cntrl2 cntrl1
-*.ipin in
-*.ipin vbias
-*.ipin gnd
-*.opin out
-*.ipin cntrl1
-*.ipin cntrl2
-XM5 in cntrl2 out vbias 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 
-XM6 out cntrl1 in gnd sky130_fd_pr__nfet_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 
-.ends
-
-** flattened .save nodes
-.end
diff --git a/xschem/attenuator/dsa.sym b/xschem/attenuator/dsa.sym
index b7dee5d..565c1de 100644
--- a/xschem/attenuator/dsa.sym
+++ b/xschem/attenuator/dsa.sym
@@ -1,4 +1,4 @@
-v {xschem version=2.9.9 file_version=1.2 }
+v {xschem version=3.0.0 file_version=1.2 }
 G {}
 K {type=subcircuit
 format="@name @pinlist @symname"
@@ -6,102 +6,51 @@
 V {}
 S {}
 E {}
-L 4 200 -240 220 -240 {}
-L 4 220 -240 230 -250 {}
-L 4 250 -225 310 -225 {}
-L 4 250 -255 260 -255 {}
-L 4 300 -255 310 -255 {}
-L 4 260 -255 265 -265 {}
-L 4 265 -265 275 -245 {}
-L 4 275 -245 285 -265 {}
-L 4 285 -265 295 -245 {}
-L 4 295 -245 300 -255 {}
-L 4 310 -255 310 -225 {}
-L 4 310 -240 320 -240 {}
-L 4 320 -240 340 -240 {}
-L 4 340 -240 350 -250 {}
-L 4 370 -225 430 -225 {}
-L 4 370 -255 380 -255 {}
-L 4 420 -255 430 -255 {}
-L 4 380 -255 385 -265 {}
-L 4 385 -265 395 -245 {}
-L 4 395 -245 405 -265 {}
-L 4 405 -265 415 -245 {}
-L 4 415 -245 420 -255 {}
-L 4 430 -255 430 -225 {}
-L 4 430 -240 440 -240 {}
-L 4 440 -240 460 -240 {}
-L 4 460 -240 470 -250 {}
-L 4 490 -225 550 -225 {}
-L 4 490 -255 500 -255 {}
-L 4 540 -255 550 -255 {}
-L 4 500 -255 505 -265 {}
-L 4 505 -265 515 -245 {}
-L 4 515 -245 525 -265 {}
-L 4 525 -265 535 -245 {}
-L 4 535 -245 540 -255 {}
-L 4 550 -255 550 -225 {}
-L 4 550 -240 560 -240 {}
-L 4 560 -240 580 -240 {}
-L 4 580 -240 590 -250 {}
-L 4 610 -225 670 -225 {}
-L 4 610 -255 620 -255 {}
-L 4 660 -255 670 -255 {}
-L 4 620 -255 625 -265 {}
-L 4 625 -265 635 -245 {}
-L 4 635 -245 645 -265 {}
-L 4 645 -265 655 -245 {}
-L 4 655 -245 660 -255 {}
-L 4 670 -255 670 -225 {}
-L 4 670 -240 680 -240 {}
-L 4 160 -240 200 -240 {}
-L 4 180 -280 180 -240 {}
-L 4 180 -280 700 -280 {}
-L 4 700 -280 700 -200 {}
-L 4 180 -200 700 -200 {}
-L 4 180 -240 180 -200 {}
-L 4 680 -240 720 -240 {}
-L 4 140 -240 160 -240 {}
-L 4 720 -240 740 -240 {}
-L 4 200 -320 200 -240 {}
-L 4 320 -320 320 -240 {}
-L 4 440 -320 440 -240 {}
-L 4 560 -320 560 -240 {}
-L 4 440 -200 440 -160 {}
-L 4 500 -200 500 -160 {}
-L 4 380 -200 380 -160 {}
-B 4 195 -245 205 -235 {}
-B 4 240 -260 250 -250 {}
-B 4 240 -230 250 -220 {}
-B 4 315 -245 325 -235 {}
-B 4 360 -260 370 -250 {}
-B 4 360 -230 370 -220 {}
-B 4 435 -245 445 -235 {}
-B 4 480 -260 490 -250 {}
-B 4 480 -230 490 -220 {}
-B 4 555 -245 565 -235 {}
-B 4 600 -260 610 -250 {}
-B 4 600 -230 610 -220 {}
-B 5 137.5 -242.5 142.5 -237.5 {name=in
+L 4 180 -180 220 -180 {}
+L 4 220 -180 230 -190 {}
+L 4 230 -190 240 -170 {}
+L 4 240 -170 250 -190 {}
+L 4 250 -190 260 -170 {}
+L 4 260 -170 270 -190 {}
+L 4 270 -190 280 -170 {}
+L 4 280 -170 290 -190 {}
+L 4 290 -190 300 -170 {}
+L 4 300 -170 310 -180 {}
+L 4 310 -180 340 -180 {}
+L 4 240 -160 280 -210 {}
+L 4 280 -210 280 -200 {}
+L 4 270 -210 280 -210 {}
+L 4 200 -220 200 -180 {}
+L 4 200 -220 320 -220 {}
+L 4 320 -220 320 -140 {}
+L 4 200 -140 320 -140 {}
+L 4 200 -190 200 -140 {}
+L 4 210 -240 210 -220 {}
+L 4 310 -240 310 -220 {}
+L 4 240 -240 240 -220 {}
+L 4 280 -240 280 -220 {}
+L 4 240 -140 240 -120 {}
+L 4 280 -140 280 -120 {}
+L 4 237.5 -147.5 242.5 -147.5 {}
+L 4 240 -150 240 -145 {}
+L 4 277.5 -147.5 282.5 -147.5 {}
+B 5 207.5 -242.5 212.5 -237.5 {name=ctr1
 dir=in}
-B 5 197.5 -322.5 202.5 -317.5 {name=cntrl1
+B 5 237.5 -242.5 242.5 -237.5 {name=ctr2
 dir=in}
-B 5 317.5 -322.5 322.5 -317.5 {name=cntrl2
+B 5 277.5 -242.5 282.5 -237.5 {name=ctr3
 dir=in}
-B 5 437.5 -322.5 442.5 -317.5 {name=cntrl3
+B 5 307.5 -242.5 312.5 -237.5 {name=ctr4
 dir=in}
-B 5 557.5 -322.5 562.5 -317.5 {name=cntrl4
+B 5 177.5 -182.5 182.5 -177.5 {name=in
 dir=in}
-B 5 737.5 -242.5 742.5 -237.5 {name=out
+B 5 237.5 -122.5 242.5 -117.5 {name=vdd
+dir=in}
+B 5 277.5 -122.5 282.5 -117.5 {name=gnd
+dir=in}
+B 5 337.5 -182.5 342.5 -177.5 {name=out
 dir=out}
-B 5 497.5 -162.5 502.5 -157.5 {name=vbias
-dir=in}
-B 5 437.5 -162.5 442.5 -157.5 {name=vdd
-dir=in}
-B 5 377.5 -162.5 382.5 -157.5 {name=gnd
-dir=in}
-T {@name} 185 -215 0 0 0.2 0.2 {}
-T {GND} 385 -215 1 0 0.1 0.1 {}
-T {VDD} 445 -215 1 0 0.1 0.1 {}
-T {VBIAS
-} 510 -220 1 0 0.1 0.1 {}
+T {1} 215 -235 0 0 0.2 0.2 {}
+T {2} 245 -235 0 0 0.2 0.2 {}
+T {3} 285 -235 0 0 0.2 0.2 {}
+T {4} 315 -235 0 0 0.2 0.2 {}
diff --git a/xschem/attenuator/gate-switch.sch b/xschem/attenuator/gate-switch.sch
deleted file mode 100644
index dada8e3..0000000
--- a/xschem/attenuator/gate-switch.sch
+++ /dev/null
@@ -1,67 +0,0 @@
-v {xschem version=3.0.0 file_version=1.2 }
-G {}
-K {}
-V {}
-S {}
-E {}
-N 155 -270 225 -270 { lab=in}
-N 285 -155 365 -155 { lab=out}
-N 285 -270 365 -270 { lab=out}
-N 155 -155 225 -155 { lab=in}
-N 365 -270 365 -155 { lab=out}
-N 155 -270 155 -155 { lab=in}
-N 120 -210 155 -210 { lab=in}
-N 365 -210 400 -210 { lab=out}
-N 255 -270 255 -245 { lab=vbias}
-N 255 -180 255 -155 { lab=gnd}
-N 255 -180 300 -180 { lab=gnd}
-N 255 -115 255 -100 { lab=cntrl1}
-N 255 -325 255 -310 { lab=cntrl2}
-C {/Volumes/WORK_DRIVE/open_pdks/sky130/sky130A/libs.tech/xschem/sky130_fd_pr/pfet_01v8.sym} 255 -290 1 0 {name=M5
-L=0.15
-W=1
-nf=1
-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 {/Volumes/WORK_DRIVE/open_pdks/sky130/sky130A/libs.tech/xschem/sky130_fd_pr/nfet_01v8.sym} 255 -135 1 1 {name=M6
-L=0.15
-W=1
-nf=1 
-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 {ipin.sym} 120 -210 0 0 {name=pn lab=in}
-C {ipin.sym} 255 -245 3 0 {name=pbias lab=vbias}
-C {ipin.sym} 300 -180 2 0 {name=pnd lab=gnd}
-C {opin.sym} 400 -210 0 0 {name=put lab=out}
-C {ipin.sym} 255 -100 3 0 {name=pntrl1 lab=cntrl1}
-C {ipin.sym} 255 -325 1 0 {name=pntrl2 lab=cntrl2}
-C {code.sym} 480 -140 0 0 {name=sT_MODELS
-only_toplevel=true
-format="tcleval( @value )"
-value="** manual skywater pdks install (with patches applied)
-* .lib \\\\$::SKYWATER_MODELS\\\\/models/sky130.lib.spice tt\\
-*** remove the /models/
-
-** opencircuitdesign pdks install
-.lib /Volumes/WORK_DRIVE/open_pdks/sky130/custom/models/sky130.lib.spice tt
-
-.param mc_mm_switch=0
-.param mc_pr_switch=0
-"
-spice_ignore=false}
diff --git a/xschem/attenuator/gate-switch.spice b/xschem/attenuator/gate-switch.spice
deleted file mode 100644
index ed5e314..0000000
--- a/xschem/attenuator/gate-switch.spice
+++ /dev/null
@@ -1,16 +0,0 @@
-**.subckt gate-switch in vbias gnd out cntrl1 cntrl2
-*.ipin in
-*.ipin vbias
-*.ipin gnd
-*.opin out
-*.ipin cntrl1
-*.ipin cntrl2
-XM5 in cntrl2 out vbias 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 
-XM6 out cntrl1 in gnd sky130_fd_pr__nfet_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 
-**.ends
-** flattened .save nodes
-.end
diff --git a/xschem/attenuator/gate-switch.sym b/xschem/attenuator/gate-switch.sym
deleted file mode 100644
index 7a82075..0000000
--- a/xschem/attenuator/gate-switch.sym
+++ /dev/null
@@ -1,41 +0,0 @@
-v {xschem version=2.9.9 file_version=1.2 }
-G {}
-K {type=subcircuit
-format="@name @pinlist @symname"
-template="name=XTG1"}
-V {}
-S {}
-E {}
-L 4 180 -200 200 -200 {}
-L 4 200 -200 230 -215 {}
-L 4 240 -200 280 -200 {}
-L 4 280 -200 300 -200 {}
-L 4 160 -200 180 -200 {}
-L 4 180 -230 180 -200 {}
-L 4 180 -200 180 -170 {}
-L 4 280 -230 280 -200 {}
-L 4 180 -230 280 -230 {}
-L 4 180 -170 280 -170 {}
-L 4 280 -200 280 -170 {}
-L 4 230 -170 230 -150 {}
-L 4 230 -250 230 -230 {}
-L 4 190 -170 190 -160 {}
-L 4 160 -160 190 -160 {}
-L 4 200 -170 200 -150 {}
-L 4 160 -140 200 -140 {}
-L 4 200 -150 200 -140 {}
-B 5 157.5 -202.5 162.5 -197.5 {name=in
-dir=in}
-B 5 297.5 -202.5 302.5 -197.5 {name=out
-dir=out}
-B 5 157.5 -162.5 162.5 -157.5 {name=gnd
-dir=in}
-B 5 157.5 -142.5 162.5 -137.5 {name=vbias
-dir=in}
-B 5 227.5 -152.5 232.5 -147.5 {name=cntrl2
-dir=in}
-B 5 227.5 -252.5 232.5 -247.5 {name=cntrl1
-dir=in}
-T {@name} 185 -225 0 0 0.2 0.2 {}
-T {GND} 190 -185 1 0 0.1 0.1 {}
-T {VBIAS} 205 -190 1 0 0.1 0.1 {}
diff --git a/xschem/attenuator/invert b/xschem/attenuator/invert
deleted file mode 100644
index 41b771f..0000000
--- a/xschem/attenuator/invert
+++ /dev/null
@@ -1,65 +0,0 @@
-v {xschem version=2.9.9 file_version=1.2 }
-G {}
-K {}
-V {}
-S {}
-E {}
-N 440 -270 440 -230 { lab=#net1}
-N 440 -250 520 -250 { lab=#net1}
-N 380 -200 400 -200 { lab=#net2}
-N 380 -300 380 -200 { lab=#net2}
-N 380 -300 400 -300 { lab=#net2}
-N 330 -250 380 -250 { lab=#net2}
-N 440 -350 440 -330 { lab=#net3}
-N 440 -170 440 -150 { lab=GND}
-C {sky130_fd_pr/nfet3_01v8.sym} 420 -200 0 0 {name=M1
-L=0.15
-W=1
-body=GND
-nf=1
-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/pfet3_01v8.sym} 420 -300 0 0 {name=M2
-L=0.15
-W=1
-body=VDD
-nf=1
-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 {devices/gnd.sym} 440 -150 0 0 {name=l1 lab=GND}
-C {devices/vsource.sym} 440 -380 2 0 {name=V1 value=2}
-C {devices/gnd.sym} 440 -410 2 0 {name=l2 lab=GND}
-C {devices/vsource.sym} 300 -250 1 0 {name=V2 value=0}
-C {devices/gnd.sym} 270 -250 1 0 {name=l3 lab=GND}
-C {devices/code.sym} 10 -410 0 0 {name=TT_MODELS
-only_toplevel=true
-format="tcleval( @value )"
-value="** manual skywater pdks install (with patches applied)
-* .lib \\\\$::SKYWATER_MODELS\\\\/models/sky130.lib.spice tt
-
-** opencircuitdesign pdks install
-.lib \\\\$::SKYWATER_MODELS\\\\/sky130.lib.spice tt
-
-.param mc_mm_switch=0
-.param mc_pr_switch=0
-"
-spice_ignore=false}
-C {devices/code_shown.sym} 580 -410 0 0 {name="hi" only_toplevel=false value=".dc v2 0 3
-.plot v(v2) v(net1)
-"}
diff --git a/xschem/attenuator/invert.sch b/xschem/attenuator/invert.sch
deleted file mode 100644
index 16bbed0..0000000
--- a/xschem/attenuator/invert.sch
+++ /dev/null
@@ -1,75 +0,0 @@
-v {xschem version=2.9.9 file_version=1.2 }
-G {}
-K {}
-V {}
-S {}
-E {}
-N 440 -270 440 -230 { lab=out}
-N 440 -250 520 -250 { lab=out}
-N 380 -200 400 -200 { lab=in}
-N 380 -300 380 -200 { lab=in}
-N 380 -300 400 -300 { lab=in}
-N 330 -250 380 -250 { lab=in}
-N 440 -350 440 -330 { lab=vdd}
-N 440 -170 440 -150 { lab=GND}
-C {sky130_fd_pr/nfet3_01v8.sym} 420 -200 0 0 {name=M1
-L=0.15
-W=1
-body=GND
-nf=1
-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/pfet3_01v8.sym} 420 -300 0 0 {name=M2
-L=0.15
-W=1
-body=VDD
-nf=1
-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 {devices/gnd.sym} 440 -150 0 0 {name=l1 lab=GND}
-C {devices/code.sym} 10 -410 0 0 {name=TT_MODELS
-only_toplevel=true
-format="tcleval( @value )"
-value="** manual skywater pdks install (with patches applied)
-* .lib \\\\$::SKYWATER_MODELS\\\\/models/sky130.lib.spice tt
-
-** opencircuitdesign pdks install
-.lib \\\\$::SKYWATER_MODELS\\\\/sky130.lib.spice tt
-
-.param mc_mm_switch=0
-.param mc_pr_switch=0
-"
-spice_ignore=false}
-C {devices/code_shown.sym} 640 -420 0 0 {name=NGSPICE 
-only_toplevel=false 
-value=".option TEMP=27C
-.option dccap post brief accurate nomod
-
-.dc v2 0 3 0.01
-
-.control
-  run
-  plot (v(v2)) (v(net1))
-.endc
-
-.save all
-"}
-C {devices/ipin.sym} 330 -250 0 0 {name=in lab=in}
-C {devices/opin.sym} 520 -250 0 0 {name=out lab=out}
-C {devices/ipin.sym} 440 -350 1 0 {name=vdd lab=vdd}
diff --git a/xschem/attenuator/invert.spice b/xschem/attenuator/invert.spice
deleted file mode 100644
index ceb1511..0000000
--- a/xschem/attenuator/invert.spice
+++ /dev/null
@@ -1,39 +0,0 @@
-**.subckt invert in out vdd
-*.ipin in
-*.opin out
-*.ipin vdd
-XM1 out in GND GND sky130_fd_pr__nfet_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 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 
-**** begin user architecture code
- ** manual skywater pdks install (with patches applied)
-* .lib /ef/tech/SW.2/sky130A/libs.tech/ngspice/models/sky130.lib.spice tt
-
-** opencircuitdesign pdks install
-.lib /ef/tech/SW.2/sky130A/libs.tech/ngspice/sky130.lib.spice tt
-
-.param mc_mm_switch=0
-.param mc_pr_switch=0
-
-
-.option TEMP=27C
-.option dccap post brief accurate nomod
-
-.dc v2 0 3 0.01
-
-.control
-  run
-  plot (v(v2)) (v(net1))
-.endc
-
-.save all
-
-
-**** end user architecture code
-**.ends
-.GLOBAL GND
-** flattened .save nodes
-.end
diff --git a/xschem/attenuator/invert.sym b/xschem/attenuator/invert.sym
deleted file mode 100644
index 5a8248c..0000000
--- a/xschem/attenuator/invert.sym
+++ /dev/null
@@ -1,25 +0,0 @@
-v {xschem version=2.9.9 file_version=1.2 }
-G {}
-K {}
-V {}
-S {type=inverter
-tedax_format="footprint @name @footprint
-device @name @device"
-template="name=inv device=inverter"
-
-}
-E {}
-L 4 240 -340 240 -280 {}
-L 4 240 -280 310 -310 {}
-L 4 240 -340 310 -310 {}
-L 4 330 -310 360 -310 {}
-L 4 200 -310 240 -310 {}
-L 4 270 -290 270 -260 {}
-B 5 197.5 -312.5 202.5 -307.5 {name=in dir=in}
-B 5 357.5 -312.5 362.5 -307.5 {name=out dir=out}
-B 5 267.5 -262.5 272.5 -257.5 {name=vdd dir=in}
-A 4 320 -310 10 360 360 {}
-T {@name} 240 -370 0 0 0.4 0.4 {}
-T {in} 190 -300 0 0 0.4 0.4 {}
-T {out} 340 -300 0 0 0.4 0.4 {}
-T {vdd} 280 -280 0 0 0.4 0.4 {}
diff --git a/xschem/attenuator/inverter.sch b/xschem/attenuator/inverter.sch
new file mode 100644
index 0000000..bdc191b
--- /dev/null
+++ b/xschem/attenuator/inverter.sch
@@ -0,0 +1,66 @@
+v {xschem version=3.0.0 file_version=1.2 }
+G {}
+K {}
+V {}
+S {}
+E {}
+N 270 -180 270 -140 {
+lab=out}
+N 270 -160 340 -160 {
+lab=out}
+N 200 -210 230 -210 {
+lab=in}
+N 200 -210 200 -110 {
+lab=in}
+N 200 -110 230 -110 {
+lab=in}
+N 160 -160 200 -160 {
+lab=in}
+N 270 -210 290 -210 {
+lab=vdd}
+N 290 -240 290 -210 {
+lab=vdd}
+N 270 -240 290 -240 {
+lab=vdd}
+N 270 -280 270 -240 {
+lab=vdd}
+N 270 -110 290 -110 {
+lab=gnd}
+N 290 -110 290 -80 {
+lab=gnd}
+N 270 -80 290 -80 {
+lab=gnd}
+N 270 -80 270 -40 {
+lab=gnd}
+C {/Volumes/WORK_DRIVE/open_pdks/sky130/sky130A/libs.tech/xschem/sky130_fd_pr/nfet_01v8.sym} 250 -110 0 0 {name=M1
+L=0.15
+W=4
+nf=1 
+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 {/Volumes/WORK_DRIVE/open_pdks/sky130/sky130A/libs.tech/xschem/sky130_fd_pr/pfet_01v8.sym} 250 -210 0 0 {name=M2
+L=0.15
+W=4
+nf=1
+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 {ipin.sym} 160 -160 0 0 {name=in lab=in}
+C {ipin.sym} 270 -40 3 0 {name=gnd lab=gnd}
+C {ipin.sym} 270 -280 1 0 {name=vdd lab=vdd}
+C {opin.sym} 340 -160 0 0 {name=out lab=out}
diff --git a/xschem/attenuator/inverter.sym b/xschem/attenuator/inverter.sym
new file mode 100644
index 0000000..ae1c282
--- /dev/null
+++ b/xschem/attenuator/inverter.sym
@@ -0,0 +1,26 @@
+v {xschem version=3.0.0 file_version=1.2 }
+G {}
+K {type=subcircuit
+format="@name @pinlist @symname"
+template="name=XINV1"}
+V {}
+S {}
+E {}
+L 4 180 -180 180 -120 {}
+L 4 180 -180 240 -150 {}
+L 4 180 -120 240 -150 {}
+L 4 160 -150 180 -150 {}
+L 4 240 -150 260 -150 {}
+L 4 220 -180 220 -160 {}
+L 4 220 -140 220 -120 {}
+L 4 210 -160 210 -155 {}
+L 4 207.5 -157.5 212.5 -157.5 {}
+L 4 207.5 -140 212.5 -140 {}
+B 5 217.5 -182.5 222.5 -177.5 {name=vdd
+dir=in}
+B 5 157.5 -152.5 162.5 -147.5 {name=in
+dir=in}
+B 5 217.5 -122.5 222.5 -117.5 {name=gnd
+dir=in}
+B 5 257.5 -152.5 262.5 -147.5 {name=out
+dir=out}
diff --git a/xschem/attenuator/passgate.spice b/xschem/attenuator/passgate.spice
deleted file mode 100644
index b00c28c..0000000
--- a/xschem/attenuator/passgate.spice
+++ /dev/null
@@ -1,19 +0,0 @@
-**.subckt passgate A Z GP GN
-*.iopin A
-*.iopin Z
-*.ipin GP
-*.ipin GN
-XM1 Z GN A VSSBPIN sky130_fd_pr__nfet_01v8 L=L_N W=W_N 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 Z GP A VCCBPIN sky130_fd_pr__pfet_01v8 L=L_P W=W_P 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 
-**** begin user architecture code
-
-.lib /ef/tech/SW.2/sky130A/libs.tech/ngspice/sky130.lib.spice tt
-
-**** end user architecture code
-**.ends
-** flattened .save nodes
-.end
diff --git a/xschem/attenuator/spdt.sch b/xschem/attenuator/spdt.sch
new file mode 100644
index 0000000..e962544
--- /dev/null
+++ b/xschem/attenuator/spdt.sch
@@ -0,0 +1,76 @@
+v {xschem version=3.0.0 file_version=1.2 }
+G {}
+K {}
+V {}
+S {}
+E {}
+N 420 -260 420 -140 {
+lab=#net1}
+N 290 -200 420 -200 {
+lab=#net1}
+N 490 -80 580 -80 {
+lab=out2}
+N 490 -300 580 -300 {
+lab=out1}
+N 160 -200 190 -200 {
+lab=ctr}
+N 80 -80 350 -80 {
+lab=in}
+N 80 -300 350 -300 {
+lab=in}
+N 80 -300 80 -80 {
+lab=in}
+N 40 -200 80 -200 {
+lab=in}
+N 140 -200 160 -200 {
+lab=ctr}
+N 160 -380 160 -200 {
+lab=ctr}
+N 160 -380 420 -380 {
+lab=ctr}
+N 420 -380 420 -360 {
+lab=ctr}
+N 420 -40 420 -20 {
+lab=ctr}
+N 160 -20 420 -20 {
+lab=ctr}
+N 160 -200 160 -20 {
+lab=ctr}
+N 320 -360 390 -360 {
+lab=vdd}
+N 320 -360 320 -240 {
+lab=vdd}
+N 320 -140 390 -140 {
+lab=vdd}
+N 320 -240 320 -140 {
+lab=vdd}
+N 250 -240 320 -240 {
+lab=vdd}
+N 250 -240 250 -230 {
+lab=vdd}
+N 390 -260 400 -260 {
+lab=gnd}
+N 400 -260 400 -40 {
+lab=gnd}
+N 390 -40 400 -40 {
+lab=gnd}
+N 250 -100 400 -100 {
+lab=gnd}
+N 250 -170 250 -100 {
+lab=gnd}
+N 250 -260 250 -240 {
+lab=vdd}
+N 220 -260 250 -260 {
+lab=vdd}
+N 220 -140 250 -140 {
+lab=gnd}
+C {/Volumes/WORK_DRIVE/caravel_automatic_gain_control/xschem/attenuator/inverter.sym} 30 -50 0 0 {name=XINV1}
+C {/Volumes/WORK_DRIVE/caravel_automatic_gain_control/xschem/attenuator/transgate.sym} 130 -100 0 0 {name=XTG1}
+C {/Volumes/WORK_DRIVE/caravel_automatic_gain_control/xschem/attenuator/transgate.sym} 130 120 0 0 {name=XTG2}
+C {ipin.sym} 40 -200 0 0 {name=in lab=in}
+C {ipin.sym} 140 -200 0 0 {name=ctr lab=ctr}
+C {ipin.sym} 220 -140 0 0 {name=gnd lab=gnd}
+C {ipin.sym} 220 -260 0 0 {name=vdd lab=vdd}
+C {opin.sym} 580 -300 0 0 {name=out1 lab=out1}
+C {opin.sym} 580 -80 0 0 {name=out2 lab=out2}
+C {/Volumes/WORK_DRIVE/caravel_automatic_gain_control/xschem/attenuator/inverter.sym} 30 -50 0 0 {XINV1}
diff --git a/xschem/attenuator/spdt.sym b/xschem/attenuator/spdt.sym
new file mode 100644
index 0000000..6147373
--- /dev/null
+++ b/xschem/attenuator/spdt.sym
@@ -0,0 +1,41 @@
+v {xschem version=3.0.0 file_version=1.2 }
+G {}
+K {type=subcircuit
+format="@name @pinlist @symname"
+template="name=XSPDT1"}
+V {}
+S {}
+E {}
+L 4 280 -260 320 -280 {}
+L 4 340 -280 380 -280 {}
+L 4 340 -240 380 -240 {}
+L 4 240 -260 280 -260 {}
+L 4 260 -300 260 -260 {}
+L 4 260 -260 260 -220 {}
+L 4 260 -300 360 -300 {}
+L 4 360 -300 360 -220 {}
+L 4 260 -220 360 -220 {}
+L 4 310 -330 310 -300 {}
+L 4 280 -220 280 -200 {}
+L 4 340 -220 340 -200 {}
+L 4 337.5 -225 342.5 -225 {}
+L 4 277.5 -225 282.5 -225 {}
+L 4 280 -227.5 280 -222.5 {}
+L 4 307.5 -297.5 310 -297.5 {}
+L 4 307.5 -297.5 307.5 -295 {}
+L 4 307.5 -295 310 -295 {}
+B 4 337.5 -282.5 342.5 -277.5 {}
+B 4 337.5 -242.5 342.5 -237.5 {}
+B 4 317.5 -282.5 322.5 -277.5 {}
+B 5 237.5 -262.5 242.5 -257.5 {name=in
+dir=in}
+B 5 307.5 -332.5 312.5 -327.5 {name=ctr
+dir=in}
+B 5 377.5 -282.5 382.5 -277.5 {name=out1
+dir=out}
+B 5 377.5 -242.5 382.5 -237.5 {name=out2
+dir=out}
+B 5 337.5 -202.5 342.5 -197.5 {name=gnd
+dir=in}
+B 5 277.5 -202.5 282.5 -197.5 {name=vdd
+dir=in}
diff --git a/xschem/attenuator/trans-gate-testbench.sch b/xschem/attenuator/trans-gate-testbench.sch
deleted file mode 100644
index dfd05db..0000000
--- a/xschem/attenuator/trans-gate-testbench.sch
+++ /dev/null
@@ -1,39 +0,0 @@
-v {xschem version=2.9.9 file_version=1.2 }
-G {}
-K {}
-V {}
-S {}
-E {}
-N 190 -170 230 -170 { lab=#net1}
-N 290 -260 290 -230 { lab=#net2}
-N 350 -170 420 -170 { lab=output}
-N 290 -110 290 -80 { lab=#net3}
-C {devices/vsource.sym} 160 -170 1 0 {name=V1 value="SIN(0 0.5 40)"}
-C {devices/vsource.sym} 290 -290 2 0 {name=V2 value=1.8}
-C {devices/vsource.sym} 290 -50 0 0 {name=V3 value=0}
-C {devices/gnd.sym} 290 -20 0 0 {name=l1 lab=GND}
-C {devices/gnd.sym} 130 -170 1 0 {name=l2 lab=GND}
-C {devices/gnd.sym} 290 -320 2 0 {name=l3 lab=GND}
-C {devices/code.sym} -40 -140 0 0 {name=TT_MODELS
-only_toplevel=true
-format="tcleval( @value )"
-value="** manual skywater pdks install (with patches applied)
-* .lib \\\\$::SKYWATER_MODELS\\\\/models/sky130.lib.spice tt
-
-** opencircuitdesign pdks install
-.lib \\\\$::SKYWATER_MODELS\\\\/sky130.lib.spice tt
-
-.param mc_mm_switch=0
-.param mc_pr_switch=0
-"
-spice_ignore=false}
-C {devices/code.sym} -40 -290 0 0 {name="pepper, chilli, cinnamon" only_toplevel=false value="
-.tran 0.001s 0.1s
-.control
-  run
-  plot v(output) v(net1)
-.endc
-.save all
-"}
-C {devices/lab_wire.sym} 420 -170 0 1 {name=l4 sig_type=std_logic lab=output}
-C {trans-gate.sym} 200 -60 0 0 {}
diff --git a/xschem/attenuator/trans-gate-testbench.spice b/xschem/attenuator/trans-gate-testbench.spice
deleted file mode 100644
index 71200ce..0000000
--- a/xschem/attenuator/trans-gate-testbench.spice
+++ /dev/null
@@ -1,29 +0,0 @@
-**.subckt trans-gate-testbench
-V1 net1 GND SIN(0 0.5 40)
-V2 net2 GND 1.8
-V3 net3 GND 0
-**** begin user architecture code
- ** manual skywater pdks install (with patches applied)
-* .lib /ef/tech/SW.2/sky130A/libs.tech/ngspice/models/sky130.lib.spice tt
-
-** opencircuitdesign pdks install
-.lib /ef/tech/SW.2/sky130A/libs.tech/ngspice/sky130.lib.spice tt
-
-.param mc_mm_switch=0
-.param mc_pr_switch=0
-
-
-
-.tran 0.001s 0.1s
-.control
-  run
-  plot v(output) v(net1)
-.endc
-.save all
-
-
-**** end user architecture code
-**.ends
-.GLOBAL GND
-** flattened .save nodes
-.end
diff --git a/xschem/attenuator/trans-gate.sch b/xschem/attenuator/trans-gate.sch
deleted file mode 100644
index b95887c..0000000
--- a/xschem/attenuator/trans-gate.sch
+++ /dev/null
@@ -1,74 +0,0 @@
-v {xschem version=2.9.9 file_version=1.2 }
-G {}
-K {}
-V {}
-S {}
-E {}
-N 240 -120 240 -70 { lab=vdd}
-N 240 -120 280 -120 { lab=vdd}
-N 240 -210 240 -160 { lab=GND}
-N 200 -160 240 -160 { lab=GND}
-N 140 -210 210 -210 { lab=input}
-N 140 -210 140 -70 { lab=input}
-N 140 -70 210 -70 { lab=input}
-N 270 -70 330 -70 { lab=output}
-N 330 -210 330 -70 { lab=output}
-N 270 -210 330 -210 { lab=output}
-N 240 -30 240 -10 { lab=#net1}
-N 140 -10 240 -10 { lab=#net1}
-N 240 -270 240 -250 { lab=cntrl}
-N 140 -270 240 -270 { lab=cntrl}
-N -40 -10 -20 -10 { lab=cntrl}
-N -40 -270 -40 -10 { lab=cntrl}
-N -40 -270 140 -270 { lab=cntrl}
-N -60 -140 -40 -140 { lab=cntrl}
-N 90 -140 140 -140 { lab=input}
-N 330 -140 380 -140 { lab=output}
-C {sky130_fd_pr/pfet_01v8.sym} 240 -50 3 0 {name=M1
-L=0.15
-W=1
-nf=1
-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} 240 -230 1 0 {name=M2
-L=0.15
-W=1
-nf=1 
-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 {invert.sym} -220 300 0 0 {}
-C {devices/gnd.sym} 200 -160 1 0 {name=l1 lab=GND}
-C {devices/ipin.sym} 280 -120 2 0 {name=vdd lab=vdd}
-C {devices/ipin.sym} 50 40 3 0 {name=vdd1 lab=vdd}
-C {devices/ipin.sym} 90 -140 0 0 {name=input lab=input}
-C {devices/ipin.sym} -60 -140 0 0 {name=cntrl lab=cntrl}
-C {devices/opin.sym} 380 -140 0 0 {name=output lab=output}
-C {devices/code.sym} 460 -330 0 0 {name=TT_MODELS
-only_toplevel=true
-format="tcleval( @value )"
-value="** manual skywater pdks install (with patches applied)
-* .lib \\\\$::SKYWATER_MODELS\\\\/models/sky130.lib.spice tt
-
-** opencircuitdesign pdks install
-.lib \\\\$::SKYWATER_MODELS\\\\/sky130.lib.spice tt
-
-.param mc_mm_switch=0
-.param mc_pr_switch=0
-"
-spice_ignore=false}
diff --git a/xschem/attenuator/trans-gate.sym b/xschem/attenuator/trans-gate.sym
deleted file mode 100644
index 67aeef4..0000000
--- a/xschem/attenuator/trans-gate.sym
+++ /dev/null
@@ -1,28 +0,0 @@
-v {xschem version=2.9.9 file_version=1.2 }
-G {}
-K {}
-V {}
-S {}
-E {}
-L 4 60 -140 60 -80 {}
-L 4 60 -140 120 -140 {}
-L 4 120 -140 120 -80 {}
-L 4 60 -80 120 -80 {}
-L 4 120 -110 150 -110 {}
-L 4 30 -110 60 -110 {}
-L 4 90 -80 90 -50 {}
-L 4 90 -170 90 -140 {}
-L 4 60 -110 70 -110 {}
-L 4 110 -110 120 -110 {}
-L 4 75 -110 100 -120 {}
-B 5 27.5 -112.5 32.5 -107.5 {name=input dir=in}
-B 5 87.5 -52.5 92.5 -47.5 {name=cntrl dir=in}
-B 5 147.5 -112.5 152.5 -107.5 {name=output dir=out}
-B 5 87.5 -172.5 92.5 -167.5 {name=vdd dir=in}
-A 4 72.5 -110 3.535533905932738 135 360 {}
-A 4 107.5 -110 3.535533905932738 135 360 {}
-T {trans. gate} 120 -160 0 0 0.4 0.4 {}
-T {input} 0 -100 0 0 0.4 0.4 {}
-T {output} 130 -100 0 0 0.4 0.4 {}
-T {vdd} 40 -170 0 0 0.4 0.4 {}
-T {cntrl} 100 -70 0 0 0.4 0.4 {}
diff --git a/xschem/attenuator/transgate-full.sch b/xschem/attenuator/transgate-full.sch
deleted file mode 100644
index 4afa181..0000000
--- a/xschem/attenuator/transgate-full.sch
+++ /dev/null
@@ -1,70 +0,0 @@
-v {xschem version=3.0.0 file_version=1.2 }
-G {}
-K {}
-V {}
-S {}
-E {}
-N 890 -140 890 -120 { lab=cntrl}
-N 890 -380 890 -360 { lab=#net1}
-N 610 -120 630 -120 { lab=cntrl}
-N 610 -380 610 -120 { lab=cntrl}
-N 740 -250 790 -250 { lab=in}
-N 820 -120 890 -120 { lab=cntrl}
-N 720 -250 740 -250 { lab=in}
-N 630 -120 820 -120 { lab=cntrl}
-N 590 -380 610 -380 { lab=cntrl}
-N 890 -400 890 -380 { lab=#net1}
-N 890 -640 890 -620 { lab=cntrl}
-N 610 -640 890 -640 { lab=cntrl}
-N 610 -640 610 -380 { lab=cntrl}
-N 460 -250 720 -250 { lab=in}
-N 460 -510 790 -510 { lab=in}
-N 460 -510 460 -250 { lab=in}
-N 400 -380 460 -380 { lab=in}
-N 610 -380 650 -380 { lab=cntrl}
-N 780 -380 890 -380 { lab=#net1}
-N 790 -510 820 -510 { lab=in}
-N 890 -460 890 -400 { lab=#net1}
-N 890 -620 890 -570 { lab=cntrl}
-N 890 -570 890 -560 { lab=cntrl}
-N 960 -510 1020 -510 { lab=out1}
-N 790 -250 820 -250 { lab=in}
-N 890 -310 890 -300 { lab=#net1}
-N 890 -360 890 -310 { lab=#net1}
-N 890 -200 890 -140 { lab=cntrl}
-N 960 -250 1020 -250 { lab=out2}
-N 710 -440 710 -420 { lab=vdd}
-N 810 -470 820 -470 { lab=gnd}
-N 810 -470 810 -210 { lab=gnd}
-N 810 -210 820 -210 { lab=gnd}
-N 710 -340 710 -320 { lab=gnd}
-N 710 -320 810 -320 { lab=gnd}
-N 820 -450 860 -450 { lab=vbias}
-N 860 -450 860 -190 { lab=vbias}
-N 820 -190 860 -190 { lab=vbias}
-N 740 -320 740 -300 { lab=gnd}
-N 850 -190 850 -170 { lab=vbias}
-C {basic-invert.sym} 550 -220 0 0 {name=XI1}
-C {gate-switch.sym} 660 -310 0 0 {name=XTG1}
-C {gate-switch.sym} 660 -50 0 0 {name=XTG2}
-C {ipin.sym} 590 -380 0 0 {name=pntrl lab=cntrl}
-C {ipin.sym} 710 -440 1 0 {name=pdd lab=vdd}
-C {ipin.sym} 400 -380 0 0 {name=pn lab=in}
-C {ipin.sym} 740 -300 3 0 {name=pnd lab=gnd}
-C {ipin.sym} 850 -170 3 0 {name=pbias lab=vbias}
-C {opin.sym} 1020 -250 0 0 {name=put2 lab=out2}
-C {opin.sym} 1020 -510 0 0 {name=put1 lab=out1}
-C {code.sym} 230 -340 0 0 {name=sT_MODELS
-only_toplevel=true
-format="tcleval( @value )"
-value="** manual skywater pdks install (with patches applied)
-* .lib \\\\$::SKYWATER_MODELS\\\\/models/sky130.lib.spice tt\\
-*** remove the /models/
-
-** opencircuitdesign pdks install
-.lib /Volumes/WORK_DRIVE/open_pdks/sky130/custom/models/sky130.lib.spice tt
-
-.param mc_mm_switch=0
-.param mc_pr_switch=0
-"
-spice_ignore=false}
diff --git a/xschem/attenuator/transgate-full.spice b/xschem/attenuator/transgate-full.spice
deleted file mode 100644
index ab0b8ba..0000000
--- a/xschem/attenuator/transgate-full.spice
+++ /dev/null
@@ -1,70 +0,0 @@
-**.subckt transgate-full cntrl vdd in gnd vbias out2 out1
-*.ipin cntrl
-*.ipin vdd
-*.ipin in
-*.ipin gnd
-*.ipin vbias
-*.opin out2
-*.opin out1
-XI1 vdd gnd net1 cntrl basic-invert
-XTG1 in out1 gnd vbias net1 cntrl gate-switch
-XTG2 in out2 gnd vbias cntrl net1 gate-switch
-**** begin user architecture code
- ** manual skywater pdks install (with patches applied)
-* .lib /ef/tech/SW.2/sky130A/libs.tech/ngspice/models/sky130.lib.spice tt
-
-** opencircuitdesign pdks install
-.lib /ef/tech/SW.2/sky130A/libs.tech/ngspice/sky130.lib.spice tt
-
-.param mc_mm_switch=0
-.param mc_pr_switch=0
-
-
-
-.tran 0.001s 0.1s
-.control
-  plot v(output)
-.endc
-.save all
-
-
-**** end user architecture code
-**.ends
-
-* expanding   symbol:  basic-invert.sym # of pins=4
-* sym_path: /home/u5921_ryanwan/design/FB1/xschem/basic-invert.sym
-* sch_path: /home/u5921_ryanwan/design/FB1/xschem/basic-invert.sch
-.subckt basic-invert  vdd gnd out in
-*.ipin in
-*.ipin gnd
-*.ipin vdd
-*.opin out
-XM1 out in gnd gnd sky130_fd_pr__nfet_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 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 
-.ends
-
-
-* expanding   symbol:  gate-switch.sym # of pins=6
-* sym_path: /home/u5921_ryanwan/design/FB1/xschem/gate-switch.sym
-* sch_path: /home/u5921_ryanwan/design/FB1/xschem/gate-switch.sch
-.subckt gate-switch  in out gnd vbias cntrl2 cntrl1
-*.ipin in
-*.ipin vbias
-*.ipin gnd
-*.opin out
-*.ipin cntrl1
-*.ipin cntrl2
-XM5 in cntrl2 out vbias 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 
-XM6 out cntrl1 in gnd sky130_fd_pr__nfet_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 
-.ends
-
-** flattened .save nodes
-.end
diff --git a/xschem/attenuator/transgate-full.sym b/xschem/attenuator/transgate-full.sym
deleted file mode 100644
index a1d3650..0000000
--- a/xschem/attenuator/transgate-full.sym
+++ /dev/null
@@ -1,46 +0,0 @@
-v {xschem version=2.9.9 file_version=1.2 }
-G {}
-K {type=subcircuit
-format="@name @pinlist @symname"
-template="name=XDTG1"}
-V {}
-S {}
-E {}
-L 4 220 -220 260 -220 {}
-L 4 300 -240 340 -240 {}
-L 4 300 -200 340 -200 {}
-L 4 220 -260 330 -260 {}
-L 4 340 -260 340 -180 {}
-L 4 220 -180 330 -180 {}
-L 4 220 -260 220 -180 {}
-L 4 200 -220 220 -220 {}
-L 4 340 -240 360 -240 {}
-L 4 340 -200 360 -200 {}
-L 4 330 -260 340 -260 {}
-L 4 330 -180 340 -180 {}
-L 4 260 -220 290 -200 {}
-L 4 280 -280 280 -260 {}
-L 4 240 -180 240 -160 {}
-L 4 280 -180 280 -160 {}
-L 4 320 -180 320 -160 {}
-B 4 297.5 -242.5 302.5 -237.5 {}
-B 4 297.5 -202.5 302.5 -197.5 {}
-B 5 197.5 -222.5 202.5 -217.5 {name=in
-dir=in}
-B 5 277.5 -282.5 282.5 -277.5 {name=cntrl
-dir=in}
-B 5 237.5 -162.5 242.5 -157.5 {name=vdd
-dir=in}
-B 5 277.5 -162.5 282.5 -157.5 {name=vbias
-dir=in}
-B 5 317.5 -162.5 322.5 -157.5 {name=gnd
-dir=in}
-B 5 357.5 -202.5 362.5 -197.5 {name=out2
-dir=out}
-B 5 357.5 -242.5 362.5 -237.5 {name=out1
-dir=out}
-T {@name} 225 -255 0 0 0.2 0.2 {}
-T {GND} 322.5 -195 1 0 0.1 0.1 {}
-T {VDD} 242.5 -195 1 0 0.1 0.1 {}
-T {VBIAS} 282.5 -197.5 1 0 0.1 0.1 {}
-T {CTRL} 287.5 -252.5 2 0 0.1 0.1 {}
diff --git a/xschem/attenuator/transgate.sch b/xschem/attenuator/transgate.sch
new file mode 100644
index 0000000..78279c8
--- /dev/null
+++ b/xschem/attenuator/transgate.sch
@@ -0,0 +1,68 @@
+v {xschem version=3.0.0 file_version=1.2 }
+G {}
+K {}
+V {}
+S {}
+E {}
+N 200 -150 260 -150 {
+lab=in}
+N 200 -280 200 -150 {
+lab=in}
+N 200 -280 260 -280 {
+lab=in}
+N 320 -150 380 -150 {
+lab=out}
+N 380 -280 380 -150 {
+lab=out}
+N 320 -280 380 -280 {
+lab=out}
+N 290 -280 290 -240 {
+lab=vdd}
+N 260 -240 290 -240 {
+lab=vdd}
+N 290 -200 290 -150 {
+lab=gnd}
+N 290 -200 320 -200 {
+lab=gnd}
+N 290 -360 290 -320 {
+lab=ctr2}
+N 290 -110 290 -60 {
+lab=ctr1}
+N 140 -210 200 -210 {
+lab=in}
+N 380 -210 440 -210 {
+lab=out}
+C {/Volumes/WORK_DRIVE/open_pdks/sky130/sky130A/libs.tech/xschem/sky130_fd_pr/nfet_01v8.sym} 290 -130 3 0 {name=M1
+L=0.15
+W=4
+nf=1 
+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 {/Volumes/WORK_DRIVE/open_pdks/sky130/sky130A/libs.tech/xschem/sky130_fd_pr/pfet_01v8.sym} 290 -300 1 0 {name=M2
+L=0.15
+W=4
+nf=1
+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 {ipin.sym} 140 -210 0 0 {name=in lab=in}
+C {ipin.sym} 290 -360 1 0 {name=ctr2 lab=ctr2}
+C {ipin.sym} 290 -60 3 0 {name=ctr1 lab=ctr1}
+C {ipin.sym} 260 -240 0 0 {name=vdd lab=vdd}
+C {ipin.sym} 320 -200 2 0 {name=gnd lab=gnd}
+C {opin.sym} 440 -210 0 0 {name=out lab=out}
diff --git a/xschem/attenuator/transgate.sym b/xschem/attenuator/transgate.sym
new file mode 100644
index 0000000..337958b
--- /dev/null
+++ b/xschem/attenuator/transgate.sym
@@ -0,0 +1,46 @@
+v {xschem version=3.0.0 file_version=1.2 }
+G {}
+K {type=subcircuit
+format="@name @pinlist @symname"
+template="name=XTG1"}
+V {}
+S {}
+E {}
+L 4 260 -200 300 -220 {}
+L 4 310 -200 360 -200 {}
+L 4 340 -240 340 -200 {}
+L 4 240 -240 340 -240 {}
+L 4 240 -240 240 -180 {}
+L 4 240 -180 340 -180 {}
+L 4 340 -200 340 -180 {}
+L 4 220 -200 260 -200 {}
+L 4 290 -260 290 -240 {}
+L 4 290 -180 290 -160 {}
+L 4 260 -180 260 -160 {}
+L 4 260 -260 260 -240 {}
+L 4 260 -235 260 -230 {}
+L 4 257.5 -232.5 262.5 -232.5 {}
+L 4 257.5 -185 262.5 -185 {}
+L 4 290 -187.5 290 -185 {}
+L 4 290 -190 290 -187.5 {}
+L 4 287.5 -187.5 290 -190 {}
+L 4 287.5 -185 292.5 -185 {}
+L 4 287.5 -235 290 -237.5 {}
+L 4 290 -237.5 292.5 -235 {}
+L 4 287.5 -230 292.5 -235 {}
+L 4 287.5 -230 292.5 -230 {}
+L 4 245 -205 257.5 -205 {}
+L 4 255 -207.5 257.5 -205 {}
+L 4 255 -202.5 257.5 -205 {}
+B 5 257.5 -262.5 262.5 -257.5 {name=vdd
+dir=in}
+B 5 287.5 -262.5 292.5 -257.5 {name=ctr2
+dir=in}
+B 5 217.5 -202.5 222.5 -197.5 {name=in
+dir=in}
+B 5 257.5 -162.5 262.5 -157.5 {name=gnd
+dir=in}
+B 5 287.5 -162.5 292.5 -157.5 {name=ctr1
+dir=in}
+B 5 357.5 -202.5 362.5 -197.5 {name=out
+dir=out}
diff --git a/xschem/compiled.sch b/xschem/compiled.sch
deleted file mode 100644
index 1eb3bc5..0000000
--- a/xschem/compiled.sch
+++ /dev/null
@@ -1,216 +0,0 @@
-v {xschem version=3.0.0 file_version=1.2 }
-G {}
-K {}
-V {}
-S {}
-E {}
-N 1490 -560 1490 -540 {
-lab=GND}
-N 1490 -760 1490 -740 {lab=#net1}
-N 1530 -560 1530 -540 {
-lab=#net2}
-N 1530 -540 1550 -540 {
-lab=#net2}
-N 1610 -540 1630 -540 {
-lab=GND}
-N 1530 -760 1530 -740 {
-lab=#net3}
-N 1530 -760 1550 -760 {
-lab=#net3}
-N 1610 -760 1630 -760 {
-lab=GND}
-N 1620 -650 1640 -650 {
-lab=#net4}
-N 460 -650 480 -650 {
-lab=#net5}
-N 480 -670 480 -650 {
-lab=#net5}
-N 480 -650 480 -630 {
-lab=#net5}
-N 480 -740 480 -730 {
-lab=#net6}
-N 480 -570 480 -560 {
-lab=#net7}
-N 480 -560 480 -540 {
-lab=#net7}
-N 480 -760 480 -740 {
-lab=#net6}
-N 1620 -670 1640 -670 {
-lab=#net8}
-N 1620 -630 1640 -630 {
-lab=#net9}
-N 1640 -700 1640 -670 {
-lab=#net8}
-N 1640 -700 1790 -700 {
-lab=#net8}
-N 1640 -630 1640 -600 {
-lab=#net9}
-N 1640 -600 1790 -600 {
-lab=#net9}
-N 1160 -740 1190 -740 {
-lab=#net10}
-N 860 -660 860 -640 {
-lab=#net11}
-N 980 -660 980 -640 {
-lab=#net12}
-N 740 -660 740 -640 {
-lab=#net13}
-N 620 -660 620 -640 {
-lab=#net14}
-N 1840 -660 1860 -660 {
-lab=#net8}
-N 1840 -640 1860 -640 {
-lab=#net9}
-N 1840 -640 1840 -600 {
-lab=#net9}
-N 1790 -600 1840 -600 {
-lab=#net9}
-N 1840 -700 1840 -660 {
-lab=#net8}
-N 1790 -700 1840 -700 {
-lab=#net8}
-N 1780 -760 1780 -700 {
-lab=#net8}
-N 1780 -600 1780 -520 {
-lab=#net9}
-N 2050 -650 2080 -650 {
-lab=#net15}
-N 2080 -650 2080 -630 {
-lab=#net15}
-N 2080 -650 2120 -650 {
-lab=#net15}
-N 2140 -650 2140 -630 {
-lab=#net15}
-N 2120 -650 2140 -650 {
-lab=#net15}
-N 2080 -570 2080 -550 {
-lab=GND}
-N 2140 -570 2140 -550 {
-lab=GND}
-N 2140 -650 2180 -650 {
-lab=#net15}
-N 580 -660 620 -660 {
-lab=#net14}
-N 740 -680 740 -660 {
-lab=#net13}
-N 580 -680 740 -680 {
-lab=#net13}
-N 860 -640 860 -630 {
-lab=#net11}
-N 610 -630 860 -630 {
-lab=#net11}
-N 610 -640 610 -630 {
-lab=#net11}
-N 580 -640 610 -640 {
-lab=#net11}
-N 580 -620 980 -620 {
-lab=#net12}
-N 980 -640 980 -620 {
-lab=#net12}
-N 530 -740 560 -740 {
-lab=#net6}
-N 530 -560 560 -560 {
-lab=#net7}
-N 380 -740 390 -740 {
-lab=#net16}
-N 380 -560 400 -560 {
-lab=#net17}
-N 470 -560 530 -560 {
-lab=#net7}
-N 460 -560 470 -560 {
-lab=#net7}
-N 460 -740 530 -740 {
-lab=#net6}
-N 390 -740 400 -740 {
-lab=#net16}
-C {/Volumes/WORK_DRIVE/caravel_automatic_gain_control/xschem/lownoiseamplifier/csfd-abstract.sym} 1320 -540 0 0 {name=XLNA1}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 1490 -540 0 0 {name=l1 lab=GND}
-C {/Users/ryanwans/xschem/xschem_library/devices/vsource.sym} 1490 -790 2 0 {name=V1 value="1.8"}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 1490 -820 2 0 {name=l2 lab=GND}
-C {res.sym} 1580 -540 1 0 {name=R1
-value=13k
-footprint=1206
-device=resistor
-m=1}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 1630 -540 3 0 {name=l3 lab=GND}
-C {res.sym} 1580 -760 1 1 {name=R2
-value=13k
-footprint=1206
-device=resistor
-m=1}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 1630 -760 3 1 {name=l4 lab=GND}
-C {res.sym} 1670 -650 1 0 {name=R3
-value=250
-footprint=1206
-device=resistor
-m=1}
-C {/Users/ryanwans/xschem/xschem_library/devices/vsource.sym} 1730 -650 3 0 {name=V2 value="1.8"}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 1760 -650 3 0 {name=l5 lab=GND}
-C {/Users/ryanwans/xschem/xschem_library/devices/vsource.sym} 430 -650 1 0 {name=V3 value="1.8"}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 400 -650 1 0 {name=l6 lab=GND}
-C {res.sym} 480 -700 2 0 {name=R4
-value=800
-footprint=1206
-device=resistor
-m=1}
-C {res.sym} 480 -600 0 0 {name=R5
-value=800
-footprint=1206
-device=resistor
-m=1}
-C {res.sym} 480 -790 2 0 {name=R6
-value=1k
-footprint=1206
-device=resistor
-m=1}
-C {res.sym} 480 -510 0 0 {name=R7
-value=1k
-footprint=1206
-device=resistor
-m=1}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 480 -820 2 0 {name=l7 lab=GND}
-C {/Volumes/WORK_DRIVE/caravel_automatic_gain_control/xschem/attenuator/dsa.sym} 420 -320 0 0 {name=XDSA1}
-C {/Volumes/WORK_DRIVE/caravel_automatic_gain_control/xschem/attenuator/dsa.sym} 420 -980 2 1 {name=XDSA2}
-C {/Volumes/WORK_DRIVE/caravel_automatic_gain_control/xschem/powerdetector/balaced-pd.sym} 1810 -550 0 0 {name=X1}
-C {/Users/ryanwans/xschem/xschem_library/devices/vsource.sym} 1920 -740 2 0 {name=V4 value="0.5"}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 1920 -770 2 0 {name=l9 lab=GND}
-C {/Users/ryanwans/xschem/xschem_library/devices/vsource.sym} 1990 -740 2 0 {name=V5 value="1.8"}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 1990 -770 2 0 {name=l10 lab=GND}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 1960 -590 0 0 {name=l11 lab=GND}
-C {capa.sym} 2080 -600 0 0 {name=C3
-m=1
-value=200p
-footprint=1206
-device="ceramic capacitor"}
-C {res.sym} 2140 -600 0 0 {name=R8
-value=500k
-footprint=1206
-device=resistor
-m=1}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 2080 -550 0 0 {name=l12 lab=GND}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 2140 -550 0 0 {name=l13 lab=GND}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 800 -480 0 0 {name=l14 lab=GND}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 800 -820 2 0 {name=l15 lab=GND}
-C {/Users/ryanwans/xschem/xschem_library/devices/vsource.sym} 860 -850 2 0 {name=V6 value="1.8"}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 860 -880 2 0 {name=l16 lab=GND}
-C {/Users/ryanwans/xschem/xschem_library/devices/vsource.sym} 860 -450 0 1 {name=V7 value="1.8"}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 860 -420 0 1 {name=l17 lab=GND}
-C {/Users/ryanwans/xschem/xschem_library/devices/vsource.sym} 920 -850 2 0 {name=V8 value="1.4"}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 920 -880 2 0 {name=V9 value="1.4"}
-C {/Users/ryanwans/xschem/xschem_library/devices/vsource.sym} 920 -450 0 0 {name=V10 value="1.4"}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 920 -420 0 0 {name=V11 value="1.4"}
-C {/Users/ryanwans/xschem/xschem_library/devices/vsource.sym} 350 -740 1 0 {name=V12 value="SIN(0.2 0.2 40000 0 0 180)"}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 320 -740 1 0 {name=V13 value="1.4"}
-C {/Users/ryanwans/xschem/xschem_library/devices/vsource.sym} 350 -560 1 0 {name=V14 value="SIN(0.2 0.2 40000)"}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 320 -560 1 0 {name=V15 value="1.4"}
-C {capa.sym} 430 -740 3 0 {name=C4
-m=1
-value=500u
-footprint=1206
-device="ceramic capacitor"}
-C {capa.sym} 430 -560 3 0 {name=C1
-m=1
-value=500u
-footprint=1206
-device="ceramic capacitor"}
-C {/Users/ryanwans/xschem/xschem_library/devices/gnd.sym} 480 -480 0 0 {name=l18 lab=GND}
diff --git a/xschem/compiled.spice b/xschem/compiled.spice
deleted file mode 100644
index 21afe9f..0000000
--- a/xschem/compiled.spice
+++ /dev/null
@@ -1,227 +0,0 @@
-**.subckt compiled
-V1 net10 GND 1.8
-V2 net11 GND 0.5
-X1 __UNCONNECTED_PIN__0 __UNCONNECTED_PIN__1 net11 net10 out GND balaced-pd
-R2 out GND 500k m=1
-C2 out GND 200p m=1
-R1 net2 GND 1k m=1
-R3 net1 GND 1k m=1
-R4 net2 net3 800 m=1
-R5 net1 net4 800 m=1
-V5 net4 GND 1.8
-V6 net3 GND 1.8
-V7 net12 GND 1.8
-R6 net13 net5 250 m=1
-V8 net13 GND 1.8
-R7 net8 GND 13k m=1
-R8 net9 GND 13k m=1
-V9 net14 GND SIN(0 0.2 400000)
-V10 net15 GND SIN(0 0.2 400000 0 0 180)
-XLNA1 net2 net1 net12 GND net7 net6 net9 net5 net8 csfd-abstract
-C1 net2 net15 500u m=1
-C3 net1 net14 500u m=1
-XDSA1 __UNCONNECTED_PIN__2 __UNCONNECTED_PIN__3 __UNCONNECTED_PIN__4 __UNCONNECTED_PIN__5
-+ __UNCONNECTED_PIN__6 __UNCONNECTED_PIN__7 __UNCONNECTED_PIN__8 __UNCONNECTED_PIN__9 __UNCONNECTED_PIN__10 dsa
-XDSA2 __UNCONNECTED_PIN__11 __UNCONNECTED_PIN__12 __UNCONNECTED_PIN__13 __UNCONNECTED_PIN__14
-+ __UNCONNECTED_PIN__15 __UNCONNECTED_PIN__16 __UNCONNECTED_PIN__17 __UNCONNECTED_PIN__18 __UNCONNECTED_PIN__19 dsa
-**** begin user architecture code
- ** manual skywater pdks install (with patches applied)
-* .lib /ef/tech/SW.2/sky130A/libs.tech/ngspice/models/sky130.lib.spice tt
-
-** opencircuitdesign pdks install
-.lib /ef/tech/SW.2/sky130A/libs.tech/ngspice/sky130.lib.spice tt
-
-.param mc_mm_switch=0
-.param mc_pr_switch=0
-
-
-
-
-.tran 0.000001s 0.00001s
-
-
-**** end user architecture code
-**.ends
-
-* expanding   symbol:  balaced-pd.sym # of pins=6
-* sym_path: /home/u5921_ryanwan/design/FB1/xschem/balaced-pd.sym
-* sch_path: /home/u5921_ryanwan/design/FB1/xschem/balaced-pd.sch
-.subckt balaced-pd  in1 in2 vbias vdd output gnd
-*.ipin vdd
-*.ipin gnd
-*.opin output
-*.ipin in1
-*.ipin in2
-*.ipin vbias
-**** begin user architecture code
-
-
-.tran 0.0005s 0.5s
-
-
-**** end user architecture code
-XM10 net2 net2 gnd gnd sky130_fd_pr__nfet_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 
-XM11 output net3 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 
-XM3 net2 net1 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 
-XM4 net3 net3 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 
-XM8 net1 net1 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 
-XM1 net1 in1 gnd gnd sky130_fd_pr__nfet_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 net3 net2 gnd gnd sky130_fd_pr__nfet_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 
-XM5 net1 in2 gnd gnd sky130_fd_pr__nfet_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 
-XM6 net2 vbias gnd gnd sky130_fd_pr__nfet_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 
-.ends
-
-
-* expanding   symbol:  csfd-abstract.sym # of pins=9
-* sym_path: /home/u5921_ryanwan/design/FB1/xschem/csfd-abstract.sym
-* sch_path: /home/u5921_ryanwan/design/FB1/xschem/csfd-abstract.sch
-.subckt csfd-abstract  in1 in2 vdd gnd out1 out2 lc1 tc lc2
-*.ipin vdd
-*.ipin in1
-*.ipin in2
-*.ipin gnd
-*.opin out1
-*.opin out2
-*.ipin tc
-*.ipin lc1
-*.ipin lc2
-**** begin user architecture code
-
-
-.tran 0.000001s 0.00001s
-.plot v(drain1) v(drain2)
-
-
-**** end user architecture code
-XM9 out1 lc1 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 
-XM10 out1 in1 source gnd sky130_fd_pr__nfet_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 lc2 lc2 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 
-XM3 out2 lc2 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 
-XM7 lc1 lc1 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 
-XM1 source tc gnd gnd sky130_fd_pr__nfet_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 
-XM4 tc tc gnd gnd sky130_fd_pr__nfet_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 
-XM5 out2 in2 source gnd sky130_fd_pr__nfet_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 
-.ends
-
-
-* expanding   symbol:  dsa.sym # of pins=9
-* sym_path: /home/u5921_ryanwan/design/FB1/xschem/dsa.sym
-* sch_path: /home/u5921_ryanwan/design/FB1/xschem/dsa.sch
-.subckt dsa  in cntrl1 cntrl2 cntrl3 cntrl4 out vbias vdd gnd
-*.ipin cntrl1
-*.ipin cntrl2
-*.ipin cntrl3
-*.ipin cntrl4
-*.ipin in
-*.opin out
-*.ipin gnd
-*.ipin vbias
-*.ipin vdd
-**** begin user architecture code
-
-
-.tran 0.000001s 0.0001s
-.save all
-
-
-**** end user architecture code
-R1 net1 net2 50 m=1
-R2 net3 net4 200 m=1
-XDTG1 in cntrl1 vdd vbias gnd net2 net1 transgate-full
-XDTG2 net2 cntrl2 vdd vbias gnd net4 net3 transgate-full
-R3 net5 net6 1k m=1
-XDTG3 net4 cntrl3 vdd vbias gnd net6 net5 transgate-full
-R4 net7 out 10k m=1
-XDTG4 net6 cntrl4 vdd vbias gnd out net7 transgate-full
-.ends
-
-
-* expanding   symbol:  transgate-full.sym # of pins=7
-* sym_path: /home/u5921_ryanwan/design/FB1/xschem/transgate-full.sym
-* sch_path: /home/u5921_ryanwan/design/FB1/xschem/transgate-full.sch
-.subckt transgate-full  in cntrl vdd vbias gnd out2 out1
-*.ipin cntrl
-*.ipin vdd
-*.ipin in
-*.ipin gnd
-*.ipin vbias
-*.opin out2
-*.opin out1
-XI1 vdd gnd net1 cntrl basic-invert
-XTG1 in out1 gnd vbias net1 cntrl gate-switch
-XTG2 in out2 gnd vbias cntrl net1 gate-switch
-.ends
-
-
-* expanding   symbol:  basic-invert.sym # of pins=4
-* sym_path: /home/u5921_ryanwan/design/FB1/xschem/basic-invert.sym
-* sch_path: /home/u5921_ryanwan/design/FB1/xschem/basic-invert.sch
-.subckt basic-invert  vdd gnd out in
-*.ipin in
-*.ipin gnd
-*.ipin vdd
-*.opin out
-XM1 out in gnd gnd sky130_fd_pr__nfet_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 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 
-.ends
-
-
-* expanding   symbol:  gate-switch.sym # of pins=6
-* sym_path: /home/u5921_ryanwan/design/FB1/xschem/gate-switch.sym
-* sch_path: /home/u5921_ryanwan/design/FB1/xschem/gate-switch.sch
-.subckt gate-switch  in out gnd vbias cntrl2 cntrl1
-*.ipin in
-*.ipin vbias
-*.ipin gnd
-*.opin out
-*.ipin cntrl1
-*.ipin cntrl2
-XM5 in cntrl2 out vbias 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 
-XM6 out cntrl1 in gnd sky130_fd_pr__nfet_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 
-.ends
-
-.GLOBAL GND
-** flattened .save nodes
-.end