Added initial support in magic for 16V devices (LDNMOS and LDPMOS).
There is no "cifinput" section support for the devices, and the
device generator does not correctly draw fingered devices, but this
is a good initial pass.  Also:  Added the reram library to the
sky130B PDK build.  This at least gets the (uncompiled) verilog-A
model into the PDK, but a lot of work remains.  Finally:  Updated
the references to catch some recent updates, such as the xschem
symbols for sky130 "high" and "xhigh" resistors.
diff --git a/VERSION b/VERSION
index d5d91cf..79d76bb 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.453
+1.0.454
diff --git a/gf180mcu/Makefile.in b/gf180mcu/Makefile.in
index ac291f0..cff8005 100644
--- a/gf180mcu/Makefile.in
+++ b/gf180mcu/Makefile.in
@@ -1200,10 +1200,6 @@
 			filter=custom/scripts/fix_io_lef.py \
 		-verilog cells/*/*.v compile-only \
 		-library general gf180mcu_fd_io 2>&1 | tee -a ${GF180MCU$*}_make.log
-	# Quick solution to extraction issue---add the isolated substrate layer
-	# in the corner clamp cell that contains the devices being isolated.
-	${ADDLAYER} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_io ESD_CLAMP_COR \
-		isosubstrate "-42 43458 56113 57130 40932 43016 57057 55812" -mag
 
 sram-%:
 	# Install SRAM macros from vendor files
diff --git a/gf180mcu/gf180mcu.json b/gf180mcu/gf180mcu.json
index 61a7cde..fe894c7 100644
--- a/gf180mcu/gf180mcu.json
+++ b/gf180mcu/gf180mcu.json
@@ -89,11 +89,11 @@
         "magic": "MAGIC_COMMIT"
     },
     "reference": {
-        "open_pdks": "10d637bc671d3859099970970ec059caccd83cab",
-        "magic": "22fbb2865682485b9c4a1a5803af65d44c3585c6",
+        "open_pdks": "559a117b163cef2f920f33f30f6f690aa0b47e4c",
+        "magic": "610c86a2340701e49ac23654f81233bedf6724fa",
         "gf180mcu_pdk": "a897aa30369d3bcec87d9d50ce9b01f320f854ef",
         "gf180mcu_fd_pr": "9f7a3d4dcd4db06014f8cd648753ed1c8c69a1cf",
-        "gf180mcu_fd_pv": "3ecd6ca451c6dfafb99ed334e0847a2e372f802d",
+        "gf180mcu_fd_pv": "e9410df04da5b64a1053aa6e5180dc144b8a12a2",
         "gf180mcu_fd_io": "2aeec51ea2824b6cc0b396acfc39f4535f40b23a",
         "gf180mcu_fd_sc_mcu7t5v0": "8743b6f9641eb8707179c4e51703380d4dc90f16",
         "gf180mcu_fd_sc_mcu9t5v0": "376ea56fa36ce7702595ce4e0e3c9357ee38c81c",
diff --git a/scripts/configure b/scripts/configure
index 94ba333..89440df 100755
--- a/scripts/configure
+++ b/scripts/configure
@@ -601,6 +601,7 @@
 SKY130_OSU_T18_PATH
 SKY130_OSU_T15_PATH
 SKY130_OSU_T12_PATH
+SKY130_FD_PR_RERAM_PATH
 SKY130_FD_BD_SRAM_PATH
 SKY130_SRAM_MACROS_PATH
 PRECHECK_SKY130_PATH
@@ -714,6 +715,7 @@
 enable_precheck_sky130
 enable_sram_sky130
 enable_sram_space_sky130
+enable_reram_sky130
 enable_osu_t12_sky130
 enable_osu_t15_sky130
 enable_osu_t18_sky130
@@ -1432,6 +1434,9 @@
   --enable-sram-space-sky130[=path]
                           Install sky130_fd_bd_sram. If path is omitted, the repository
                           will be downloaded. [default=disabled]
+  --enable-reram-sky130[=path]
+                          Install sky130_fd_pr_reram. If path is omitted, the repository
+                          will be downloaded. [default=disabled]
   --enable-osu-t12-sky130[=path]
                           Install sky130_osu_t12. If path is omitted, the repository
                           will be downloaded. [default=disabled]
@@ -3381,6 +3386,47 @@
 
     # echo target targetvar flag location
 
+    SKY130_FD_PR_RERAM_PATH=""
+
+    # Check whether --enable-reram-sky130 was given.
+if test "${enable_reram_sky130+set}" = set; then :
+  enableval=$enable_reram_sky130;
+            if test "$enableval" == "yes" -o "$enableval" == "YES"; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: Package 'sky130_fd_pr_reram' will be installed automatically during make." >&5
+$as_echo "$as_me: Package 'sky130_fd_pr_reram' will be installed automatically during make." >&6;}
+        	export SKY130_FD_PR_RERAM_PATH=../sources/sky130_fd_pr_reram
+            elif test "$enableval" == "no" -o "$enableval" == "NO"; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling package 'sky130_fd_pr_reram'" >&5
+$as_echo "$as_me: Disabling package 'sky130_fd_pr_reram'" >&6;}
+    		export SKY130_FD_PR_RERAM_PATH=""
+            else
+                SKY130_FD_PR_RERAM_PATH=$enableval
+                { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling package 'sky130_fd_pr_reram' at $SKY130_FD_PR_RERAM_PATH" >&5
+$as_echo "$as_me: Enabling package 'sky130_fd_pr_reram' at $SKY130_FD_PR_RERAM_PATH" >&6;}
+            fi
+            SKY130_FD_PR_RERAM_PATH=`realpath $SKY130_FD_PR_RERAM_PATH`
+
+else
+
+            { $as_echo "$as_me:${as_lineno-$LINENO}: Package 'sky130_fd_pr_reram' will not be installed." >&5
+$as_echo "$as_me: Package 'sky130_fd_pr_reram' will not be installed." >&6;}
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+    # echo target targetvar flag location
+
     SKY130_OSU_T12_PATH=""
 
     # Check whether --enable-osu-t12-sky130 was given.
diff --git a/scripts/configure.ac b/scripts/configure.ac
index 9709351..e3fbad5 100755
--- a/scripts/configure.ac
+++ b/scripts/configure.ac
@@ -247,6 +247,7 @@
 # SkyWater sky130 optional
 M4_OPT_INSTALLATION(sky130_sram_macros, sram-sky130, ../sources)
 M4_OPT_INSTALLATION(sky130_fd_bd_sram, sram-space-sky130, ../sources)
+M4_OPT_INSTALLATION(sky130_fd_pr_reram, reram-sky130, ../sources)
 M4_OPT_INSTALLATION(sky130_osu_t12, osu-t12-sky130, ../sources)
 M4_OPT_INSTALLATION(sky130_osu_t15, osu-t15-sky130, ../sources)
 M4_OPT_INSTALLATION(sky130_osu_t18, osu-t18-sky130, ../sources)
diff --git a/sky130/Makefile.in b/sky130/Makefile.in
index 199e3bc..99a6611 100644
--- a/sky130/Makefile.in
+++ b/sky130/Makefile.in
@@ -165,6 +165,11 @@
 #		specified, then the OSU standard cell library will be
 #		clones from the repository and installed.
 #
+#	--enable-reram-sky130[=<path>]
+#		If enabled, install the sky130_fd_pr_reram library from
+#		google on github.  If <path> is not specified, then the
+#		library will be cloned from the repository and installed.
+#
 # The variables below are substituted from the configuration options:
 #
 #	EF_STYLE: 1 for efabless style, 0 otherwise
@@ -284,6 +289,7 @@
 PRECHECK_PATH = @PRECHECK_SKY130_PATH@
 SRAM_PATH = @SKY130_SRAM_MACROS_PATH@
 SRAM_SPACE_PATH = @SKY130_FD_BD_SRAM_PATH@
+RERAM_PATH = @SKY130_FD_PR_RERAM_PATH@
 OSU_T12_PATH = @SKY130_OSU_T12_PATH@
 OSU_T15_PATH = @SKY130_OSU_T15_PATH@
 OSU_T18_PATH = @SKY130_OSU_T18_PATH@
@@ -316,6 +322,7 @@
 PRECHECK_URL = ${EF_URL}/mpw_precheck
 SRAM_URL =     ${EF_URL}/sky130_sram_macros
 SRAM_SPACE_URL = ${GOOGLE_URL}/skywater-pdk/libs/sky130_fd_bd_sram
+RERAM_URL =    ${GOOGLE_URL}/skywater-pdk/libs/sky130_fd_pr_reram
 OSU_T12_URL =  ${GOOGLE_URL}/skywater-pdk/libs/sky130_osu_sc_t12
 OSU_T15_URL =  ${GOOGLE_URL}/skywater-pdk/libs/sky130_osu_sc_t15
 OSU_T18_URL =  ${GOOGLE_URL}/skywater-pdk/libs/sky130_osu_sc_t18
@@ -440,6 +447,11 @@
 else
     COMMIT_DEFS += -DSRAM_SPACE_COMMIT=$(shell cd ${SRAM_SPACE_PATH} ; git rev-parse HEAD)
 endif
+ifeq (${RERAM_PATH},)
+    COMMIT_DEFS += -DRERAM_COMMIT="unknown"
+else
+    COMMIT_DEFS += -DRERAM_COMMIT=$(shell cd ${RERAM_PATH} ; git rev-parse HEAD)
+endif
 ifeq (${OSU_T12_PATH},)
     COMMIT_DEFS += -DOSU_T12_COMMIT="unknown"
 else
@@ -668,7 +680,7 @@
 	../common/save_commit_refs.py ${COMMIT_DEFS} ${TECH}.json
 
 # Handle prerequisites (fetch and install the PDK and requested libraries)
-prerequisites: pr-repo io-repo sc-hd-repo sc-hdll-repo sc-hvl-repo sc-hs-repo sc-ms-repo sc-ls-repo sc-lp-repo alpha-repo xschem-repo klayout-repo precheck-repo sram-repo sram-space-repo osu-t12-repo osu-t15-repo osu-t18-repo
+prerequisites: pr-repo io-repo sc-hd-repo sc-hdll-repo sc-hvl-repo sc-hs-repo sc-ms-repo sc-ls-repo sc-lp-repo alpha-repo xschem-repo klayout-repo precheck-repo sram-repo sram-space-repo reram-repo osu-t12-repo osu-t15-repo osu-t18-repo
 
 pr-repo:
 	if test "x${REFERENCE_JSON}" != "x"; then \
@@ -826,6 +838,19 @@
 		fi ; \
 	fi
 
+reram-repo:
+	if test "x${REFERENCE_JSON}" != "x"; then \
+		RERAM_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_fd_pr_reram | grep -v COMMIT | cut -d'"' -f4` ; \
+	fi
+	if test "x${RERAM_PATH}" != "x" ; then \
+		if test -d "${RERAM_PATH}" ; then \
+			echo "Using existing installation of RERAM library from ${RERAM_PATH}" ; \
+		else \
+			echo "Downloading RERAM library from ${RERAM_URL}" ; \
+			../scripts/download.sh ${RERAM_URL} ${RERAM_PATH} $${RERAM_COMMIT} ; \
+		fi ; \
+	fi
+
 xschem-repo:
 	if test "x${REFERENCE_JSON}" != "x"; then \
 		XSCHEM_COMMIT=`cat ${REFERENCE_JSON} | grep xschem_sky130 | grep -v COMMIT | cut -d'"' -f4` ; \
@@ -979,6 +1004,12 @@
 		../scripts/update.sh ${SRAM_SPACE_PATH} ; \
 	fi
 
+update-reram-repo:
+	if test "x${RERAM_PATH}" != "x" ; then \
+		echo "Updating RERAM library from ${RERAM_URL}" ; \
+		../scripts/update.sh ${RERAM_PATH} ; \
+	fi
+
 update-xschem-repo:
 	if test "x${XSCHEM_PATH}" != "x" ; then \
 		echo "Updating xschem setup from ${XSCHEM_URL}" ; \
@@ -1365,9 +1396,10 @@
 	${CPP} -quiet ${SKY130$*_DEFS} openlane/sky130_osu_sc_t18/tracks.info \
 		${OPENLANE_STAGING_$*}/sky130_osu_sc_t18/tracks.info
 
+# NOTE: ReRAM is not in variant A so there is no reram-build-A.
 vendor-A: primitive-build-A io-build-A sram-build-A sram-space-build-A digital-hd-build-A digital-hvl-build-A digital-hdll-build-A digital-lp-build-A digital-hs-build-A digital-ms-build-A digital-ls-build-A alpha-build-A osu-t12-build-A osu-t15-build-A osu-t18-build-A
 
-vendor-B: primitive-build-B io-build-B sram-build-B sram-space-build-B digital-hd-build-B digital-hvl-build-B digital-hdll-build-B digital-lp-build-B digital-hs-build-B digital-ms-build-B digital-ls-build-B alpha-build-B osu-t12-build-B osu-t15-build-B osu-t18-build-B
+vendor-B: primitive-build-B io-build-B sram-build-B sram-space-build-B reram-build-B digital-hd-build-B digital-hvl-build-B digital-hdll-build-B digital-lp-build-B digital-hs-build-B digital-ms-build-B digital-ls-build-B alpha-build-B osu-t12-build-B osu-t15-build-B osu-t18-build-B
 
 primitive-build-%:
 	if test "x${SKY130_PR_PATH}" != "x" ; then \
@@ -1459,6 +1491,12 @@
 		make sram-space-$* ; \
 	fi
 
+reram-build-%:
+	if test "x${RERAM_PATH}" != "x" ; then \
+		echo "Building RERAM library" ; \
+		make reram-$* ; \
+	fi
+
 osu-t12-build-%:
 	if test "x${OSU_T12_PATH}" != "x" ; then \
 		echo "Building OSU 12-track-high standard cell library" ; \
@@ -1856,6 +1894,16 @@
 		-spice %l/cells/*/*.lvs.calibre.spice compile-only \
 		-library general sky130_fd_bd_sram 2>&1 | tee -a ${SKY130$*}_make.log
 
