A number of changes in support of correctly reading and extracting the
SkyWater I/O cells.  This set of patches has been a long time in coming!
(1) Corrected the vendor cells for the VDDIO and VSSIO pads such that
the metal3 area under VDDIO_Q and VSSIO_Q, respectively, is separated
by metal resistors.  This allows the overlay cell to contact the
domains while keeping the net names separate.  Changed the SPICE and
CDL netlists to add the metal resistor devices.  (2) Corrected an
issue in the magic tech file that caused some high voltage transistors
in the I/O to get split.  (3) Corrected the netlist for the hvsbt_nor
cell, which had an incorrect count of pFET transistors (each device
has M=2, not M=1).  (4) Modified the netgen entries for metal resistors
to allow a very large tolerance for L and W, based on the assumption
that these are net-splitters, not devices.  This avoids the need to
track down each one and ensure its W and L is correct.  (5) Created an
import Tcl script for the vendor GPIO library that flattens specific
cells to ensure that devices are correctly generated.  (6) Corrected
the units for diodes created by magic's extractor to match the
(bizarre) model units.  (7) Corrected a couple of port ordering issues
in the netlists for the Efabless combined overlay I/O cells.  The
bottom line is that it is now possible to read in the I/O cell library
and extract an LVS clean netlist from a layout using the SkyWater I/O
pads.
diff --git a/VERSION b/VERSION
index ad33520..a208350 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.349
+1.0.350
diff --git a/sky130/Makefile.in b/sky130/Makefile.in
index 1e0748c..2adf348 100644
--- a/sky130/Makefile.in
+++ b/sky130/Makefile.in
@@ -1295,7 +1295,7 @@
 		-cdl %l/cdl/*.cdl \
 		-spice %l/spice/*.spice \
 		-lib %l/lib/*.lib \
-		-gds %l/gds/*.gds options=custom/scripts/gds_import_setup.tcl \
+		-gds %l/gds/*.gds options=custom/scripts/gds_import_io.tcl \
 		-lef %l/lef/*.lef exclude=sky130_fd_io__top_xres4v2.lef \
 			compile-only rename=sky130_ef_io \
 		-lef %l/lef/sky130_fd_io__top_xres4v2.lef \
@@ -1305,6 +1305,18 @@
 		${STAGING_PATH}/${SKY130$*}/libs.ref/${IO_GDS}
 	./custom/scripts/fix_gpiov2_gds.py \
 		${STAGING_PATH}/${SKY130$*}/libs.ref/${IO_GDS}/sky130_fd_io__top_gpiov2.gds
+	# Copy the GDS file for the HVC power pad, then run the script that fixes it.
+	cp ${SKYWATER_LIBS_PATH}/sky130_fd_io/latest/cells/top_power_hvc_wpadv2/sky130_fd_io__top_power_hvc_wpadv2.gds \
+		${STAGING_PATH}/${SKY130$*}/libs.ref/${IO_GDS}
+	./custom/scripts/fix_vddio_pad_gds.py \
+		${STAGING_PATH}/${SKY130$*}/libs.ref/${IO_GDS}/sky130_fd_io__top_power_hvc_wpadv2.gds
+
+	# Copy the GDS file for the HVC ground pad, then run the script that fixes it.
+	cp ${SKYWATER_LIBS_PATH}/sky130_fd_io/latest/cells/top_ground_hvc_wpad/sky130_fd_io__top_ground_hvc_wpad.gds \
+		${STAGING_PATH}/${SKY130$*}/libs.ref/${IO_GDS}
+	./custom/scripts/fix_vssio_pad_gds.py \
+		${STAGING_PATH}/${SKY130$*}/libs.ref/${IO_GDS}/sky130_fd_io__top_ground_hvc_wpad.gds
+
 	# Install SkyWater I/O pad library
 	${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130$*} \
 		-cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
@@ -1320,8 +1332,8 @@
 		-gds %l/latest/cells/*/*.gds compile-only \
 			sort=../common/sort_pdkfiles.py \
 			options=custom/scripts/sky130_fd_io_import.tcl \
-			no-copy=sky130_fd_io__top_gpiov2.gds \
-			include=sky130_fd_io__top_gpiov2.gds \
+			no-copy=sky130_fd_io__top_gpiov2.gds,sky130_fd_io__top_ground_hvc_wpad.gds,sky130_fd_io__top_power_hvc_wpadv2.gds \
+			include=sky130_fd_io__top_gpiov2.gds,sky130_fd_io__top_ground_hvc_wpad.gds,sky130_fd_io__top_power_hvc_wpadv2.gds \
 		-verilog %l/latest/cells/*/*.*.v \
 		-verilog %l/latest/cells/*/*.v exclude=*.*.v,sky130_ef_io.v \
 			compile-only filter=custom/scripts/inc_verilog.py \
