analogue switch schematic
diff --git a/xschem/analog_wrapper_tb.sch b/xschem/analog_wrapper_tb.sch
index 736a27c..4d6e2f5 100644
--- a/xschem/analog_wrapper_tb.sch
+++ b/xschem/analog_wrapper_tb.sch
@@ -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 {}
V {}
@@ -88,8 +88,8 @@
C {devices/bus_connect.sym} 510 -50 0 0 {name=l6 lab=io_oeb[16:15]}
C {devices/bus_connect.sym} 600 -50 0 0 {name=l7 lab=io_oeb[12:11]}
C {devices/code_shown.sym} 920 -130 0 0 {name=s1 only_toplevel=false value=".param mc_mm_switch=0
-.lib /usr/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt
-.include /usr/share/pdk/sky130A/libs.ref/sky130_fd_sc_hvl/spice/sky130_fd_sc_hvl.spice
+.lib ~/open_sky130/sky130A/libs.tech/ngspice/sky130.lib.spice tt
+.include ~/open_sky130/sky130A/libs.ref/sky130_fd_sc_hvl/spice/sky130_fd_sc_hvl.spice
.control
tran 10u 20m
plot V(io_out[11]) V(io_out[12]) V(io_out[15]) V(io_out[16])
diff --git a/xschem/analog_wrapper_tb.spice b/xschem/analog_wrapper_tb.spice
index e28a311..cf56980 100644
--- a/xschem/analog_wrapper_tb.spice
+++ b/xschem/analog_wrapper_tb.spice
@@ -66,8 +66,8 @@
**** begin user architecture code
.param mc_mm_switch=0
-.lib /usr/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt
-.include /usr/share/pdk/sky130A/libs.ref/sky130_fd_sc_hvl/spice/sky130_fd_sc_hvl.spice
+.lib ~/open_sky130/sky130A/libs.tech/ngspice/sky130.lib.spice tt
+.include ~/open_sky130/sky130A/libs.ref/sky130_fd_sc_hvl/spice/sky130_fd_sc_hvl.spice
.control
tran 10u 20m
plot V(io_out[11]) V(io_out[12]) V(io_out[15]) V(io_out[16]) V(gpio_analog[3]) V(gpio_analog[7])
@@ -77,8 +77,8 @@
**.ends
* expanding symbol: user_analog_project_wrapper.sym # of pins=32
-* sym_path: /home/tim/gits/caravel_user_project_analog/xschem/user_analog_project_wrapper.sym
-* sch_path: /home/tim/gits/caravel_user_project_analog/xschem/user_analog_project_wrapper.sch
+* sym_path: /home/hss11/winhome/caravel_user_project_analog/xschem/user_analog_project_wrapper.sym
+* sch_path: /home/hss11/winhome/caravel_user_project_analog/xschem/user_analog_project_wrapper.sch
.subckt user_analog_project_wrapper vdda1 vdda2 vssa1 vssa2 vccd1 vccd2 vssd1 vssd2 wb_clk_i
+ wb_rst_i wbs_stb_i wbs_cyc_i wbs_we_i wbs_sel_i[3] wbs_sel_i[2] wbs_sel_i[1] wbs_sel_i[0] wbs_dat_i[31]
+ wbs_dat_i[30] wbs_dat_i[29] wbs_dat_i[28] wbs_dat_i[27] wbs_dat_i[26] wbs_dat_i[25] wbs_dat_i[24] wbs_dat_i[23]
@@ -215,8 +215,8 @@
* expanding symbol: example_por.sym # of pins=6
-* sym_path: /home/tim/gits/caravel_user_project_analog/xschem/example_por.sym
-* sch_path: /home/tim/gits/caravel_user_project_analog/xschem/example_por.sch
+* sym_path: /home/hss11/winhome/caravel_user_project_analog/xschem/example_por.sym
+* sch_path: /home/hss11/winhome/caravel_user_project_analog/xschem/example_por.sch
.subckt example_por vdd3v3 vdd1v8 porb_h porb_l por_l vss
*.iopin vdd3v3
*.iopin vss
@@ -232,14 +232,14 @@
XM2 net2 net3 vss vss sky130_fd_pr__nfet_g5v0d10v5 L=0.8 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29'
+ pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)' nrd='0.29 / W' nrs='0.29 / W'
+ sa=0 sb=0 sd=0 mult=1 m=1
-XR1 net4 vdd3v3 vss sky130_fd_pr__res_xhigh_po_0p69 W=0.69 L=500 mult=1 m=1
+XR1 net4 vdd3v3 vss sky130_fd_pr__res_xhigh_po_0p69 L=500 mult=1 m=1
XM4 net5 net6 vdd3v3 vdd3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.8 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29'
+ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)'
+ nrd='0.29 / W' nrs='0.29 / W' sa=0 sb=0 sd=0 mult=1 m=1
XM5 net3 net3 vss vss sky130_fd_pr__nfet_g5v0d10v5 L=0.8 W=14 nf=7 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
-XR2 vss net4 vss sky130_fd_pr__res_xhigh_po_0p69 W=0.69 L=150 mult=1 m=1
+XR2 vss net4 vss sky130_fd_pr__res_xhigh_po_0p69 L=150 mult=1 m=1
XM7 net2 net2 net1 vdd3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.8 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29'
+ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)'
+ nrd='0.29 / W' nrs='0.29 / W' sa=0 sb=0 sd=0 mult=1 m=1
@@ -261,7 +261,7 @@
XM13 net9 net2 net8 vdd3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.8 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29'
+ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)'
+ nrd='0.29 / W' nrs='0.29 / W' sa=0 sb=0 sd=0 mult=1 m=1
-XR3 vss vss vss sky130_fd_pr__res_xhigh_po_0p69 W=0.69 L=25 mult=2 m=2
+XR3 vss vss vss sky130_fd_pr__res_xhigh_po_0p69 L=25 mult=2 m=2
x2 net10 vss vss vdd3v3 vdd3v3 porb_h sky130_fd_sc_hvl__buf_8
x3 net10 vss vss vdd1v8 vdd1v8 porb_l sky130_fd_sc_hvl__buf_8
x4 net10 vss vss vdd1v8 vdd1v8 por_l sky130_fd_sc_hvl__inv_8
diff --git a/xschem/analogue_switch.sch b/xschem/analogue_switch.sch
new file mode 100644
index 0000000..8345bb3
--- /dev/null
+++ b/xschem/analogue_switch.sch
@@ -0,0 +1,57 @@
+v {xschem version=3.0.0 file_version=1.2 }
+G {}
+K {}
+V {}
+S {}
+E {}
+N 1640 -1110 1670 -1110 { lab=VGND}
+N 1840 -1110 1900 -1110 { lab=VDD3v3}
+N 1790 -1110 1800 -1110 { lab=!EN}
+N 1560 -1110 1600 -1110 { lab=EN}
+N 1740 -1190 1840 -1190 { lab=VIN}
+N 1840 -1190 1840 -1140 { lab=VIN}
+N 1640 -1190 1740 -1190 { lab=VIN}
+N 1640 -1190 1640 -1140 { lab=VIN}
+N 1720 -1220 1740 -1220 { lab=VIN}
+N 1740 -1220 1740 -1190 { lab=VIN}
+N 1640 -1080 1640 -1060 { lab=VOUT}
+N 1840 -1080 1840 -1060 { lab=VOUT}
+N 1640 -1060 1840 -1060 { lab=VOUT}
+N 1700 -1020 1720 -1020 { lab=VOUT}
+N 1700 -1060 1700 -1020 { lab=VOUT}
+C {sky130_fd_pr/pfet_g5v0d10v5.sym} 1820 -1110 0 0 {name=M2
+L=0.5
+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_g5v0d10v5
+spiceprefix=X
+}
+C {devices/iopin.sym} 1670 -1110 0 0 {name=p1 lab=VGND
+}
+C {devices/iopin.sym} 1900 -1110 0 0 {name=p2 lab=VDD3v3}
+C {sky130_fd_pr/nfet_03v3_nvt.sym} 1620 -1110 0 0 {name=M1
+L=0.5
+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_03v3_nvt
+spiceprefix=X
+}
+C {devices/ipin.sym} 1560 -1110 0 0 {name=p3 lab=EN}
+C {devices/ipin.sym} 1720 -1220 0 0 {name=p4 lab=VIN}
+C {devices/ipin.sym} 1790 -1110 0 0 {name=p5 lab=!EN
+}
+C {devices/opin.sym} 1720 -1020 0 0 {name=p6 lab=VOUT}
diff --git a/xschem/analogue_switch.spice b/xschem/analogue_switch.spice
new file mode 100644
index 0000000..f28356e
--- /dev/null
+++ b/xschem/analogue_switch.spice
@@ -0,0 +1,16 @@
+**.subckt analogue_switch VGND VDD3v3 EN VIN !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=1 m=1
+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
+**.ends
+** flattened .save nodes
+.end
diff --git a/xschem/analogue_switch.sym b/xschem/analogue_switch.sym
new file mode 100644
index 0000000..7023422
--- /dev/null
+++ b/xschem/analogue_switch.sym
@@ -0,0 +1,30 @@
+v {xschem version=3.0.0 file_version=1.2}
+K {type=subcircuit
+format="@name @pinlist @symname"
+template="name=x1"
+}
+
+T {@symname} -85.5 -6 0 0 0.3 0.3 {}
+T {@name} 135 -42 0 0 0.2 0.2 {}
+L 4 -130 -30 130 -30 {}
+L 4 -130 30 130 30 {}
+L 4 -130 -30 -130 30 {}
+L 4 130 -30 130 30 {}
+B 5 -152.5 -22.5 -147.5 -17.5 {name=VIN dir=in }
+L 4 -150 -20 -130 -20 {}
+T {VIN} -125 -24 0 0 0.2 0.2 {}
+B 5 147.5 -22.5 152.5 -17.5 {name=VGND dir=inout }
+L 7 130 -20 150 -20 {}
+T {VGND} 125 -24 0 1 0.2 0.2 {}
+B 5 147.5 -2.5 152.5 2.5 {name=VDD3v3 dir=inout }
+L 7 130 0 150 0 {}
+T {VDD3v3} 125 -4 0 1 0.2 0.2 {}
+B 5 -152.5 -2.5 -147.5 2.5 {name=!EN dir=in }
+L 4 -150 0 -130 0 {}
+T {!EN} -125 -4 0 0 0.2 0.2 {}
+B 5 -152.5 17.5 -147.5 22.5 {name=EN dir=in }
+L 4 -150 20 -130 20 {}
+T {EN} -125 16 0 0 0.2 0.2 {}
+B 5 147.5 17.5 152.5 22.5 {name=VOUT dir=out }
+L 4 130 20 150 20 {}
+T {VOUT} 125 16 0 1 0.2 0.2 {}
diff --git a/xschem/analogue_switch_tb.sch b/xschem/analogue_switch_tb.sch
new file mode 100644
index 0000000..27987b1
--- /dev/null
+++ b/xschem/analogue_switch_tb.sch
@@ -0,0 +1,54 @@
+v {xschem version=3.0.0 file_version=1.2 }
+G {}
+K {}
+V {}
+S {}
+E {}
+N 1830 -1100 1920 -1100 { lab=vdd3v3}
+N 1900 -1120 1900 -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 1830 -1080 1840 -1080 { lab=VOUT}
+N 1840 -1080 1840 -1050 { lab=VOUT}
+N 1170 -980 1290 -980 { lab=GND}
+N 1100 -980 1170 -980 { lab=GND}
+N 1170 -1120 1530 -1120 { lab=VIN}
+N 1100 -1120 1100 -1080 { lab=VIN}
+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 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 1490 -1020 1490 -980 { lab=GND}
+N 1250 -1020 1250 -980 { lab=GND}
+N 1100 -1020 1100 -980 { lab=GND}
+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/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
+plot V(vdd3v3) V(VOUT) VIN ENB EN
+.endc"}
+C {devices/vsource.sym} 1100 -1050 0 0 {name=V2 value="SIN(1.5 1 10Meg 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/res.sym} 1840 -1010 0 0 {name=R1
+value=10k
+footprint=1206
+device=resistor
+m=1}
diff --git a/xschem/analogue_switch_tb.spice b/xschem/analogue_switch_tb.spice
new file mode 100644
index 0000000..3c473f1
--- /dev/null
+++ b/xschem/analogue_switch_tb.spice
@@ -0,0 +1,42 @@
+**.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)
+R1 VOUT GND 10k m=1
+**** begin user architecture code
+
+
+.lib ~/open_sky130/sky130A/libs.tech/ngspice/sky130.lib.spice tt
+
+
+.control
+tran 1n 1u
+plot V(vdd3v3) V(VOUT) VIN ENB EN
+.endc
+
+**** end user architecture code
+**.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=1 m=1
+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
+.ends
+
+.GLOBAL GND
+** flattened .save nodes
+.end
diff --git a/xschem/example_por.sch b/xschem/example_por.sch
index cf6e0c3..e60aa48 100644
--- a/xschem/example_por.sch
+++ b/xschem/example_por.sch
@@ -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 {}
V {}
diff --git a/xschem/example_por_tb.sch b/xschem/example_por_tb.sch
index 664018f..cd52a87 100644
--- a/xschem/example_por_tb.sch
+++ b/xschem/example_por_tb.sch
@@ -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 {}
V {}
@@ -6,15 +6,15 @@
E {}
T {Testbench for simple POR} -350 -240 0 0 0.6 0.6 {}
N -280 60 -10 60 { lab=GND}
-N -540 0 -540 60 { lab=#net1}
+N -540 0 -540 60 { lab=GND}
N -330 0 -330 60 { lab=GND}
N -330 -100 -330 -60 { lab=vdd3v3}
N -330 -110 -330 -100 { lab=vdd3v3}
N -210 -110 -40 -110 { lab=vdd3v3}
N -40 -110 -40 -100 { lab=vdd3v3}
N -540 -130 -540 -60 { lab=vdd1v8}
-N -280 -130 20 -130 { lab=#net2}
-N 20 -130 20 -100 { lab=#net2}
+N -280 -130 20 -130 { lab=vdd1v8}
+N 20 -130 20 -100 { lab=vdd1v8}
N 140 -50 180 -50 { lab=porb_h}
N 140 -20 180 -20 { lab=porb_l}
N 140 10 180 10 { lab=por_l}
@@ -22,11 +22,11 @@
N -500 -130 -490 -130 { lab=vdd1v8}
N -540 -130 -500 -130 { lab=vdd1v8}
N -560 -130 -540 -130 { lab=vdd1v8}
-N -540 60 -490 60 { lab=#net1}
-N -490 -130 -280 -130 {}
-N -490 60 -330 60 {}
-N -330 60 -280 60 {}
-N -330 -110 -210 -110 {}
+N -540 60 -490 60 { lab=GND}
+N -490 -130 -280 -130 { lab=vdd1v8}
+N -490 60 -330 60 { lab=GND}
+N -330 60 -280 60 { lab=GND}
+N -330 -110 -210 -110 { lab=vdd3v3}
C {example_por.sym} -10 -20 0 0 {name=x1}
C {devices/gnd.sym} -100 60 0 0 {name=l1 lab=GND}
C {devices/vsource.sym} -330 -30 0 0 {name=V1 value="PWL(0.0 0 100u 0 5m 3.3)"}
@@ -37,8 +37,8 @@
C {devices/opin.sym} 180 -20 0 0 {name=p4 lab=porb_l}
C {devices/opin.sym} 180 10 0 0 {name=p5 lab=por_l}
C {devices/code_shown.sym} -470 140 0 0 {name=s1 only_toplevel=false value=".param mc_mm_switch=0
-.lib /usr/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt
-.include /usr/share/pdk/sky130A/libs.ref/sky130_fd_sc_hvl/spice/sky130_fd_sc_hvl.spice"}
+.lib ~/open_sky130/sky130A/libs.tech/ngspice/sky130.lib.spice tt
+.include ~/open_sky130/sky130A/libs.ref/sky130_fd_sc_hvl/spice/sky130_fd_sc_hvl.spice"}
C {devices/code_shown.sym} -470 250 0 0 {name=s2 only_toplevel=false value=".control
tran 1u 20m
plot V(vdd3v3) V(vdd1v8) V(porb_h) V(porb_l) V(por_l)
diff --git a/xschem/example_por_tb.spice b/xschem/example_por_tb.spice
index 265e666..f043f87 100644
--- a/xschem/example_por_tb.spice
+++ b/xschem/example_por_tb.spice
@@ -10,8 +10,8 @@
**** begin user architecture code
.param mc_mm_switch=0
-.lib /usr/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt
-.include /usr/share/pdk/sky130A/libs.ref/sky130_fd_sc_hvl/spice/sky130_fd_sc_hvl.spice
+.lib ~/open_sky130/sky130A/libs.tech/ngspice/sky130.lib.spice tt
+.include ~/open_sky130/sky130A/libs.ref/sky130_fd_sc_hvl/spice/sky130_fd_sc_hvl.spice
.control
@@ -23,8 +23,8 @@
**.ends
* expanding symbol: example_por.sym # of pins=6
-* sym_path: /home/tim/gits/caravel_user_project_analog/xschem/example_por.sym
-* sch_path: /home/tim/gits/caravel_user_project_analog/xschem/example_por.sch
+* sym_path: /home/hss11/winhome/caravel_user_project_analog/xschem/example_por.sym
+* sch_path: /home/hss11/winhome/caravel_user_project_analog/xschem/example_por.sch
.subckt example_por vdd3v3 vdd1v8 porb_h porb_l por_l vss
*.iopin vdd3v3
*.iopin vss
@@ -40,14 +40,14 @@
XM2 net2 net3 vss vss sky130_fd_pr__nfet_g5v0d10v5 L=0.8 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29'
+ pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)' nrd='0.29 / W' nrs='0.29 / W'
+ sa=0 sb=0 sd=0 mult=1 m=1
-XR1 net4 vdd3v3 vss sky130_fd_pr__res_xhigh_po_0p69 W=0.69 L=500 mult=1 m=1
+XR1 net4 vdd3v3 vss sky130_fd_pr__res_xhigh_po_0p69 L=500 mult=1 m=1
XM4 net5 net6 vdd3v3 vdd3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.8 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29'
+ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)'
+ nrd='0.29 / W' nrs='0.29 / W' sa=0 sb=0 sd=0 mult=1 m=1
XM5 net3 net3 vss vss sky130_fd_pr__nfet_g5v0d10v5 L=0.8 W=14 nf=7 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
-XR2 vss net4 vss sky130_fd_pr__res_xhigh_po_0p69 W=0.69 L=150 mult=1 m=1
+XR2 vss net4 vss sky130_fd_pr__res_xhigh_po_0p69 L=150 mult=1 m=1
XM7 net2 net2 net1 vdd3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.8 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29'
+ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)'
+ nrd='0.29 / W' nrs='0.29 / W' sa=0 sb=0 sd=0 mult=1 m=1
@@ -69,7 +69,7 @@
XM13 net9 net2 net8 vdd3v3 sky130_fd_pr__pfet_g5v0d10v5 L=0.8 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29'
+ as='int((nf+2)/2) * W/nf * 0.29' pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)'
+ nrd='0.29 / W' nrs='0.29 / W' sa=0 sb=0 sd=0 mult=1 m=1
-XR3 vss vss vss sky130_fd_pr__res_xhigh_po_0p69 W=0.69 L=25 mult=2 m=2
+XR3 vss vss vss sky130_fd_pr__res_xhigh_po_0p69 L=25 mult=2 m=2
x2 net10 vss vss vdd3v3 vdd3v3 porb_h sky130_fd_sc_hvl__buf_8
x3 net10 vss vss vdd1v8 vdd1v8 porb_l sky130_fd_sc_hvl__buf_8
x4 net10 vss vss vdd1v8 vdd1v8 por_l sky130_fd_sc_hvl__inv_8