+reram-%:
+	# Install RERAM library.
+	${STAGE} -source ${RERAM_PATH}/.. -target ${STAGING_PATH}/${SKY130$*} \
+		-gds %l/cells/*/*.gds \
+		-spice %l/cells/*/*.spice \
+		-verilog %l/cells/*/*.va \
+		-library general sky130_fd_pr_reram 2>&1 | tee -a ${SKY130$*}_make.log
+	${ADDPROP} ${STAGING_PATH}/${SKY130$*} sky130_fd_pr_reram \
+		sky130_fd_pr_reram__reram_cell "device primitive"
+
 osu-t12-%:
 	# Install OSU T12 hs digital standard cells.
 	${STAGE} -source ${OSU_T12_PATH} -target ${STAGING_PATH}/${SKY130$*} \
diff --git a/sky130/magic/sky130.tcl b/sky130/magic/sky130.tcl
index 48367fa..69465d4 100644
--- a/sky130/magic/sky130.tcl
+++ b/sky130/magic/sky130.tcl
@@ -98,11 +98,11 @@
    magic::add_toolkit_command $layoutframe "pmos (MOSFET)" \
 	    "magic::gencell sky130::sky130_fd_pr__pfet_01v8" pdk1
 
-   # magic::add_toolkit_separator	$layoutframe pdk1
-   # magic::add_toolkit_command $layoutframe "LDNMOS (extended drain)" \
-   #	    "magic::gencell sky130::sky130_fd_pr__nfet_g5v0d16v0" pdk1
-   # magic::add_toolkit_command $layoutframe "LDPMOS (extended drain)" \
-   #	    "magic::gencell sky130::sky130_fd_pr__pfet_g5v0d16v0" pdk1
+   magic::add_toolkit_separator	$layoutframe pdk1
+   magic::add_toolkit_command $layoutframe "LDNMOS (extended drain)" \
+   	    "magic::gencell sky130::sky130_fd_pr__nfet_g5v0d16v0" pdk1
+   magic::add_toolkit_command $layoutframe "LDPMOS (extended drain)" \
+   	    "magic::gencell sky130::sky130_fd_pr__pfet_g5v0d16v0" pdk1
 
    magic::add_toolkit_separator	$layoutframe pdk1
    magic::add_toolkit_command $layoutframe "n-diode" \
@@ -3033,6 +3033,7 @@
     set end_contact_type ""	;# no contacts for metal resistors
     set end_overlap_cont 0	;# additional end overlap on sides
     set vias 0			;# add vias over contacts
+    set l_delta 0		;# delta between measured and drawn length
     set res_idtype none
 
     # Set a local variable for each parameter (e.g., $l, $w, etc.)
@@ -3044,6 +3045,9 @@
 	set end_contact_size $contact_size
     }
 
+    # Modify drawn length by the delta length
+    set l [+ $l [* $l_delta 2.0]]
+
     # Draw the resistor and endcaps
     pushbox
     box size 0 0
@@ -3643,6 +3647,7 @@
 	    res_diff_spacing	$gresdiff_spacing \
 	    mask_clearance	-2.16 \
 	    overlap_compress	0.36 \
+	    l_delta		-0.08 \
     ]
     set drawdict [dict merge $sky130::ruleset $newdict $parameters]
     return [sky130::res_draw $drawdict]
@@ -3715,6 +3720,7 @@
 	    res_diff_spacing	$gresdiff_spacing \
 	    mask_clearance	0.52 \
 	    overlap_compress	0.36 \
+	    l_delta		-0.08 \
     ]
     set drawdict [dict merge $sky130::ruleset $newdict $parameters]
     return [sky130::res_draw $drawdict]
@@ -3787,6 +3793,7 @@
 	    res_diff_spacing	$gresdiff_spacing \
 	    mask_clearance	0.52 \
 	    overlap_compress	0.36 \
+	    l_delta		-0.08 \
     ]
     set drawdict [dict merge $sky130::ruleset $newdict $parameters]
     return [sky130::res_draw $drawdict]
@@ -3859,6 +3866,7 @@
 	    res_diff_spacing	$gresdiff_spacing \
 	    mask_clearance	0.52 \
 	    overlap_compress	0.36 \
+	    l_delta		-0.08 \
     ]
     set drawdict [dict merge $sky130::ruleset $newdict $parameters]
     return [sky130::res_draw $drawdict]
@@ -3931,6 +3939,7 @@
 	    res_diff_spacing	$gresdiff_spacing \
 	    mask_clearance	0.52 \
 	    overlap_compress	0.36 \
+	    l_delta		-0.08 \
     ]
     set drawdict [dict merge $sky130::ruleset $newdict $parameters]
     return [sky130::res_draw $drawdict]
@@ -4005,6 +4014,7 @@
 	    res_diff_spacing	$gresdiff_spacing \
 	    mask_clearance	0.52 \
 	    overlap_compress	0.36 \
+	    l_delta		-0.08 \
     ]
     set drawdict [dict merge $sky130::ruleset $newdict $parameters]
     return [sky130::res_draw $drawdict]
@@ -4079,6 +4089,7 @@
 	    res_diff_spacing	$gresdiff_spacing \
 	    mask_clearance	0.52 \
 	    overlap_compress	0.36 \
+	    l_delta		-0.08 \
     ]
     set drawdict [dict merge $sky130::ruleset $newdict $parameters]
     return [sky130::res_draw $drawdict]
@@ -4151,6 +4162,7 @@
 	    res_diff_spacing	$gresdiff_spacing \
 	    mask_clearance	0.52 \
 	    overlap_compress	0.36 \
+	    l_delta		-0.08 \
     ]
     set drawdict [dict merge $sky130::ruleset $newdict $parameters]
     return [sky130::res_draw $drawdict]
@@ -4223,6 +4235,7 @@
 	    res_diff_spacing	$gresdiff_spacing \
 	    mask_clearance	0.52 \
 	    overlap_compress	0.36 \
+	    l_delta		-0.08 \
     ]
     set drawdict [dict merge $sky130::ruleset $newdict $parameters]
     return [sky130::res_draw $drawdict]
@@ -4295,6 +4308,7 @@
 	    res_diff_spacing	$gresdiff_spacing \
 	    mask_clearance	0.52 \
 	    overlap_compress	0.36 \
+	    l_delta		-0.08 \
     ]
     set drawdict [dict merge $sky130::ruleset $newdict $parameters]
     return [sky130::res_draw $drawdict]
@@ -4367,6 +4381,7 @@
 	    res_diff_spacing	$gresdiff_spacing \
 	    mask_clearance	0.52 \
 	    overlap_compress	0.36 \
+	    l_delta		-0.08 \
     ]
     set drawdict [dict merge $sky130::ruleset $newdict $parameters]
     return [sky130::res_draw $drawdict]
@@ -4994,9 +5009,10 @@
 
 proc sky130::sky130_fd_pr__pfet_g5v0d16v0_defaults {} {
     return {w 5.00 l 1.050 m 1 nf 1 diffcov 100 polycov 100 \
-		tbcov 100 rlcov 100 topc 1 botc 1 \
-		poverlap 0 doverlap 0 lmin 1.050 wmin 5.00 \
-		viasrc 100 viadrn 100 viagate 100 }
+		guard 1 glc 1 grc 1 gtc 1 gbc 1 tbcov 100 rlcov 100 \
+		topc 1 botc 1 poverlap 0 doverlap 0 lmin 1.050 wmin 5.00 \
+		full_metal 1 viasrc 100 viadrn 100 viagate 100 \
+		viagb 0 viagr 0 viagl 0 viagt 0}
 }
 
 #----------------------------------------------------------------
@@ -5078,9 +5094,10 @@
 
 proc sky130::sky130_fd_pr__nfet_g5v0d16v0_defaults {} {
     return {w 5.00 l 1.055 m 1 nf 1 diffcov 100 polycov 100 \
-		tbcov 100 rlcov 100 topc 1 botc 1 \
-		poverlap 0 doverlap 0 lmin 1.055 wmin 5.00 \
-		viasrc 100 viadrn 100 viagate 100 }
+		guard 1 glc 1 grc 1 gtc 1 gbc 1 tbcov 100 rlcov 100 \
+		topc 1 botc 1 poverlap 0 doverlap 0 lmin 1.050 wmin 5.00 \
+		full_metal 1 viasrc 100 viadrn 100 viagate 100 \
+		viagb 0 viagr 0 viagl 0 viagt 0}
 }
 
 #----------------------------------------------------------------
@@ -5749,6 +5766,80 @@
 #----------------------------------------------------------------
 
 proc sky130::draw_ldnmos_drain {parameters} {
+
+    # Set a local variable for each parameter (e.g., $l, $w, etc.)
+    foreach key [dict keys $parameters] {
+        set $key [dict get $parameters $key]
+    }
+
+    # Need to regenerate some values from mos_device
+    set hl [/ $l 2.0]
+    set hw [/ $w 2.0]
+
+    # Extension is fixed at 1.585um and we assume a fixed
+    # underlap of the gate of 0.13um, which is not in the
+    # drawn device, so subtracted from the extension distance.
+    set extension 1.455
+
+    pushbox
+    # Starts with point at the device center
+    box grow n ${hw}um
+    box grow s ${hw}um
+    box move $dside ${hl}um
+    box grow $dside ${extension}um
+    paint ed
+    set cext [sky130::getbox]
+    box width 0.26um
+    box move $dside 0.26um
+    paint mvnsd
+    pushbox
+    box grow c 0.66um
+    paint nwell
+    # Force box 0.48um larger so that spacing to guard ring
+    # comes out to 0.86um.
+    box grow c 0.48um
+    set cext [sky130::unionbox $cext [sky130::getbox]]
+    popbox
+    popbox
+    # Back to the center point
+    pushbox
+    box move $dside ${hl}um
+    box move $dside ${extension}um
+    box move $dside 0.13um
+
+    # Drain via on top of contact
+    set viatype $viadrn
+    if {$viatype != 0} {
+        pushbox
+        set cw $via_size
+    	set ch [* $cdwfull [/ [expr abs($viatype)] 100.0]]
+    	if {$ch < $via_size} {set ch $via_size}
+	box grow $dside [/ $cw 2]um
+	box grow $sside [/ $cw 2]um
+        set anchor [string index $viatype 0]
+	if {$anchor == "+"} {
+            box move s [/ [- $cdwfull $via_size] 2]um
+	    box grow n ${ch}um
+	} elseif {$anchor == "-"} {
+            box move n [/ [- $cdwfull $via_size] 2]um
+	    box grow s ${ch}um
+	} else {
+	    box grow n [/ $ch 2]um
+	    box grow s [/ $ch 2]um
+	}
+	sky130::mcon_draw vert
+	popbox
+    }
+    # cdwfull was calculated for the source side and is too long for
+    # the drain side by 0.06um on top and bottom.
+    set cdwfull [- $cdwfull 0.12]
+    if {$cdw > $cdwfull} [set cdw $cdwfull]
+
+    set cext [sky130::unionbox $cext [sky130::draw_contact 0 ${cdw} \
+		0.045 ${metal_surround} ${contact_size}\
+		mvnsd mvnsc li vert]]
+    popbox
+    return $cext
 }
 
 #----------------------------------------------------------------
@@ -5756,6 +5847,96 @@
 #----------------------------------------------------------------
 
 proc sky130::draw_ldpmos_drain {parameters} {
+
+    # Set a local variable for each parameter (e.g., $l, $w, etc.)
+    foreach key [dict keys $parameters] {
+        set $key [dict get $parameters $key]
+    }
+
+    # Need to regenerate some values from mos_device
+    set hl [/ $l 2.0]
+    set hw [/ $w 2.0]
+
+    # Extension is fixed at 1.19um and we assume a fixed
+    # underlap of the gate of 0.13um, which is not in the
+    # drawn device, so subtracted from the extension distance.
+    set extension 1.06
+
+    pushbox
+    # Starts with point at the device center
+    box grow n ${hw}um
+    box grow s ${hw}um
+    # Draw nwell under the entire device
+    pushbox
+    box grow e ${hl}um
+    box grow w ${hl}um
+    # Well should cover device and meet well width on
+    # top and bottom of the area cut out for the drain
+    box grow c 0.84um
+    box grow c 0.86um
+    box grow $dside ${extension}um
+    box grow $dside 0.26um
+    box grow $sside -1.08um
+    paint nwell
+    popbox
+    box move $dside ${hl}um
+    box grow $dside ${extension}um
+    paint ed
+    set cext [sky130::getbox]
+    box width 0.26um
+    box move $dside 0.26um
+    paint mvpsd
+    pushbox
+    box grow c 0.86um
+    # Shorter on gate side to avoid DRC error;  actual
+    # nwell is erased under gate by GDS generation rules.
+    box grow $sside -0.13um
+    paint pwell
+    # Force box 0.28um larger so that spacing to guard ring
+    # comes out to 0.66um.
+    box grow c 0.28um
+    set cext [sky130::unionbox $cext [sky130::getbox]]
+    popbox
+    popbox
+    # Back to the center point
+    pushbox
+    box move $dside ${hl}um
+    box move $dside ${extension}um
+    box move $dside 0.13um
+
+    # Drain via on top of contact
+    set viatype $viadrn
+    if {$viatype != 0} {
+        pushbox
+        set cw $via_size
+    	set ch [* $cdwfull [/ [expr abs($viatype)] 100.0]]
+    	if {$ch < $via_size} {set ch $via_size}
+	box grow $dside [/ $cw 2]um
+	box grow $sside [/ $cw 2]um
+        set anchor [string index $viatype 0]
+	if {$anchor == "+"} {
+            box move s [/ [- $cdwfull $via_size] 2]um
+	    box grow n ${ch}um
+	} elseif {$anchor == "-"} {
+            box move n [/ [- $cdwfull $via_size] 2]um
+	    box grow s ${ch}um
+	} else {
+	    box grow n [/ $ch 2]um
+	    box grow s [/ $ch 2]um
+	}
+	sky130::mcon_draw vert
+	popbox
+    }
+    # cdwfull was calculated for the source side and is too long for
+    # the drain side by 0.06um on top and bottom.
+    set cdwfull [- $cdwfull 0.12]
+    if {$cdw > $cdwfull} [set cdw $cdwfull]
+
+    set cext [sky130::unionbox $cext [sky130::draw_contact 0 ${cdw} \
+		0.045 ${metal_surround} ${contact_size}\
+		mvpsd mvpsc li vert]]
+    popbox
+    return $cext
 }
 
 #----------------------------------------------------------------
@@ -5915,7 +6096,12 @@
     }
 
     if {$drain_proc != {}} {
-	set cext [sky130::unionbox $cext [eval $drain_proc parameters]]
+	# Add variables to the parameters dictionary that we'll need
+	dict set parameters cdw $cdw
+	dict set parameters cdwfull $cdwfull
+	dict set parameters dside $dside
+	dict set parameters sside $sside
+	set cext [sky130::unionbox $cext [eval $drain_proc {$parameters}]]
     } else {
 	# Drain diffusion contact
 	pushbox
@@ -6638,6 +6824,8 @@
 	    poly_type		poly \
 	    poly_contact_type	pc \
 	    sub_type		nwell \
+	    guard_sub_surround	0.33 \
+	    gate_to_polycont	0.32 \
 	    diff_spacing	0.31 \
 	    diff_tap_space	0.38 \
 	    diff_gate_space	0.38 \
diff --git a/sky130/magic/sky130.tech b/sky130/magic/sky130.tech
index 9cde973..41e13ff 100644
--- a/sky130/magic/sky130.tech
+++ b/sky130/magic/sky130.tech
@@ -730,8 +730,10 @@
 #-----------------------------------------------------
 
 connect
-  *nwell,*nsd,*mvnsd,dnwell,pnp,photo,ed *nwell,*nsd,*mvnsd,dnwell,pnp,photo,ed
-  pwell,*psd,*mvpsd,npn,isosub,ed  pwell,*psd,*mvpsd,npn,isosub,ed
+  *nwell,*nsd,*mvnsd,dnwell,pnp,photo *nwell,*nsd,*mvnsd,dnwell,pnp,photo
+  pwell,*psd,*mvpsd,npn,isosub  pwell,*psd,*mvpsd,npn,isosub
+  *mvnsd ed
+  *mvpsd ed
   *li,coreli,lifill	*li,coreli,lifill
   *m1,m1fill,obsmcon	*m1,m1fill,obsmcon
 #ifdef RERAM
@@ -810,21 +812,34 @@
 # NWELL
 #----------------------------------------------------------------
 
+ # Identify LDMOS drain areas
+ templayer ndrainarea
+	bloat-all ed *mvnsd
+	and-not ed
+
+ templayer pdrainarea
+	bloat-all ed *mvpsd
+	and-not ed
+
  # Generate n-well under extended-drain nFET
  templayer extnwell
 	bloat-or *mvnsd * 0 extdrain 1150
 	and-not *mvnsd
+	or ndrainarea
 	grow 660
 
  # Erase n-well under extended-drain pFET
  templayer extpwell
 	bloat-or *mvpsd * 0 extdrain 590
 	and-not *mvpsd
+	or pdrainarea
 	grow 860
 
- layer NWELL 	allnwell,extnwell
+ layer NWELL 	allnwell
 	bloat-all rpw dnwell
-	and-not rpw,pwell,extpwell
+	and-not rpw,pwell
+	or extnwell
+	and-not extpwell
  	calma 	64 20
 
  layer WELLTXT
@@ -1216,7 +1231,7 @@
 
  # POLYRES extends to edge of contact cut
  layer POLYRES xhrpoly,uhrpoly
-	grow 60
+	grow 80
 	and xpc
 	or xhrpoly,uhrpoly
 	calma 66 13
@@ -3078,8 +3093,8 @@
  templayer xpolyterm RPM,URPM
  and POLY
  and-not POLYRES
- # add back the 0.06um contact surround in the direction of the resistor
- grow 60
+ # add back the 0.08um contact surround in the direction of the resistor
+ grow 80
  and POLY
 
  layer xpc xpolyterm
@@ -4297,7 +4312,7 @@
  edge4way (*mvnsd)/a ed/a 2510 ~(*mvndiff)/a 0 0 \
 	"LDNFET drain to source < %d (denmos.6 + denmos.3)"
  edge4way (*mvpdiff)/a mvpfet 1050 ~(ed)/a 0 0 "LDPFET length < %d (depmos.1)"
- edge4way (*mvpsd)/a ed/a 2510 ~(*mvpdiff)/a 0 0 \
+ edge4way (*mvpsd)/a ed/a 2110 ~(*mvpdiff)/a 0 0 \
 	"LDPFET drain to source < %d (depmos.6 + depmos.3)"
 
  area  *nsd,*mvnsd 70110 150 "N-tap minimum area < 0.07011um^2 (nsd.10b)"
@@ -6478,29 +6493,29 @@
 	photo pwell,space/w error a=area
 
  device rsubcircuit sky130_fd_pr__res_high_po	    xhrpoly \
-	xpc nwell,pwell,space/w error l=l w=w
+	xpc nwell,pwell,space/w error l=l+0.16 w=w
  device rsubcircuit sky130_fd_pr__res_high_po_0p35 xhrpoly \
-	xpc nwell,pwell,space/w error w>0.34 w<0.36 l=l
+	xpc nwell,pwell,space/w error w>0.34 w<0.36 l=l+0.16
  device rsubcircuit sky130_fd_pr__res_high_po_0p69  xhrpoly \
-	xpc nwell,pwell,space/w error w>0.68 w<0.70 l=l
+	xpc nwell,pwell,space/w error w>0.68 w<0.70 l=l+0.16
  device rsubcircuit sky130_fd_pr__res_high_po_1p41  xhrpoly \
-	xpc nwell,pwell,space/w error w>1.40 w<1.42 l=l
+	xpc nwell,pwell,space/w error w>1.40 w<1.42 l=l+0.16
  device rsubcircuit sky130_fd_pr__res_high_po_2p85  xhrpoly \
-	xpc nwell,pwell,space/w error w>2.84 w<2.86 l=l
+	xpc nwell,pwell,space/w error w>2.84 w<2.86 l=l+0.16
  device rsubcircuit sky130_fd_pr__res_high_po_5p73  xhrpoly \
-	xpc nwell,pwell,space/w error w>5.72 w<5.74 l=l
+	xpc nwell,pwell,space/w error w>5.72 w<5.74 l=l+0.16
  device rsubcircuit sky130_fd_pr__res_xhigh_po	     uhrpoly \
-	xpc nwell,pwell,space/w error l=l w=w
+	xpc nwell,pwell,space/w error l=l+0.16 w=w
  device rsubcircuit sky130_fd_pr__res_xhigh_po_0p35  uhrpoly \
-	xpc nwell,pwell,space/w error w>0.34 w<0.36 l=l
+	xpc nwell,pwell,space/w error w>0.34 w<0.36 l=l+0.16
  device rsubcircuit sky130_fd_pr__res_xhigh_po_0p69  uhrpoly \
-	xpc nwell,pwell,space/w error w>0.68 w<0.70 l=l
+	xpc nwell,pwell,space/w error w>0.68 w<0.70 l=l+0.16
  device rsubcircuit sky130_fd_pr__res_xhigh_po_1p41  uhrpoly \
-	xpc nwell,pwell,space/w error w>1.40 w<1.42 l=l
+	xpc nwell,pwell,space/w error w>1.40 w<1.42 l=l+0.16
  device rsubcircuit sky130_fd_pr__res_xhigh_po_2p85  uhrpoly \
-	xpc nwell,pwell,space/w error w>2.84 w<2.86 l=l
+	xpc nwell,pwell,space/w error w>2.84 w<2.86 l=l+0.16
  device rsubcircuit sky130_fd_pr__res_xhigh_po_5p73  uhrpoly \
-	xpc nwell,pwell,space/w error w>5.72 w<5.74 l=l
+	xpc nwell,pwell,space/w error w>5.72 w<5.74 l=l+0.16
 
  device rsubcircuit sky130_fd_pr__res_generic_nd     ndiffres \
 	*ndiff pwell,space/w  error l=l w=w
@@ -6528,7 +6543,7 @@
  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
+ device csubcircuit sky130_fd_pr_reram__reram_cell reram m1 a=area_ox
 #endif (RERAM)
 
 #ifdef MIM
@@ -6583,17 +6598,7 @@
  device resistor sky130_fd_pr__res_generic_m5 rm5 *m5
 #endif (METAL5)
 
- device resistor sky130_fd_pr__res_high_po_0p35 xhrpoly xpc +res0p35
- device resistor sky130_fd_pr__res_high_po_0p69 xhrpoly xpc +res0p69
- device resistor sky130_fd_pr__res_high_po_1p41 xhrpoly xpc +res1p41
- device resistor sky130_fd_pr__res_high_po_2p85 xhrpoly xpc +res2p85
- device resistor sky130_fd_pr__res_high_po_5p73 xhrpoly xpc +res5p73
  device resistor sky130_fd_pr__res_high_po xhrpoly xpc 
- device resistor sky130_fd_pr__res_xhigh_po_0p35 uhrpoly xpc +res0p35
- device resistor sky130_fd_pr__res_xhigh_po_0p69 uhrpoly xpc +res0p69
- device resistor sky130_fd_pr__res_xhigh_po_1p41 uhrpoly xpc +res1p41
- device resistor sky130_fd_pr__res_xhigh_po_2p85 uhrpoly xpc +res2p85
- device resistor sky130_fd_pr__res_xhigh_po_5p73 uhrpoly xpc +res5p73
  device resistor sky130_fd_pr__res_xhigh_po uhrpoly xpc 
  device resistor sky130_fd_pr__res_generic_po  mrp1     *poly 
  device resistor sky130_fd_pr__res_generic_nd  ndiffres *ndiff 
diff --git a/sky130/netgen/sky130_setup.tcl b/sky130/netgen/sky130_setup.tcl
index c5eb176..62a5a4f 100644
--- a/sky130/netgen/sky130_setup.tcl
+++ b/sky130/netgen/sky130_setup.tcl
@@ -380,6 +380,23 @@
     }
 }
 
+#ifdef RERAM
+#---------------------------------------------------------------
+# ReRAM
+#---------------------------------------------------------------
+
+set devices {sky130_fd_pr_reram__reram_cell}
+
+foreach dev $devices {
+    if {[lsearch $cells1 $dev] >= 0} {
+	property "-circuit1 $dev" delete Tfilament_0
+    }
+    if {[lsearch $cells2 $dev] >= 0} {
+	property "-circuit2 $dev" delete Tfilament_0
+    }
+}
+#endif (RERAM)
+
 #---------------------------------------------------------------
 # Schematic cells which are not extractable
 #---------------------------------------------------------------
diff --git a/sky130/sky130.json b/sky130/sky130.json
index c42a8f1..645f892 100644
--- a/sky130/sky130.json
+++ b/sky130/sky130.json
@@ -72,7 +72,8 @@
         "sky130_fd_io": "FD_IO_COMMIT"
     },
     "primitive": {
-        "sky130_fd_pr": "FD_PR_COMMIT"
+        "sky130_fd_pr": "FD_PR_COMMIT",
+        "sky130_fd_pr_reram": "RERAM_COMMIT"
     },
     "memory": {
         "sky130_sram_macros": "SRAM_COMMIT",
@@ -93,25 +94,26 @@
         "magic": "MAGIC_COMMIT"
     },
     "reference": {
-        "open_pdks": "10d637bc671d3859099970970ec059caccd83cab",
-        "magic": "22fbb2865682485b9c4a1a5803af65d44c3585c6",
-        "sky130_fd_pr": "7e2bb61f58345c203b693b2fcc178896965616d7",
+        "open_pdks": "559a117b163cef2f920f33f30f6f690aa0b47e4c",
+        "magic": "610c86a2340701e49ac23654f81233bedf6724fa",
+        "sky130_fd_pr": "69cccc2e35cbd9e678d8feeda4a237f9c43d0f8d",
         "sky130_fd_io": "2b8ce839a273734b2b1ec51b632c948f31814eb5",
         "sky130_fd_sc_hs": "51e41a54135f6f345f415f1f7a19c59a4d363c23",
         "sky130_fd_sc_ms": "70ba6f4ac3cc06a1f740326556386baacf8aba7b",
         "sky130_fd_sc_ls": "9ab031f0d83a0e45c38391b421f94daed7638c12",
         "sky130_fd_sc_lp": "4a1f17641327a6cb02c185e29c336bf0016f05d9",
-        "sky130_fd_sc_hd": "8882f642dd6907577d2d26a65220a43dad6867cd",
+        "sky130_fd_sc_hd": "008ea7938fb2614ca64b559a7ca387d80e7f55b7",
         "sky130_fd_sc_hdll": "3db78f5defcf0b6a5c85cfe10921852d504900be",
         "sky130_fd_sc_hvl": "c7e80a4802fc1df49b007b99d4a1f61120e3a37f",
-        "sky130_osu_sc_t12": "ac90ef0c622a9377a16b5218d9da3ac4169eeaaf",
-        "sky130_osu_sc_t15": "95d1c19abb47e1b2945847acb4e817b1b8417c43",
-        "sky130_osu_sc_t18": "aa2b509f3c8f32ea94fdb55ac9768754667c1658",
-        "sky130_sram_macros": "c2333394e0b0b9d9d71185678a8d8087715d5e3b",
+        "sky130_osu_sc_t12": "unknown",
+        "sky130_osu_sc_t15": "unknown",
+        "sky130_osu_sc_t18": "unknown",
+        "sky130_sram_macros": "unknown",
         "sky130_fd_bd_sram": "be33adbcf188fdeab5c061699847d9d440f7a084",
+        "sky130_fd_pr_reram": "unknown",
         "sky130_ml_xx_hd": "6eb3b0718552b034f1bf1870285ff135e3fb2dcb",
-        "xschem_sky130": "2f994e35580020805be3e8fe01109a63da207e03",
+        "xschem_sky130": "6f398652608d2bb0a380bdd7a4d1b4f8c87672b0",
         "klayout_sky130": "c4b125f216edda5d755e429cfe876855ff300974",
-        "precheck_sky130": "5cb9874b640f386205ba033d8a1ee322be21797a"
+        "precheck_sky130": "f4dee5c793044db58533425e4879747c95ca2f41"
     }
 }