diff --git a/sky130/custom/scripts/fix_vddio_pad_gds.py b/sky130/custom/scripts/fix_vddio_pad_gds.py
new file mode 100755
index 0000000..83fffba
--- /dev/null
+++ b/sky130/custom/scripts/fix_vddio_pad_gds.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python3
+#
+# fix_vddio_pad_gds.py ---
+#
+# Special-purpose script that does the work of what ought to be a simple
+# binary diff and patch.  Except that no such thing exists as a standard
+# offering on most Linux systems, so instead of adding another OS
+# package requirement, I'm just writing a binary search-and-replace in
+# python.
+#
+# The purpose of the patch is to add metal3 resistor ID markers to the
+# sky130_fd_io__hvc_clampv2 cell.  Also add labels for VDDIO_Q
+# in the isolated metal3 regions formed by the resistors, in the
+# sky130_fd_io__top_power_hvc_wpadv2 cell.
+#
+
+import sys
+
+if len(sys.argv) != 2:
+    print('Usage:  fix_vddio_pad_gds.py <filename>')
+    sys.exit(1)
+else:
+    file_name = sys.argv[1]
+
+# Metal 3 resistor at (0.495um 63.12um 24.395um 63.56um)
+add_data_1 = b'\x00\x04\x08\x00\x00\x06\x0d\x02\x00\x46\x00\x06\x0e\x02\x00\x0d\x00\x2c\x10\x03\x00\x00\x01\xef\x00\x00\xf6\x90\x00\x00\x5f\x4b\x00\x00\xf6\x90\x00\x00\x5f\x4b\x00\x00\xf8\x48\x00\x00\x01\xef\x00\x00\xf8\x48\x00\x00\x01\xef\x00\x00\xf6\x90\x00\x04\x11\x00'
+
+# Metal 3 resistor at (0.495um 69.07um 24.395um 69.51um)
+add_data_2 = b'\x00\x04\x08\x00\x00\x06\x0d\x02\x00\x46\x00\x06\x0e\x02\x00\x0d\x00\x2c\x10\x03\x00\x00\xc4\xd6\x00\x00\xf6\x90\x00\x01\x22\x32\x00\x00\xf6\x90\x00\x01\x22\x32\x00\x00\xf8\x48\x00\x00\xc4\xd6\x00\x00\xf8\x48\x00\x00\xc4\xd6\x00\x00\xf6\x90\x00\x04\x11\x00'
+
+# Metal 3 resistor at (50.39um 63.12um 74.29um 63.56um)
+add_data_3 = b'\x00\x04\x08\x00\x00\x06\x0d\x02\x00\x46\x00\x06\x0e\x02\x00\x0d\x00\x2c\x10\x03\x00\x00\x01\xef\x00\x01\x0d\xce\x00\x00\x5f\x4b\x00\x01\x0d\xce\x00\x00\x5f\x4b\x00\x01\x0f\x86\x00\x00\x01\xef\x00\x01\x0f\x86\x00\x00\x01\xef\x00\x01\x0d\xce\x00\x04\x11\x00'
+
+# Metal 3 resistor at (50.39um 69.07um 74.29um 69.51um)
+add_data_4 = b'\x00\x04\x08\x00\x00\x06\x0d\x02\x00\x46\x00\x06\x0e\x02\x00\x0d\x00\x2c\x10\x03\x00\x00\xc4\xd6\x00\x01\x0d\xce\x00\x01\x22\x32\x00\x01\x0d\xce\x00\x01\x22\x32\x00\x01\x0f\x86\x00\x00\xc4\xd6\x00\x01\x0f\x86\x00\x00\xc4\xd6\x00\x01\x0d\xce\x00\x04\x11\x00'
+
+# VDDIO_Q label at (67.45um 66.22um) size 0.3um on MET3PIN
+add_data_5 = b'\x00\x04\x0c\x00\x00\x06\x0d\x02\x00\x46\x00\x06\x16\x02\x00\x10\x00\x06\x17\x01\x00\x05\x00\x06\x1a\x01\x00\x00\x00\x0c\x1b\x05\x40\x4c\x66\x66\x66\x66\x66\x66\x00\x0c\x10\x03\x00\x01\x07\x7a\x00\x01\x02\xac\x00\x0c\x19\x06\x56\x44\x44\x49\x4f\x5f\x51\x00\x00\x04\x11\x00'
+
+# VDDIO_Q label at (5.05um 66.22um) size 0.3um on MET3PIN
+add_data_6 = b'\x00\x04\x0c\x00\x00\x06\x0d\x02\x00\x46\x00\x06\x16\x02\x00\x10\x00\x06\x17\x01\x00\x05\x00\x06\x1a\x01\x00\x00\x00\x0c\x1b\x05\x40\x4c\x66\x66\x66\x66\x66\x66\x00\x0c\x10\x03\x00\x00\x13\xba\x00\x01\x02\xac\x00\x0c\x19\x06\x56\x44\x44\x49\x4f\x5f\x51\x00\x00\x04\x11\x00'
+
+# Append metal resistors after this data
+orig_data_1 = b'\x00\x02\x9d\x33\x00\x00\x2b\x1b\x00\x02\x9d\xfb\x00\x00\x2a\x53\x00\x02\x9d\xfb\x00\x00\x2a\x53\x00\x02\x9d\x33\x00\x04\x11\x00'
+
+# Append port labels after this data
+orig_data_2 = b'\x00\x0c\x10\x03\x00\x00\x2d\x1e\x00\x00\x05\x23\x00\x0a\x19\x06\x50\x5f\x43\x4f\x52\x45\x00\x04\x11\x00'
+
+# This is not efficient, but only needs to be done once.
+
+with open(file_name, 'rb') as ifile:
+    data = ifile.read()
+    data = data.replace(orig_data_1, orig_data_1 + add_data_1 + add_data_2 + add_data_3 + add_data_4)
+    data = data.replace(orig_data_2, orig_data_2 + add_data_5 + add_data_6)
+
+# Write back into the same file
+with open(file_name, 'wb') as ofile:
+    ofile.write(data)
+
+print("Done!")
diff --git a/sky130/custom/scripts/fix_vssio_pad_gds.py b/sky130/custom/scripts/fix_vssio_pad_gds.py
new file mode 100755
index 0000000..32e6b17
--- /dev/null
+++ b/sky130/custom/scripts/fix_vssio_pad_gds.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python3
+#
+# fix_vssio_pad_gds.py ---
+#
+# Special-purpose script that does the work of what ought to be a simple
+# binary diff and patch.  Except that no such thing exists as a standard
+# offering on most Linux systems, so instead of adding another OS
+# package requirement, I'm just writing a binary search-and-replace in
+# python.
+#
+# The purpose of the patch is to add metal3 resistor ID markers to the
+# sky130_fd_io__top_ground_hvc_wpad cell.  Also add labels for VDDIO_Q
+# in the isolated metal3 regions formed by the resistors.
+#
+
+import sys
+
+if len(sys.argv) != 2:
+    print('Usage:  fix_vssio_pad_gds.py <filename>')
+    sys.exit(1)
+else:
+    file_name = sys.argv[1]
+
+# Metal 3 resistor at (0.495um 63.12um 24.395um 63.56um)
+add_data_1 = b'\x00\x04\x08\x00\x00\x06\x0d\x02\x00\x46\x00\x06\x0e\x02\x00\x0d\x00\x2c\x10\x03\x00\x00\x01\xef\x00\x00\xf6\x90\x00\x00\x5f\x4b\x00\x00\xf6\x90\x00\x00\x5f\x4b\x00\x00\xf8\x48\x00\x00\x01\xef\x00\x00\xf8\x48\x00\x00\x01\xef\x00\x00\xf6\x90\x00\x04\x11\x00'
+
+# Metal 3 resistor at (0.495um 57.32um 24.395um 57.76um)
+add_data_2 = b'\x00\x04\x08\x00\x00\x06\x0d\x02\x00\x46\x00\x06\x0e\x02\x00\x0d\x00\x2c\x10\x03\x00\x00\xc4\xd6\x00\x00\xf6\x90\x00\x01\x22\x32\x00\x00\xf6\x90\x00\x01\x22\x32\x00\x00\xf8\x48\x00\x00\xc4\xd6\x00\x00\xf8\x48\x00\x00\xc4\xd6\x00\x00\xf6\x90\x00\x04\x11\x00'
+
+# Metal 3 resistor at (50.39um 63.12um 74.29um 63.56um)
+add_data_3 = b'\x00\x04\x08\x00\x00\x06\x0d\x02\x00\x46\x00\x06\x0e\x02\x00\x0d\x00\x2c\x10\x03\x00\x00\x01\xef\x00\x00\xdf\xe8\x00\x00\x5f\x4b\x00\x00\xdf\xe8\x00\x00\x5f\x4b\x00\x00\xe1\xa0\x00\x00\x01\xef\x00\x00\xe1\xa0\x00\x00\x01\xef\x00\x00\xdf\xe8\x00\x04\x11\x00'
+
+# Metal 3 resistor at (50.39um 57.32um 74.29um 57.76um)
+add_data_4 = b'\x00\x04\x08\x00\x00\x06\x0d\x02\x00\x46\x00\x06\x0e\x02\x00\x0d\x00\x2c\x10\x03\x00\x00\xc4\xd6\x00\x00\xdf\xe8\x00\x01\x22\x32\x00\x00\xdf\xe8\x00\x01\x22\x32\x00\x00\xe1\xa0\x00\x00\xc4\xd6\x00\x00\xe1\xa0\x00\x00\xc4\xd6\x00\x00\xdf\xe8\x00\x04\x11\x00'
+
+# VSSIO_Q label at (67.45um 60.34um) size 0.3um on MET3PIN
+add_data_5 = b'\x00\x04\x0c\x00\x00\x06\x0d\x02\x00\x46\x00\x06\x16\x02\x00\x10\x00\x06\x17\x01\x00\x05\x00\x06\x1a\x01\x00\x00\x00\x0c\x1b\x05\x40\x4c\x66\x66\x66\x66\x66\x66\x00\x0c\x10\x03\x00\x01\x07\x7a\x00\x00\xeb\xb4\x00\x0c\x19\x06\x56\x53\x53\x49\x4f\x5f\x51\x00\x00\x04\x11\x00'
+
+# VSSIO_Q label at (5.05um 60.34um) size 0.3um on MET3PIN
+add_data_6 = b'\x00\x04\x0c\x00\x00\x06\x0d\x02\x00\x46\x00\x06\x16\x02\x00\x10\x00\x06\x17\x01\x00\x05\x00\x06\x1a\x01\x00\x00\x00\x0c\x1b\x05\x40\x4c\x66\x66\x66\x66\x66\x66\x00\x0c\x10\x03\x00\x00\x13\xba\x00\x00\xeb\xb4\x00\x0c\x19\x06\x56\x53\x53\x49\x4f\x5f\x51\x00\x00\x04\x11\x00'
+
+# Append after this data
+orig_data = b'\x00\x02\x7d\xd0\x00\x01\x11\xb1\x00\x02\x7e\x98\x00\x01\x10\xe9\x00\x02\x7e\x98\x00\x01\x10\xe9\x00\x02\x7d\xd0\x00\x04\x11\x00'
+
+# This is not efficient, but only needs to be done once.
+
+with open(file_name, 'rb') as ifile:
+    data = ifile.read()
+    data = data.replace(orig_data, orig_data + add_data_1 + add_data_2 + add_data_3 + add_data_4 + add_data_5 + add_data_6)
+
+# Write back into the same file
+with open(file_name, 'wb') as ofile:
+    ofile.write(data)
+
+print("Done!")
diff --git a/sky130/custom/scripts/gds_import_io.tcl b/sky130/custom/scripts/gds_import_io.tcl
new file mode 100644
index 0000000..6602ac9
--- /dev/null
+++ b/sky130/custom/scripts/gds_import_io.tcl
@@ -0,0 +1,42 @@
+# Set the GDS input style to sky130(vendor).  This treats labels on the
+# TXT purpose (5) as pins, which is unfortunately done in a lot of the
+# vendor GDS files.
+cif istyle sky130(vendor)
+#
+gds flatten true
+gds flatglob *_cdns_*
+gds flatglob *sky130_fd_pr__*_example_*
+
+# ! flatten within the 120x2 ESD device
+gds flatglob *sky130_fd_io__gnd2gnd_*
+
+# The following cells have to be flattened for the gpiov2 pad to read in
+# correctly, and produce a layout that can be extracted and generate an
+# LVS clean netlist.
+
+### flatten within the analog mux isolated P region
+gds flatglob *sky130_fd_io__amx*
+gds flatglob *sky130_fd_io__xor*
+gds flatglob *sky130_fd_io__gpiov2_amx*
+gds flatglob *sky130_fd_io__gpiov2_amux*
+
+### flatten within the isolated VSSIO domain
+gds flatglob *sky130_fd_io__feas_com_pupredrvr*
+gds flatglob *sky130_fd_io__com_pupredrvr_strong_slowv2*
+gds flatglob *sky130_fd_io__com_pdpredrvr_pbiasv2*
+gds flatglob *sky130_fd_io__gpiov2_pdpredrvr_strong*
+
+### flatten in opathv2
+gds flatglob *sky130_fd_io__com_pudrvr_strong_slowv2*
+gds flatglob *sky130_fd_io__com_pdpredrvr_strong_slowv2*
+gds flatglob *sky130_fd_io__gpiov2_obpredrvr*
+gds flatglob *sky130_fd_io__hvsbt_*
+
+### flatten in ipath
+gds flatglob *sky130_fd_io__gpiov2_ictl_logic*
+
+### avoid splitting a netlist that passes in contorted ways through the
+### layout hierarchy
+gds flatglob *sky130_fd_io__gpio_pddrvr_strong_slowv2*
+gds flatglob *sky130_fd_io__gpiov2_pddrvr_strong*
+
diff --git a/sky130/custom/sky130_fd_io/cdl/sky130_ef_io.cdl b/sky130/custom/sky130_fd_io/cdl/sky130_ef_io.cdl
index aa141bd..2de7f91 100644
--- a/sky130/custom/sky130_fd_io/cdl/sky130_ef_io.cdl
+++ b/sky130/custom/sky130_fd_io/cdl/sky130_ef_io.cdl
@@ -120,10 +120,6 @@
 + SRC_BDY_HVC VCCD VCCHIB VDDA VDDIO VDDIO_Q
 + VSSA VSSD VSSIO VSSIO_Q VSWITCH
 + sky130_fd_io__top_power_hvc_wpadv2
