analog mux schematic
diff --git a/xschem/analog_mux_2_1.sch b/xschem/analog_mux_2_1.sch
new file mode 100644
index 0000000..e058f9f
--- /dev/null
+++ b/xschem/analog_mux_2_1.sch
@@ -0,0 +1,357 @@
+v {xschem version=3.0.0 file_version=1.2 }
+G {}
+K {}
+V {}
+S {}
+E {}
+N 1220 -1030 1260 -1030 { lab=EN0}
+N 1220 -950 1260 -950 { lab=!EN1}
+N 1200 -930 1260 -930 { lab=EN1}
+N 1200 -1050 1260 -1050 { lab=!EN0}
+N 1560 -970 1600 -970 { lab=VGND}
+N 1560 -1070 1600 -1070 { lab=VGND}
+N 1600 -1070 1600 -970 { lab=VGND}
+N 1560 -950 1620 -950 { lab=VDD3v3}
+N 1620 -1120 1620 -950 { lab=VDD3v3}
+N 1560 -1050 1620 -1050 { lab=VDD3v3}
+N 1560 -930 1660 -930 { lab=VOUT}
+N 1560 -1030 1660 -1030 { lab=VOUT}
+N 1660 -1030 1660 -930 { lab=VOUT}
+N 1660 -1030 1720 -1030 { lab=VOUT}
+N 1600 -970 1600 -880 { lab=VGND}
+N 1120 -1070 1260 -1070 { lab=VIN0}
+N 1120 -970 1260 -970 { lab=VIN1}
+N 1070 -670 1070 -640 { lab=#net1}
+N 1070 -780 1070 -750 { lab=!EN1}
+N 1010 -810 1030 -810 { lab=EN}
+N 1010 -810 1010 -720 { lab=EN}
+N 1010 -700 1030 -700 { lab=EN}
+N 840 -610 1030 -610 { lab=SELECT}
+N 910 -760 1070 -760 { lab=!EN1}
+N 910 -780 910 -760 { lab=!EN1}
+N 1010 -720 1010 -700 { lab=EN}
+N 1070 -750 1070 -730 { lab=!EN1}
+N 1070 -760 1200 -760 { lab=!EN1}
+N 840 -630 840 -610 { lab=SELECT}
+N 1070 -700 1160 -700 { lab=VGND}
+N 1070 -610 1160 -610 { lab=VGND}
+N 1070 -580 1070 -560 { lab=VGND}
+N 1160 -700 1160 -610 { lab=VGND}
+N 1220 -540 1220 -500 { lab=VGND}
+N 1070 -560 1220 -560 { lab=VGND}
+N 910 -810 1000 -810 { lab=VDD3v3}
+N 1000 -860 1000 -810 { lab=VDD3v3}
+N 910 -860 910 -840 { lab=VDD3v3}
+N 1070 -810 1160 -810 { lab=VDD3v3}
+N 1160 -860 1160 -810 { lab=VDD3v3}
+N 1100 -880 1100 -860 { lab=VDD3v3}
+N 960 -700 1010 -700 { lab=EN}
+N 1230 -810 1260 -810 { lab=!EN1}
+N 1220 -560 1220 -540 { lab=VGND}
+N 1200 -760 1230 -760 { lab=!EN1}
+N 1070 -860 1070 -840 { lab=VDD3v3}
+N 1160 -610 1160 -560 { lab=VGND}
+N 1230 -810 1230 -760 { lab=!EN1}
+N 1230 -760 1230 -710 { lab=!EN1}
+N 1230 -710 1260 -710 { lab=!EN1}
+N 1300 -680 1300 -560 { lab=VGND}
+N 1300 -710 1400 -710 { lab=VGND}
+N 1400 -710 1400 -560 { lab=VGND}
+N 1300 -780 1300 -740 { lab=EN1}
+N 1300 -760 1470 -760 { lab=EN1}
+N 910 -860 1300 -860 { lab=VDD3v3}
+N 1300 -860 1300 -840 { lab=VDD3v3}
+N 1040 -950 1220 -950 { lab=!EN1}
+N 1040 -930 1200 -930 { lab=EN1}
+N 1040 -1050 1200 -1050 { lab=!EN0}
+N 1040 -1030 1220 -1030 { lab=EN0}
+N 1470 -780 1470 -760 { lab=EN1}
+N 840 -810 840 -630 { lab=SELECT}
+N 840 -810 870 -810 { lab=SELECT}
+N 840 -310 870 -310 { lab=SELECT}
+N 840 -310 840 -260 { lab=SELECT}
+N 840 -260 840 -210 { lab=SELECT}
+N 840 -210 870 -210 { lab=SELECT}
+N 910 -210 1010 -210 { lab=VGND}
+N 910 -280 910 -240 { lab=!SELECT}
+N 1250 -240 1250 -210 { lab=#net2}
+N 1250 -350 1250 -320 { lab=!EN0}
+N 1190 -380 1210 -380 { lab=EN}
+N 1190 -380 1190 -290 { lab=EN}
+N 1190 -270 1210 -270 { lab=EN}
+N 1090 -330 1250 -330 { lab=!EN0}
+N 1090 -350 1090 -330 { lab=!EN0}
+N 1190 -290 1190 -270 { lab=EN}
+N 1250 -320 1250 -300 { lab=!EN0}
+N 1250 -330 1380 -330 { lab=!EN0}
+N 1250 -270 1340 -270 { lab=VGND}
+N 1250 -180 1340 -180 { lab=VGND}
+N 1250 -150 1250 -130 { lab=VGND}
+N 1340 -270 1340 -180 { lab=VGND}
+N 1400 -110 1400 -70 { lab=VGND}
+N 1250 -130 1400 -130 { lab=VGND}
+N 1090 -380 1180 -380 { lab=VDD3v3}
+N 1180 -430 1180 -380 { lab=VDD3v3}
+N 1090 -430 1090 -410 { lab=VDD3v3}
+N 1250 -380 1340 -380 { lab=VDD3v3}
+N 1340 -430 1340 -380 { lab=VDD3v3}
+N 1280 -450 1280 -430 { lab=VDD3v3}
+N 1140 -270 1190 -270 { lab=EN}
+N 1410 -380 1440 -380 { lab=!EN0}
+N 1400 -130 1400 -110 { lab=VGND}
+N 1380 -330 1410 -330 { lab=!EN0}
+N 1250 -430 1250 -410 { lab=VDD3v3}
+N 1340 -180 1340 -130 { lab=VGND}
+N 1410 -380 1410 -330 { lab=!EN0}
+N 1410 -330 1410 -280 { lab=!EN0}
+N 1410 -280 1440 -280 { lab=!EN0}
+N 1480 -250 1480 -130 { lab=VGND}
+N 1480 -280 1580 -280 { lab=VGND}
+N 1580 -280 1580 -130 { lab=VGND}
+N 1480 -350 1480 -310 { lab=EN0}
+N 1480 -330 1650 -330 { lab=EN0}
+N 1090 -430 1480 -430 { lab=VDD3v3}
+N 1480 -430 1480 -410 { lab=VDD3v3}
+N 1650 -350 1650 -330 { lab=EN0}
+N 840 -610 840 -310 { lab=SELECT}
+N 810 -810 840 -810 { lab=SELECT}
+N 910 -430 910 -340 { lab=VDD3v3}
+N 910 -430 1090 -430 { lab=VDD3v3}
+N 910 -310 1000 -310 { lab=VDD3v3}
+N 1000 -430 1000 -310 { lab=VDD3v3}
+N 910 -260 1040 -260 { lab=!SELECT}
+N 1040 -380 1040 -260 { lab=!SELECT}
+N 1040 -380 1050 -380 { lab=!SELECT}
+N 1010 -210 1010 -130 { lab=VGND}
+N 910 -130 1250 -130 { lab=VGND}
+N 910 -170 910 -130 { lab=VGND}
+N 910 -180 910 -170 { lab=VGND}
+N 1040 -180 1210 -180 { lab=!SELECT}
+N 1040 -260 1040 -180 { lab=!SELECT}
+N 1220 -560 1400 -560 { lab=VGND}
+N 1400 -130 1580 -130 { lab=VGND}
+N 1300 -810 1400 -810 { lab=VDD3v3}
+N 1400 -860 1400 -810 { lab=VDD3v3}
+N 1300 -860 1400 -860 { lab=VDD3v3}
+N 1480 -380 1570 -380 { lab=VDD3v3}
+N 1570 -430 1570 -380 { lab=VDD3v3}
+N 1480 -430 1570 -430 { lab=VDD3v3}
+C {analogue_switch.sym} 1410 -1050 0 0 {name=x1}
+C {analogue_switch.sym} 1410 -950 0 0 {name=x2}
+C {devices/iopin.sym} 1600 -880 0 0 {name=p1 lab=VGND}
+C {devices/ipin.sym} 1120 -1070 0 0 {name=p2 lab=VIN0}
+C {devices/opin.sym} 1720 -1030 0 0 {name=p3 lab=VOUT}
+C {devices/iopin.sym} 1620 -1120 0 0 {name=p4 lab=VDD3v3}
+C {devices/ipin.sym} 1120 -970 0 0 {name=p5 lab=VIN1}
+C {sky130_fd_pr/pfet_g5v0d10v5.sym} 890 -810 0 0 {name=M3
+L=0.5
+W=0.75
+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_g5v0d10v5
+spiceprefix=X
+}
+C {sky130_fd_pr/pfet_g5v0d10v5.sym} 1050 -810 0 0 {name=M4
+L=0.5
+W=0.75
+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_g5v0d10v5
+spiceprefix=X
+}
+C {sky130_fd_pr/nfet_03v3_nvt.sym} 1050 -610 0 0 {name=M2
+L=0.5
+W=0.7
+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_03v3_nvt
+spiceprefix=X
+}
+C {sky130_fd_pr/nfet_03v3_nvt.sym} 1050 -700 0 0 {name=M5
+L=0.5
+W=0.7
+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_03v3_nvt
+spiceprefix=X
+}
+C {devices/lab_pin.sym} 1220 -500 0 0 {name=l3 sig_type=std_logic lab=VGND}
+C {devices/lab_pin.sym} 1100 -880 0 0 {name=l4 sig_type=std_logic lab=VDD3v3}
+C {devices/ipin.sym} 960 -700 0 0 {name=p6 lab=EN}
+C {sky130_fd_pr/pfet_g5v0d10v5.sym} 1280 -810 0 0 {name=M1
+L=0.5
+W=0.75
+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_g5v0d10v5
+spiceprefix=X
+}
+C {sky130_fd_pr/nfet_03v3_nvt.sym} 1280 -710 0 0 {name=M6
+L=0.5
+W=0.7
+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_03v3_nvt
+spiceprefix=X
+}
+C {devices/lab_pin.sym} 1040 -1050 0 0 {name=l1 sig_type=std_logic lab=!EN0}
+C {devices/lab_pin.sym} 1040 -1030 0 0 {name=l5 sig_type=std_logic lab=EN0}
+C {devices/lab_pin.sym} 1040 -930 0 0 {name=l6 sig_type=std_logic lab=EN1}
+C {devices/lab_pin.sym} 1040 -950 0 0 {name=l7 sig_type=std_logic lab=!EN1}
+C {devices/lab_pin.sym} 1230 -790 0 0 {name=l2 sig_type=std_logic lab=!EN1}
+C {devices/lab_pin.sym} 1470 -780 0 0 {name=l8 sig_type=std_logic lab=EN1}
+C {devices/ipin.sym} 810 -810 0 0 {name=p7 lab=SELECT}
+C {sky130_fd_pr/pfet_g5v0d10v5.sym} 890 -310 0 0 {name=M7
+L=0.5
+W=0.75
+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_g5v0d10v5
+spiceprefix=X
+}
+C {sky130_fd_pr/nfet_03v3_nvt.sym} 890 -210 0 0 {name=M8
+L=0.5
+W=0.7
+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_03v3_nvt
+spiceprefix=X
+}
+C {sky130_fd_pr/pfet_g5v0d10v5.sym} 1230 -380 0 0 {name=M9
+L=0.5
+W=0.75
+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_g5v0d10v5
+spiceprefix=X
+}
+C {sky130_fd_pr/nfet_03v3_nvt.sym} 1230 -180 0 0 {name=M10
+L=0.5
+W=0.7
+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_03v3_nvt
+spiceprefix=X
+}
+C {sky130_fd_pr/nfet_03v3_nvt.sym} 1230 -270 0 0 {name=M11
+L=0.5
+W=0.7
+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_03v3_nvt
+spiceprefix=X
+}
+C {devices/lab_pin.sym} 1400 -70 0 0 {name=l10 sig_type=std_logic lab=VGND}
+C {devices/lab_pin.sym} 1280 -450 0 0 {name=l11 sig_type=std_logic lab=VDD3v3}
+C {sky130_fd_pr/pfet_g5v0d10v5.sym} 1460 -380 0 0 {name=M12
+L=0.5
+W=0.75
+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_g5v0d10v5
+spiceprefix=X
+}
+C {sky130_fd_pr/nfet_03v3_nvt.sym} 1460 -280 0 0 {name=M13
+L=0.5
+W=0.7
+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_03v3_nvt
+spiceprefix=X
+}
+C {devices/lab_pin.sym} 1410 -360 0 0 {name=l12 sig_type=std_logic lab=!EN0}
+C {devices/lab_pin.sym} 1650 -350 0 0 {name=l13 sig_type=std_logic lab=EN0}
+C {sky130_fd_pr/pfet_g5v0d10v5.sym} 1070 -380 0 0 {name=M14
+L=0.5
+W=0.75
+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_g5v0d10v5
+spiceprefix=X
+}
+C {devices/lab_pin.sym} 1140 -270 0 0 {name=l9 sig_type=std_logic lab=EN}
+C {devices/lab_pin.sym} 1040 -270 0 0 {name=l14 sig_type=std_logic lab=!SELECT}
diff --git a/xschem/analog_mux_2_1.spice b/xschem/analog_mux_2_1.spice
new file mode 100644
index 0000000..07ab8f9
--- /dev/null
+++ b/xschem/analog_mux_2_1.spice
@@ -0,0 +1,74 @@
+**.subckt analog_mux_2_1 VGND VIN0 VOUT VDD3v3 VIN1 EN SELECT
+*.iopin VGND
+*.ipin VIN0
+*.opin VOUT
+*.iopin VDD3v3
+*.ipin VIN1
+*.ipin EN
+*.ipin SELECT
+x1 VIN0 VGND VDD3v3 !EN0 EN0 VOUT analogue_switch
+x2 VIN1 VGND VDD3v3 !EN1 EN1 VOUT analogue_switch
+XM3 !EN1 SELECT VDD3v3 VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 W=0.75 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 !EN1 EN VDD3v3 VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 W=0.75 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 net1 SELECT VGND VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 W=0.7 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 !EN1 EN net1 VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 W=0.7 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 EN1 !EN1 VDD3v3 VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 W=0.75 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 EN1 !EN1 VGND VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 W=0.7 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 !SELECT SELECT VDD3v3 VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 W=0.75 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 !SELECT SELECT VGND VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 W=0.7 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 !EN0 EN VDD3v3 VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 W=0.75 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 net2 !SELECT VGND VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 W=0.7 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 !EN0 EN net2 VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 W=0.7 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 EN0 !EN0 VDD3v3 VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 W=0.75 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 EN0 !EN0 VGND VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 W=0.7 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 
+XM14 !EN0 !SELECT VDD3v3 VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 W=0.75 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:  analogue_switch.sym # of pins=6
+* sym_path: /home/hss11/winhome/caravel_user_project_analog/xschem/analogue_switch.sym
+* sch_path: /home/hss11/winhome/caravel_user_project_analog/xschem/analogue_switch.sch
+.subckt analogue_switch  VIN VGND VDD3v3 !EN EN VOUT
+*.iopin VGND
+*.iopin VDD3v3
+*.ipin EN
+*.ipin VIN
+*.ipin !EN
+*.opin VOUT
+XM2 VOUT !EN VIN VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 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=15 m=15 
+XM1 VIN EN VOUT VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 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=10 m=10 
+.ends
+
+** flattened .save nodes
+.end
diff --git a/xschem/analog_mux_2_1.sym b/xschem/analog_mux_2_1.sym
new file mode 100644
index 0000000..4917a8b
--- /dev/null
+++ b/xschem/analog_mux_2_1.sym
@@ -0,0 +1,32 @@
+v {xschem version=3.0.0 file_version=1.2}
+K {type=subcircuit
+format="@name @pinlist @symname"
+template="name=x1"
+}
+T {@symname} -81 -6 0 0 0.3 0.3 {}
+T {@name} 135 -52 0 0 0.2 0.2 {}
+L 4 -130 -40 130 -40 {}
+L 4 -130 40 130 40 {}
+L 4 -130 -40 -130 40 {}
+L 4 130 -40 130 40 {}
+B 5 147.5 -32.5 152.5 -27.5 {name=VDD3v3 dir=inout }
+L 7 130 -30 150 -30 {}
+T {VDD3v3} 125 -34 0 1 0.2 0.2 {}
+B 5 -152.5 -32.5 -147.5 -27.5 {name=VIN0 dir=in }
+L 4 -150 -30 -130 -30 {}
+T {VIN0} -125 -34 0 0 0.2 0.2 {}
+B 5 147.5 -12.5 152.5 -7.5 {name=VOUT dir=out }
+L 4 130 -10 150 -10 {}
+T {VOUT} 125 -14 0 1 0.2 0.2 {}
+B 5 -152.5 -12.5 -147.5 -7.5 {name=VIN1 dir=in }
+L 4 -150 -10 -130 -10 {}
+T {VIN1} -125 -14 0 0 0.2 0.2 {}
+B 5 147.5 7.5 152.5 12.5 {name=VGND dir=inout }
+L 7 130 10 150 10 {}
+T {VGND} 125 6 0 1 0.2 0.2 {}
+B 5 -152.5 7.5 -147.5 12.5 {name=SELECT dir=in }
+L 4 -150 10 -130 10 {}
+T {SELECT} -125 6 0 0 0.2 0.2 {}
+B 5 -152.5 27.5 -147.5 32.5 {name=EN dir=in }
+L 4 -150 30 -130 30 {}
+T {EN} -125 26 0 0 0.2 0.2 {}
diff --git a/xschem/analogue_mux_tb.sch b/xschem/analogue_mux_tb.sch
new file mode 100644
index 0000000..ac5191f
--- /dev/null
+++ b/xschem/analogue_mux_tb.sch
@@ -0,0 +1,75 @@
+v {xschem version=3.0.0 file_version=1.2 }
+G {}
+K {}
+V {}
+S {}
+E {}
+N 1980 -980 2060 -980 { lab=GND}
+N 2060 -1100 2060 -1080 { lab=vdd3v3}
+N 1830 -1080 1840 -1080 { lab=GND}
+N 1840 -1080 1840 -1050 { lab=GND}
+N 1170 -980 1290 -980 { lab=GND}
+N 1100 -980 1170 -980 { lab=GND}
+N 2060 -1120 2060 -1100 { lab=vdd3v3}
+N 1290 -980 1370 -980 { lab=GND}
+N 1370 -980 1900 -980 { lab=GND}
+N 1840 -1050 1840 -1040 { lab=GND}
+N 2060 -1020 2060 -980 { lab=GND}
+N 1100 -1020 1100 -980 { lab=GND}
+N 1900 -980 1980 -980 { lab=GND}
+N 1920 -1020 1920 -1010 { lab=GND}
+N 1490 -1060 1490 -1050 { lab=EN}
+N 1490 -1060 1530 -1060 { lab=EN}
+N 1490 -990 1490 -980 { lab=GND}
+N 2060 -1220 2060 -1120 { lab=vdd3v3}
+N 1920 -1220 2060 -1220 { lab=vdd3v3}
+N 1920 -1220 1920 -1200 { lab=vdd3v3}
+N 1830 -1100 1920 -1100 { lab=VOUT}
+N 1830 -1120 1840 -1120 { lab=vdd3v3}
+N 1840 -1220 1840 -1120 { lab=vdd3v3}
+N 1840 -1220 1920 -1220 { lab=vdd3v3}
+N 1920 -1140 1920 -1080 { lab=VOUT}
+N 1840 -1040 1840 -980 { lab=GND}
+N 1920 -1010 1920 -980 { lab=GND}
+N 930 -1110 930 -1070 { lab=VIN0}
+N 1290 -1000 1290 -980 { lab=GND}
+N 1290 -1080 1530 -1080 { lab=SEL}
+N 1290 -1080 1290 -1060 { lab=SEL}
+N 1180 -1100 1530 -1100 { lab=VIN1}
+N 1200 -1120 1530 -1120 { lab=VIN0}
+N 1100 -1100 1180 -1100 { lab=VIN1}
+N 1100 -1100 1100 -1080 { lab=VIN1}
+N 930 -1120 1200 -1120 { lab=VIN0}
+N 930 -1120 930 -1110 { lab=VIN0}
+N 930 -1010 930 -980 { lab=GND}
+N 930 -980 1100 -980 { lab=GND}
+C {devices/code_shown.sym} 1620 -910 0 0 {name=s1 only_toplevel=false value="
+.lib ~/open_sky130/sky130A/libs.tech/ngspice/sky130.lib.spice tt"}
+C {devices/gnd.sym} 1680 -980 0 0 {name=l1 lab=GND}
+C {devices/vsource.sym} 2060 -1050 0 0 {name=V1 value=3.3}
+C {devices/lab_pin.sym} 1920 -1120 0 0 {name=l2 sig_type=std_logic lab=VOUT}
+C {devices/code_shown.sym} 1610 -810 0 0 {name=s2 only_toplevel=false value=".control
+tran 0.1n 100n
+plot V(vdd3v3) V(VOUT) 
+plot V(vdd3v3) VIN0 VIN1 SEL EN
+.endc"}
+C {devices/vsource.sym} 1100 -1050 0 0 {name=V2 value="SIN(1.6 1.6 100Meg 0 0)"}
+C {devices/lab_pin.sym} 1290 -1080 0 0 {name=l4 sig_type=std_logic lab=SEL}
+C {devices/lab_pin.sym} 1490 -1060 0 0 {name=l5 sig_type=std_logic lab=EN}
+C {devices/lab_pin.sym} 930 -1120 0 0 {name=l6 sig_type=std_logic lab=VIN0}
+C {devices/lab_pin.sym} 2060 -1120 0 0 {name=l3 sig_type=std_logic lab=vdd3v3}
+C {devices/vsource.sym} 1290 -1030 0 0 {name=V3 value="PWL(0 3.3 65n 3.3 70n 0 100n 0)"}
+C {devices/vsource.sym} 1490 -1020 0 0 {name=V4 value="PWL(0 0 45n 0 50n 3.3 100n 3.3)"}
+C {devices/res.sym} 1920 -1050 0 0 {name=R1
+value=10k
+footprint=1206
+device=resistor
+m=1}
+C {devices/res.sym} 1920 -1170 0 0 {name=R2
+value=10k
+footprint=1206
+device=resistor
+m=1}
+C {analog_mux_2_1.sym} 1680 -1090 0 0 {name=x2}
+C {devices/vsource.sym} 930 -1040 0 0 {name=V5 value="SIN(1.6 1.6 200Meg 0 0)"}
+C {devices/lab_pin.sym} 1100 -1100 0 0 {name=l7 sig_type=std_logic lab=VIN1}
diff --git a/xschem/analogue_mux_tb.spice b/xschem/analogue_mux_tb.spice
new file mode 100644
index 0000000..bf14006
--- /dev/null
+++ b/xschem/analogue_mux_tb.spice
@@ -0,0 +1,103 @@
+**.subckt analogue_mux_tb
+V1 vdd3v3 GND 3.3
+V2 VIN1 GND SIN(1.6 1.6 100Meg 0 0)
+V3 SEL GND PWL(0 3.3 65n 3.3 70n 0 100n 0)
+V4 EN GND PWL(0 0 45n 0 50n 3.3 100n 3.3)
+R1 VOUT GND 10k m=1
+R2 vdd3v3 VOUT 10k m=1
+x2 vdd3v3 VIN0 VOUT VIN1 GND SEL EN analog_mux_2_1
+V5 VIN0 GND SIN(1.6 1.6 200Meg 0 0)
+**** begin user architecture code
+
+
+.lib ~/open_sky130/sky130A/libs.tech/ngspice/sky130.lib.spice tt
+
+
+.control
+tran 0.1n 100n
+plot V(vdd3v3) V(VOUT)
+plot V(vdd3v3) VIN0 VIN1 SEL EN
+.endc
+
+**** end user architecture code
+**.ends
+
+* expanding   symbol:  analog_mux_2_1.sym # of pins=7
+* sym_path: /home/hss11/winhome/caravel_user_project_analog/xschem/analog_mux_2_1.sym
+* sch_path: /home/hss11/winhome/caravel_user_project_analog/xschem/analog_mux_2_1.sch
+.subckt analog_mux_2_1  VDD3v3 VIN0 VOUT VIN1 VGND SELECT EN
+*.iopin VGND
+*.ipin VIN0
+*.opin VOUT
+*.iopin VDD3v3
+*.ipin VIN1
+*.ipin EN
+*.ipin SELECT
+x1 VIN0 VGND VDD3v3 !EN0 EN0 VOUT analogue_switch
+x2 VIN1 VGND VDD3v3 !EN1 EN1 VOUT analogue_switch
+XM3 !EN1 SELECT VDD3v3 VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 W=0.75 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 !EN1 EN VDD3v3 VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 W=0.75 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 net1 SELECT VGND VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 W=0.7 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 !EN1 EN net1 VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 W=0.7 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 EN1 !EN1 VDD3v3 VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 W=0.75 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 EN1 !EN1 VGND VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 W=0.7 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 !SELECT SELECT VDD3v3 VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 W=0.75 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 !SELECT SELECT VGND VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 W=0.7 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 !EN0 EN VDD3v3 VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 W=0.75 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 net2 !SELECT VGND VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 W=0.7 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 !EN0 EN net2 VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 W=0.7 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 EN0 !EN0 VDD3v3 VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 W=0.75 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 EN0 !EN0 VGND VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 W=0.7 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 
+XM14 !EN0 !SELECT VDD3v3 VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 W=0.75 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:  analogue_switch.sym # of pins=6
+* sym_path: /home/hss11/winhome/caravel_user_project_analog/xschem/analogue_switch.sym
+* sch_path: /home/hss11/winhome/caravel_user_project_analog/xschem/analogue_switch.sch
+.subckt analogue_switch  VIN VGND VDD3v3 !EN EN VOUT
+*.iopin VGND
+*.iopin VDD3v3
+*.ipin EN
+*.ipin VIN
+*.ipin !EN
+*.opin VOUT
+XM2 VOUT !EN VIN VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 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=15 m=15 
+XM1 VIN EN VOUT VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 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=10 m=10 
+.ends
+
+.GLOBAL GND
+** flattened .save nodes
+.end
diff --git a/xschem/analogue_switch.sch b/xschem/analogue_switch.sch
index 8345bb3..e7775e9 100644
--- a/xschem/analogue_switch.sch
+++ b/xschem/analogue_switch.sch
@@ -23,7 +23,7 @@
 L=0.5
 W=1
 nf=1
-mult=1
+mult=15
 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'" 
@@ -40,7 +40,7 @@
 L=0.5
 W=1
 nf=1
-mult=1
+mult=10
 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'" 
diff --git a/xschem/analogue_switch.spice b/xschem/analogue_switch.spice
index f28356e..fbbfa23 100644
--- a/xschem/analogue_switch.spice
+++ b/xschem/analogue_switch.spice
@@ -7,10 +7,10 @@
 *.opin VOUT
 XM2 VOUT !EN VIN VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 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 
++ nrd='0.29 / W' nrs='0.29 / W' sa=0 sb=0 sd=0 mult=15 m=15 
 XM1 VIN EN VOUT VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 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 
++ sa=0 sb=0 sd=0 mult=10 m=10 
 **.ends
 ** flattened .save nodes
 .end
diff --git a/xschem/analogue_switch_tb.sch b/xschem/analogue_switch_tb.sch
index 27987b1..cf9a48f 100644
--- a/xschem/analogue_switch_tb.sch
+++ b/xschem/analogue_switch_tb.sch
@@ -5,10 +5,10 @@
 S {}
 E {}
 N 1830 -1100 1920 -1100 { lab=vdd3v3}
-N 1900 -1120 1900 -1020 { lab=GND}
+N 1980 -1120 1980 -1020 { lab=GND}
 N 1830 -1120 1900 -1120 { lab=GND}
-N 1900 -980 1980 -980 { lab=GND}
-N 1980 -1100 1980 -1080 { lab=vdd3v3}
+N 1980 -980 2060 -980 { lab=GND}
+N 2060 -1100 2060 -1080 { lab=vdd3v3}
 N 1830 -1080 1840 -1080 { lab=VOUT}
 N 1840 -1080 1840 -1050 { lab=VOUT}
 N 1170 -980 1290 -980 { lab=GND}
@@ -18,37 +18,51 @@
 N 1320 -1100 1530 -1100 { lab=ENB}
 N 1250 -1100 1250 -1080 { lab=ENB}
 N 1490 -1080 1530 -1080 { lab=EN}
-N 1980 -1120 1980 -1100 { lab=vdd3v3}
-N 1920 -1100 1980 -1100 { lab=vdd3v3}
+N 2060 -1120 2060 -1100 { lab=vdd3v3}
+N 2000 -1100 2060 -1100 { lab=vdd3v3}
 N 1250 -1100 1320 -1100 { lab=ENB}
 N 1100 -1120 1170 -1120 { lab=VIN}
 N 1290 -980 1370 -980 { lab=GND}
 N 1370 -980 1900 -980 { lab=GND}
 N 1840 -1050 1840 -1040 { lab=VOUT}
-N 1900 -1020 1900 -980 { lab=GND}
 N 1980 -1020 1980 -980 { lab=GND}
+N 2060 -1020 2060 -980 { lab=GND}
 N 1490 -1020 1490 -980 { lab=GND}
 N 1250 -1020 1250 -980 { lab=GND}
 N 1100 -1020 1100 -980 { lab=GND}
+N 1900 -1120 1980 -1120 { lab=GND}
+N 1920 -1100 2000 -1100 { lab=vdd3v3}
+N 1900 -980 1980 -980 { lab=GND}
+N 1920 -1100 1920 -1080 { lab=vdd3v3}
+N 1920 -1020 1920 -1010 { lab=VOUT}
+N 1880 -1010 1920 -1010 { lab=VOUT}
+N 1880 -1060 1880 -1010 { lab=VOUT}
+N 1840 -1060 1880 -1060 { lab=VOUT}
 C {analogue_switch.sym} 1680 -1100 0 0 {name=x1}
 C {devices/code_shown.sym} 1620 -910 0 0 {name=s1 only_toplevel=false value="
 .lib ~/open_sky130/sky130A/libs.tech/ngspice/sky130.lib.spice tt"}
 C {devices/gnd.sym} 1680 -980 0 0 {name=l1 lab=GND}
-C {devices/vsource.sym} 1980 -1050 0 0 {name=V1 value=3.3}
+C {devices/vsource.sym} 2060 -1050 0 0 {name=V1 value=3.3}
 C {devices/lab_pin.sym} 1840 -1050 0 0 {name=l2 sig_type=std_logic lab=VOUT}
 C {devices/code_shown.sym} 1610 -810 0 0 {name=s2 only_toplevel=false value=".control
-tran 1n 1u
+tran 0.1n 100n
 plot V(vdd3v3) V(VOUT) VIN ENB EN
+plot I(V1) I(V2) I(R1)
 .endc"}
-C {devices/vsource.sym} 1100 -1050 0 0 {name=V2 value="SIN(1.5 1 10Meg 0 0)"}
+C {devices/vsource.sym} 1100 -1050 0 0 {name=V2 value="SIN(1.6 1.6 100Meg 0 0)"}
 C {devices/lab_pin.sym} 1250 -1100 0 0 {name=l4 sig_type=std_logic lab=ENB}
 C {devices/lab_pin.sym} 1490 -1080 0 0 {name=l5 sig_type=std_logic lab=EN}
 C {devices/lab_pin.sym} 1100 -1120 0 0 {name=l6 sig_type=std_logic lab=VIN}
-C {devices/lab_pin.sym} 1980 -1120 0 0 {name=l3 sig_type=std_logic lab=vdd3v3}
-C {devices/vsource.sym} 1250 -1050 0 0 {name=V3 value="PWL(0 3.3 450n 3.3 500n 0 1u 0)"}
-C {devices/vsource.sym} 1490 -1050 0 0 {name=V4 value="PWL(0 0 450n 0 500n 3.3 1u 3.3)"}
+C {devices/lab_pin.sym} 2060 -1120 0 0 {name=l3 sig_type=std_logic lab=vdd3v3}
+C {devices/vsource.sym} 1250 -1050 0 0 {name=V3 value="PWL(0 3.3 45n 3.3 50n 0 100n 0)"}
+C {devices/vsource.sym} 1490 -1050 0 0 {name=V4 value="PWL(0 0 45n 0 50n 3.3 100n 3.3)"}
 C {devices/res.sym} 1840 -1010 0 0 {name=R1
 value=10k
 footprint=1206
 device=resistor
 m=1}
+C {devices/res.sym} 1920 -1050 0 0 {name=R2
+value=10k
+footprint=1206
+device=resistor
+m=1}
diff --git a/xschem/analogue_switch_tb.spice b/xschem/analogue_switch_tb.spice
index 3c473f1..a9904d6 100644
--- a/xschem/analogue_switch_tb.spice
+++ b/xschem/analogue_switch_tb.spice
@@ -1,10 +1,11 @@
 **.subckt analogue_switch_tb
 x1 VIN GND vdd3v3 ENB EN VOUT analogue_switch
 V1 vdd3v3 GND 3.3
-V2 VIN GND SIN(1.5 1 10Meg 0 0)
-V3 ENB GND PWL(0 3.3 450n 3.3 500n 0 1u 0)
-V4 EN GND PWL(0 0 450n 0 500n 3.3 1u 3.3)
+V2 VIN GND SIN(1.6 1.6 100Meg 0 0)
+V3 ENB GND PWL(0 3.3 45n 3.3 50n 0 100n 0)
+V4 EN GND PWL(0 0 45n 0 50n 3.3 100n 3.3)
 R1 VOUT GND 10k m=1
+R2 vdd3v3 VOUT 10k m=1
 **** begin user architecture code
 
 
@@ -12,8 +13,9 @@
 
 
 .control
-tran 1n 1u
+tran 0.1n 100n
 plot V(vdd3v3) V(VOUT) VIN ENB EN
+plot I(V1) I(V2) I(R1)
 .endc
 
 **** end user architecture code
@@ -31,10 +33,10 @@
 *.opin VOUT
 XM2 VOUT !EN VIN VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.5 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 
++ nrd='0.29 / W' nrs='0.29 / W' sa=0 sb=0 sd=0 mult=15 m=15 
 XM1 VIN EN VOUT VGND sky130_fd_pr__nfet_03v3_nvt L=0.5 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 
++ sa=0 sb=0 sd=0 mult=10 m=10 
 .ends
 
 .GLOBAL GND