-Rtest0 VDDIO_Q VDDIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
-Rtest1 VDDIO_Q VDDIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
-Rtest2 VDDIO_Q VDDIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
-Rtest3 VDDIO_Q VDDIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
 
 .ENDS
 
@@ -206,10 +202,6 @@
 + VDDIO SRC_BDY_HVC VCCD VCCHIB VDDA VDDIO VDDIO_Q
 + VSSA VSSD VSSIO VSSIO_Q VSWITCH
 + sky130_fd_io__top_ground_hvc_wpad
-Rtest0 VSSIO_Q VSSIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
-Rtest1 VSSIO_Q VSSIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
-Rtest2 VSSIO_Q VSSIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
-Rtest3 VSSIO_Q VSSIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
 
 .ENDS
 
@@ -430,10 +422,6 @@
 + VSSIO VCCD VCCHIB VDDA VDDIO VDDIO_Q
 + VSSA VSSD VSSIO VSSIO_Q VSWITCH
 + sky130_fd_io__top_power_hvc_wpadv2
-Rtest0 VDDIO_Q VDDIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
-Rtest1 VDDIO_Q VDDIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
-Rtest2 VDDIO_Q VDDIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
-Rtest3 VDDIO_Q VDDIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
 
 .ENDS
 
@@ -454,10 +442,6 @@
 + VDDIO VSSIO VCCD VCCHIB VDDA VDDIO VDDIO_Q
 + VSSA VSSD VSSIO VSSIO_Q VSWITCH
 + sky130_fd_io__top_ground_hvc_wpad
-Rtest0 VSSIO_Q VSSIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
-Rtest1 VSSIO_Q VSSIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
-Rtest2 VSSIO_Q VSSIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
-Rtest3 VSSIO_Q VSSIO sky130_fd_pr__res_generic_m3 w=23.9 l=0.2
 
 .ENDS
 
diff --git a/sky130/custom/sky130_fd_io/spice/sky130_fd_io.spice b/sky130/custom/sky130_fd_io/spice/sky130_fd_io.spice
index ce57405..89596d7 100644
--- a/sky130/custom/sky130_fd_io/spice/sky130_fd_io.spice
+++ b/sky130/custom/sky130_fd_io/spice/sky130_fd_io.spice
@@ -20,8 +20,8 @@
 .ENDS
 
 .SUBCKT sky130_fd_io__gnd2gnd_120x2_lv_isosub BDY2_B2B SRC_BDY_LVC1 VSSD
-D0 SRC_BDY_LVC1 BDY2_B2B sky130_fd_pr__diode_pd2nw_05v5 area=90 pj=33
-D1 BDY2_B2B SRC_BDY_LVC1 sky130_fd_pr__diode_pd2nw_05v5 area=90 pj=33
+D0 SRC_BDY_LVC1 BDY2_B2B sky130_fd_pr__diode_pd2nw_05v5 area=90E+12 pj=132E+6
+D1 BDY2_B2B SRC_BDY_LVC1 sky130_fd_pr__diode_pd2nw_05v5 area=90E+12 pj=132E+6
 .ENDS
 
 .SUBCKT sky130_fd_io__amuxsplitv2_delay ENABLE_VDDA_H HLD_VDDA_H_N HOLD RESET
@@ -1825,7 +1825,7 @@
 XI1 enhs_lat_h_n enhs_lat_h VSSD VSSD VDDIO VDDIO sky130_fd_io__sio_hvsbt_inv_x1
 Xpghspu_q0 PAD PGHS_H net50 TIE_HI VCC_IO_SOFT VPB_DRVR
 + sky130_fd_io__gpio_ovtv2_hotswap_pghspu
-Xclamp_q0 VSSD VDDIO VSSD VDDIO PAD sky130_fd_io__signal_5_sym_hv_local_5term
+Xclamp_q0 VSSD VDDIO VSSD VDDIO PAD VDDIO sky130_fd_io__signal_5_sym_hv_local_5term
 Xpghs12_q0 net54 PADLO VPB_DRVR VPB_DRVR sky130_fd_pr__pfet_g5v0d10v5 m=1 w=3.0
 + l=1.0 mult=1 sa=0.265 sb=0.265 sd=0.28 topography=normal area=0.063 perim=1.14
 .ENDS sky130_fd_io__gpio_ovtv2_hotswap_pghs_i2c_fix
@@ -2911,9 +2911,8 @@
 + sky130_fd_io__com_nor2_dnw
 XI94 nsw_en nsw_enb PD_H[2] PD_H[3] VCC_IO VGND_IO
 + sky130_fd_io__gpio_ovtv2_predrvr_switch
-XI288 N0 net193 VGND_IO sky130_fd_pr__res_generic_nd__hv W=0.5 L=113.375 m=1 isHV=TRUE
+XI288 N0 net193 VGND_IO sky130_fd_pr__res_generic_nd__hv W=0.5 L=113.375 m=1
 XI287 vdiode net190 VGND_IO sky130_fd_pr__res_generic_nd__hv W=0.5 L=113.375 m=1
-+ isHV=TRUE
 XI206 N0 en VGND_IO VGND_IO sky130_fd_pr__nfet_g5v0d10v5 m=1 w=5.0 l=0.5 mult=1
 + sa=0.265 sb=0.265 sd=0.28 topography=normal area=0.063 perim=1.14
 XI190 net531 en VGND_IO VGND_IO sky130_fd_pr__nfet_g5v0d10v5 m=1 w=5.0 l=0.5
@@ -3065,8 +3064,8 @@
 XI70 net531 en VCC_IO VCC_IO sky130_fd_pr__pfet_g5v0d10v5 m=4 w=5.0 l=0.5 mult=1
 + sa=0.265 sb=0.265 sd=0.28 topography=normal area=0.063 perim=1.14
 RI221 net420 vr sky130_fd_pr__res_generic_po W=0.75 L=513.445 m=1
-RI186 SLEW_CTL_H_N[0] mode4b sky130_fd_pr__res_generic_m1 L=1 W=1
-RI157 net247 mode2b sky130_fd_pr__res_generic_m1 L=1 W=1
+RI186 SLEW_CTL_H_N[0] mode4b sky130_fd_pr__res_generic_m1 L=0.035 W=1
+RI157 net247 mode2b sky130_fd_pr__res_generic_m1 L=0.035 W=1
 .ENDS sky130_fd_io__gpio_ovtv2_pdpredrvr_strong_leak_fix
 
 * Copyright 2020 The SkyWater PDK Authors
@@ -6064,9 +6063,9 @@
 
 .SUBCKT sky130_fd_io__hvsbt_nor IN0 IN1 OUT VGND VPWR
 *.PININFO IN0:I IN1:I OUT:O VGND:I VPWR:I
-XI3 net16 IN0 VPWR VPWR sky130_fd_pr__pfet_g5v0d10v5 m=1 w=1.0 l=0.6 mult=2
+XI3 net16 IN0 VPWR VPWR sky130_fd_pr__pfet_g5v0d10v5 m=2 w=1.0 l=0.6 mult=2
 + sa=0.265 sb=0.265 sd=0.28 topography=normal area=0.063 perim=1.14
-XI12 OUT IN1 net16 VPWR sky130_fd_pr__pfet_g5v0d10v5 m=1 w=1.0 l=0.6 mult=2
+XI12 OUT IN1 net16 VPWR sky130_fd_pr__pfet_g5v0d10v5 m=2 w=1.0 l=0.6 mult=2
 + sa=0.265 sb=0.265 sd=0.28 topography=normal area=0.063 perim=1.14
 XI1 OUT IN0 VGND VGND sky130_fd_pr__nfet_g5v0d10v5 m=1 w=0.7 l=0.6 mult=1
 + sa=0.265 sb=0.265 sd=0.28 topography=normal area=0.063 perim=1.14
@@ -6366,8 +6365,8 @@
 + sa=0.0 sb=0.0 sd=0.0 topography=normal area=0.048 perim=0.94
 * RI9 net18 NBODY short
 * RI8 net16 NWELLRING short
-*RI9 net18 NBODY sky130_fd_pr__res_generic_m1 W=0.02 L=0.005
-*RI8 net16 NWELLRING sky130_fd_pr__res_generic_m1 W=0.02 L=0.005
+RI9 net18 NBODY sky130_fd_pr__res_generic_m1 W=0.02 L=0.005
+RI8 net16 NWELLRING sky130_fd_pr__res_generic_m1 W=0.02 L=0.005
 .ENDS sky130_fd_io__signal_5_sym_hv_local_5term
 
 * Copyright 2020 The SkyWater PDK Authors
@@ -7105,9 +7104,9 @@
 * RS0<2> PAD PAD_A_NOESD_H short
 * RS0<1> PAD PAD_A_NOESD_H short
 * RS0<0> PAD PAD_A_NOESD_H short
-RS0<2> PAD PAD_A_NOESD_H sky130_fd_pr__res_generic_m4 W=1 L=1
-RS0<1> PAD PAD_A_NOESD_H sky130_fd_pr__res_generic_m3 W=1 L=1
-RS0<0> PAD PAD_A_NOESD_H sky130_fd_pr__res_generic_m3 W=1 L=1
+RS0<2> PAD PAD_A_NOESD_H sky130_fd_pr__res_generic_m4 W=12.35 L=0.035
+RS0<1> PAD PAD_A_NOESD_H sky130_fd_pr__res_generic_m3 W=1.07 L=0.035
+RS0<0> PAD PAD_A_NOESD_H sky130_fd_pr__res_generic_m3 W=12.37 L=0.035
 .ENDS sky130_fd_io__top_gpiov2
 
 
@@ -7156,6 +7155,7 @@
 + w=7.0 l=0.5 mult=1 sa=0.265 sb=0.265 sd=0.28 topography=normal area=0.063
 + perim=1.14
 RI13 G_PAD G_CORE sky130_fd_pr__res_generic_m5 w=2.5385e+08u l=100000u
+RIQ VSSIO VSSIO_Q sky130_fd_pr__res_generic_m3 w=23.9 l=0.44 M=4
 .ENDS sky130_fd_io__top_ground_hvc_wpad
 
 * Copyright 2020 The SkyWater PDK Authors
@@ -7245,6 +7245,7 @@
 + m=22 w=10.0 l=0.5 mult=1 sa=0.265 sb=0.265 sd=0.28 topography=normal area=0.063
 + perim=1.14
 RI13 P_PAD P_CORE sky130_fd_pr__res_generic_m5 w=2.5385e+08u l=100000u
+RIQ VDDIO VDDIO_Q sky130_fd_pr__res_generic_m3 w=23.9 l=0.44 M=4
 .ENDS sky130_fd_io__top_power_hvc_wpadv2
 
 * Copyright 2020 The SkyWater PDK Authors
@@ -7630,9 +7631,9 @@
 *.PININFO IN:I OUT:O VGND:B
 Xe1_q0 IN sky130_fd_io__xres_tk_emlc
 Xe2_q0 OUT net30 sky130_fd_io__xres_tk_emlo
-Xropti OUT net30 VGND sky130_fd_pr__res_generic_nd W=0.5 L=14 m=1 isHV=FALSE
-Xr1 net30 IN VGND sky130_fd_pr__res_generic_nd W=0.5 L=47 m=1 isHV=FALSE
-Xropto IN IN VGND sky130_fd_pr__res_generic_nd W=0.5 L=14 m=1 isHV=FALSE
+Xropti OUT net30 VGND sky130_fd_pr__res_generic_nd W=0.5 L=14 m=1
+Xr1 net30 IN VGND sky130_fd_pr__res_generic_nd W=0.5 L=47 m=1
+Xropto IN IN VGND sky130_fd_pr__res_generic_nd W=0.5 L=14 m=1
 .ENDS sky130_fd_io__xres_rcfilter_lpf_res_sub
 
 * Copyright 2020 The SkyWater PDK Authors
diff --git a/sky130/magic/sky130.tech b/sky130/magic/sky130.tech
index beb2ff8..9e498cc 100644
--- a/sky130/magic/sky130.tech
+++ b/sky130/magic/sky130.tech
@@ -3056,44 +3056,44 @@
  and HVI,hvcheck
  and mvnsdexpand
 
- templayer hresarea POLY
- and RPM
- grow 3000
-
- templayer uresarea POLY
- and URPM
- grow 3000
+# The following recipes deal with DIFFRES layers expanded over large areas
+# outside the resistor.  Find areas which may have been accidentally
+# captured as a resistor which were supposed to be transistors.
 
  templayer diffresarea DIFFRES
  and-not HVI,hvcheck
  grow 3000
 
- templayer mvdiffresarea DIFFRES
- and HVI,hvcheck
- grow 3000
-
- templayer resarea diffresarea,mvdiffresarea,hresarea,uresarea
-
  layer pfet POLY
- and DIFF
  and diffresarea
+ and DIFF
  and-not NSDM
  and-not STDCELL
+ and-not HVI
+
+ layer mvpfet POLY
+ and diffresarea
+ and DIFF
+ and-not NSDM
+ and-not STDCELL
+ and HVI
 
  layer scpfet POLY
- and DIFF
  and diffresarea
- and-not HVTP
+ and DIFF
  and-not NSDM
+ and-not HVTP
  and STDCELL
 
  layer scpfethvt POLY
- and DIFF
  and diffresarea
- and HVTP
+ and DIFF
  and-not NSDM
+ and HVTP
  and STDCELL
 
+# End of resistor area hack
+
  templayer xpolyterm RPM,URPM
  and POLY
  and-not POLYRES
@@ -3261,6 +3261,7 @@
  and DIFF
  and NSDM
  and DIODE
+ and-not NWELL,nwelcheck
  and-not POLY
  and-not PSDM
  and-not HVI,hvcheck
@@ -3281,6 +3282,7 @@
  and DIFF
  and NSDM
  and DIODE
+ and-not NWELL,nwelcheck
  and-not POLY
  and-not PSDM
  and-not HVI,hvcheck
@@ -3758,6 +3760,7 @@
  templayer ndiccopy CONT
  and LI
  and DIODE
+ and-not NWELL,nwelcheck
  and NSDM
  and-not HVI,hvcheck
 
@@ -6537,15 +6540,16 @@
  device resistor sky130_fd_pr__res_generic_po rmp *poly
  device resistor sky130_fd_pr__res_generic_po mrp1 *poly
 
- device pdiode sky130_fd_pr__diode_pd2nw_05v5 *pdiode nwell a=area p=pj
- device pdiode sky130_fd_pr__diode_pd2nw_05v5_lvt *pdiodelvt nwell a=area p=pj
- device pdiode sky130_fd_pr__diode_pd2nw_05v5_hvt *pdiodehvt nwell a=area p=pj
- device pdiode sky130_fd_pr__diode_pd2nw_11v0 *mvpdiode nwell a=area p=pj
+ # NOTE: SkyWater diode models have bizarre units requiring bizarre scaling
+ device pdiode sky130_fd_pr__diode_pd2nw_05v5 *pdiode nwell a=area*1E12 p=pj*1E6
+ device pdiode sky130_fd_pr__diode_pd2nw_05v5_lvt *pdiodelvt nwell a=area*1E12 p=pj*1E6
+ device pdiode sky130_fd_pr__diode_pd2nw_05v5_hvt *pdiodehvt nwell a=area*1E12 p=pj*1E6
+ device pdiode sky130_fd_pr__diode_pd2nw_11v0 *mvpdiode nwell a=area*1E12 p=pj*1E6
 
- device ndiode sky130_fd_pr__diode_pw2nd_05v5 *ndiode pwell,space/w a=area p=pj
- device ndiode sky130_fd_pr__diode_pw2nd_05v5_lvt *ndiodelvt pwell,space/w a=area p=pj
- device ndiode sky130_fd_pr__diode_pw2nd_05v5_nvt *nndiode pwell,space/w a=area p=pj
- device ndiode sky130_fd_pr__diode_pw2nd_11v0 *mvndiode pwell,space/w a=area p=pj
+ device ndiode sky130_fd_pr__diode_pw2nd_05v5 *ndiode pwell,space/w a=area*1E12 p=pj*1E6
+ device ndiode sky130_fd_pr__diode_pw2nd_05v5_lvt *ndiodelvt pwell,space/w a=area*1E12 p=pj*1E6
+ device ndiode sky130_fd_pr__diode_pw2nd_05v5_nvt *nndiode pwell,space/w a=area*1E12 p=pj*1E6
+ device ndiode sky130_fd_pr__diode_pw2nd_11v0 *mvndiode pwell,space/w a=area*1E12 p=pj*1E6
 
 #ifdef RERAM
  device csubcircuit sky130_fd_pr__reram_reram_cell reram m1 a=area_ox
@@ -6623,15 +6627,16 @@
  device resistor mrdp_hv   mvpdiffres *mvpdiff 
  device resistor sky130_fd_pr__res_iso_pw   rpw    pwell
 
- device ndiode sky130_fd_pr__diode_pw2nd_05v5 *ndiode pwell,space/w a=area p=pj
- device ndiode sky130_fd_pr__diode_pw2nd_05v5_lvt *ndiodelvt pwell,space/w a=area p=pj
- device ndiode sky130_fd_pr__diode_pw2nd_05v5_nvt *nndiode pwell,space/w a=area p=pj
- device ndiode sky130_fd_pr__diode_pw2nd_11v0 *mvndiode pwell,space/w a=area p=pj
+ # NOTE: SkyWater diode models have bizarre units requiring bizarre scaling
+ device ndiode sky130_fd_pr__diode_pw2nd_05v5 *ndiode pwell,space/w a=area*1E12 p=pj*1E6
+ device ndiode sky130_fd_pr__diode_pw2nd_05v5_lvt *ndiodelvt pwell,space/w a=area*1E12 p=pj*1E6
+ device ndiode sky130_fd_pr__diode_pw2nd_05v5_nvt *nndiode pwell,space/w a=area*1E12 p=pj*1E6
+ device ndiode sky130_fd_pr__diode_pw2nd_11v0 *mvndiode pwell,space/w a=area*1E12 p=pj*1E6
 
- device pdiode sky130_fd_pr__diode_pd2nw_05v5 *pdiode nwell a=area p=pj
- device pdiode sky130_fd_pr__diode_pd2nw_05v5_lvt *pdiodelvt nwell a=area p=pj
- device pdiode sky130_fd_pr__diode_pd2nw_05v5_hvt *pdiodehvt nwell a=area p=pj
- device pdiode sky130_fd_pr__diode_pd2nw_11v0 *mvpdiode nwell a=area p=pj
+ device pdiode sky130_fd_pr__diode_pd2nw_05v5 *pdiode nwell a=area*1E12 p=pj*1E6
+ device pdiode sky130_fd_pr__diode_pd2nw_05v5_lvt *pdiodelvt nwell a=area*1E12 p=pj*1E6
+ device pdiode sky130_fd_pr__diode_pd2nw_05v5_hvt *pdiodehvt nwell a=area*1E12 p=pj*1E6
+ device pdiode sky130_fd_pr__diode_pd2nw_11v0 *mvpdiode nwell a=area*1E12 p=pj*1E6
 
  device bjt sky130_fd_pr__npn_05v5_W1p00L1p00 npn *ndiff dnwell space/w error +npn1p00
  device bjt sky130_fd_pr__npn_05v5_W1p00L2p00 npn *ndiff dnwell space/w error +npn2p00
diff --git a/sky130/netgen/sky130_setup.tcl b/sky130/netgen/sky130_setup.tcl
index 4ff7132..f7a3c8d 100644
--- a/sky130/netgen/sky130_setup.tcl
+++ b/sky130/netgen/sky130_setup.tcl
@@ -75,19 +75,11 @@
 }
 
 #-------------------------------------------
-# MRM (metal) resistors and poly resistor
+# poly resistor
 #-------------------------------------------
 
 set devices {}
 lappend devices sky130_fd_pr__res_generic_po
-lappend devices sky130_fd_pr__res_generic_l1
-lappend devices sky130_fd_pr__res_generic_m1
-lappend devices sky130_fd_pr__res_generic_m2
-lappend devices sky130_fd_pr__res_generic_m3
-#ifdef METAL5
-lappend devices sky130_fd_pr__res_generic_m4
-lappend devices sky130_fd_pr__res_generic_m5
-#endif (METAL5)
 
 foreach dev $devices {
     if {[lsearch $cells1 $dev] >= 0} {
@@ -119,6 +111,49 @@
 }
 
 #-------------------------------------------
+# MRM (metal) resistors
+#-------------------------------------------
+
+set devices {}
+lappend devices sky130_fd_pr__res_generic_l1
+lappend devices sky130_fd_pr__res_generic_m1
+lappend devices sky130_fd_pr__res_generic_m2
+lappend devices sky130_fd_pr__res_generic_m3
+#ifdef METAL5
+lappend devices sky130_fd_pr__res_generic_m4
+lappend devices sky130_fd_pr__res_generic_m5
+#endif (METAL5)
+
+foreach dev $devices {
+    if {[lsearch $cells1 $dev] >= 0} {
+	permute "-circuit1 $dev" end_a end_b
+	property "-circuit1 $dev" series enable
+	property "-circuit1 $dev" series {w critical}
+	property "-circuit1 $dev" series {l add}
+	property "-circuit1 $dev" parallel enable
+	property "-circuit1 $dev" parallel {l critical}
+	property "-circuit1 $dev" parallel {w add}
+	property "-circuit1 $dev" parallel {value par}
+	property "-circuit1 $dev" tolerance {l 10.0} {w 10.0}
+	# Ignore these properties
+	property "-circuit1 $dev" delete mult
+    }
+    if {[lsearch $cells2 $dev] >= 0} {
+	permute "-circuit2 $dev" end_a end_b
+	property "-circuit2 $dev" series enable
+	property "-circuit2 $dev" series {w critical}
+	property "-circuit2 $dev" series {l add}
+	property "-circuit2 $dev" parallel enable
+	property "-circuit2 $dev" parallel {l critical}
+	property "-circuit2 $dev" parallel {w add}
+	property "-circuit2 $dev" parallel {value par}
+	property "-circuit2 $dev" tolerance {l 10.0} {w 10.0}
+	# Ignore these properties
+	property "-circuit2 $dev" delete mult
+    }
+}
+
+#-------------------------------------------
 # (MOS) transistors
 #-------------------------------------------
 
diff --git a/sky130/sky130.json b/sky130/sky130.json
index b4818c2..58db566 100644
--- a/sky130/sky130.json
+++ b/sky130/sky130.json
@@ -92,7 +92,7 @@
         "magic": "MAGIC_COMMIT"
     },
     "reference": {
-        "open_pdks": "a56526bfe45971322526978132b059d43ddd3a02",
+        "open_pdks": "0059588eebfc704681dc2368bd1d33d96281d10f",
         "magic": "94daf986ab9aa94a9ae2ac3539fa5def9bd2a1ac",
         "skywater_pdk": "f70d8ca46961ff92719d8870a18a076370b85f6c",
         "sky130_osu_sc_t12": "ac90ef0c622a9377a16b5218d9da3ac4169eeaaf",
@@ -100,8 +100,8 @@
         "sky130_osu_sc_t18": "aa2b509f3c8f32ea94fdb55ac9768754667c1658",
         "sky130_sram_macros": "c2333394e0b0b9d9d71185678a8d8087715d5e3b",
         "sky130_ml_xx_hd": "6eb3b0718552b034f1bf1870285ff135e3fb2dcb",
-        "xschem_sky130": "35af1ae750d109b78533399a3cb639be5a3f50e4",
-        "klayout_sky130": "40fe0f615dbc3f50aa394bd9ed7df3577e295b9d",
+        "xschem_sky130": "e312df7b032ca57ee3d36987bedae4192a9409db",
+        "klayout_sky130": "424fefe541fdcd35699a43cd5f174619f6f61e75",
         "precheck_sky130": "76cf0a9bb0407cae712b253f9dd291167568e712"
     }
 }
\ No newline at end of file