Updated the gf180mcu Makefile to pull the klayout technology
files for gf180mcu from github.com/waferspace where they are
considerably further ahead than what is on github.com/
fossi-foundation.  The original repository is still being
pulled, but may be deprecated and removed in the future.
diff --git a/gf180mcu/Makefile.in b/gf180mcu/Makefile.in
index 64774b7..9f14520 100644
--- a/gf180mcu/Makefile.in
+++ b/gf180mcu/Makefile.in
@@ -146,6 +146,7 @@
 # library repositories must be subdirectories of this path.
 GF180MCU_PR_PATH = @GF180MCU_FD_PR_PATH@
 GF180MCU_PV_PATH = @GF180MCU_FD_PV_PATH@
+GF180MCU_WS_KLAYOUT_PATH = @GF180MCU_WS_KLAYOUT_PATH@
 GF180MCU_IO_PATH = @GF180MCU_FD_IO_PATH@
 GF180MCU_SC_7T5V0_PATH = @GF180MCU_FD_SC_MCU7T5V0_PATH@
 GF180MCU_SC_9T5V0_PATH = @GF180MCU_FD_SC_MCU9T5V0_PATH@
@@ -172,12 +173,14 @@
 OCD_URL = https://github.com/RTimothyEdwards
 AVALON_URL = https://github.com/AvalonSemiconductors
 FOSSI_URL = https://github.com/fossi-foundation
+WAFERSPACE_URL = https://github.com/wafer-space
 
 # Names of library repositories
 # NOTE:  Switching PDK_LIB_PR and PDK_LIB_SC_7T5V0 to Efabless versions
 # having "quick fixes" under development.
 PDK_LIB_PR =       ${FOSSI_URL}/globalfoundries-pdk-libs-gf180mcu_fd_pr
 PDK_LIB_PV =       ${FOSSI_URL}/globalfoundries-pdk-libs-gf180mcu_fd_pv
+PDK_LIB_WS_KLAYOUT =  ${WAFERSPACE_URL}/gf180mcu
 PDK_LIB_IO =       ${FOSSI_URL}/globalfoundries-pdk-libs-gf180mcu_fd_io
 PDK_LIB_SC_7T5V0 = ${FOSSI_URL}/globalfoundries-pdk-libs-gf180mcu_fd_sc_mcu7t5v0
 PDK_LIB_SC_9T5V0 = ${FOSSI_URL}/globalfoundries-pdk-libs-gf180mcu_fd_sc_mcu9t5v0
@@ -255,6 +258,11 @@
 else
     COMMIT_DEFS += -DFD_PV_COMMIT=$(shell cd ${GF180MCU_PV_PATH} ; git rev-parse HEAD)
 endif
+ifeq (${GF180MCU_WS_KLAYOUT_PATH},)
+    COMMIT_DEFS += -DWS_KLAYOUT_COMMIT="unknown"
+else
+    COMMIT_DEFS += -DWS_KLAYOUT_COMMIT=$(shell cd ${GF180MCU_WS_KLAYOUT_PATH} ; git rev-parse HEAD)
+endif
 ifeq (${GF180MCU_IO_PATH},)
     COMMIT_DEFS += -DFD_IO_COMMIT="unknown"
 else
@@ -503,7 +511,7 @@
 	../common/save_commit_refs.py ${COMMIT_DEFS} ${TECH}.json
 
 # Handle prerequisites
-prerequisites: pr-repo pv-repo io-repo sc-7t-repo sc-9t-repo sram-repo ocd-sram-repo osu-sc-repo avalon-sc-repo ocd-io-repo ocd-alpha-repo
+prerequisites: pr-repo pv-repo klayout-repo io-repo sc-7t-repo sc-9t-repo sram-repo ocd-sram-repo osu-sc-repo avalon-sc-repo ocd-io-repo ocd-alpha-repo
 
 pr-repo:
 	if test "x${REFERENCE_JSON}" != "x"; then \
@@ -531,6 +539,19 @@
 		fi ; \
 	fi
 
+klayout-repo:
+	if test "x${REFERENCE_JSON}" != "x"; then \
+		WS_KLAYOUT_COMMIT=`cat ${REFERENCE_JSON} | grep gf180mcu_klayout | grep -v COMMIT | cut -d'"' -f4` ; \
+	fi ; \
+	if test "x${GF180MCU_WS_KLAYOUT_PATH}" != "x" ; then \
+		if test -d "${GF180MCU_WS_KLAYOUT_PATH}" ; then \
+			echo "Using existing installation of klayout libraries from ${GF180MCU_WS_KLAYOUT_PATH}" ; \
+		else \
+			echo "Downloading klayout library from ${GF180MCU_WS_KLAYOUT_PATH}" ; \
+			../scripts/download.sh ${PDK_LIB_WS_KLAYOUT} ${GF180MCU_WS_KLAYOUT_PATH} $${WS_KLAYOUT_COMMIT}; \
+		fi ; \
+	fi
+
 io-repo:
 	if test "x${REFERENCE_JSON}" != "x"; then \
 		FD_IO_COMMIT=`cat ${REFERENCE_JSON} | grep gf180mcu_fd_io | grep -v COMMIT | cut -d'"' -f4` ; \
@@ -650,7 +671,7 @@
 
 
 # Update prerequisites
-update: update-pr-repo update-pv-repo update-io-repo update-sc-7t-repo update-sc-9t-repo update-sram-repo update-ocd-sram-repo update-osu-sc-repo update-avalon-sc-repo update-ocd-io-repo
+update: update-pr-repo update-pv-repo update-klayout-repo update-io-repo update-sc-7t-repo update-sc-9t-repo update-sram-repo update-ocd-sram-repo update-osu-sc-repo update-avalon-sc-repo update-ocd-io-repo
 
 update-pr-repo:
 	if test "x${GF180MCU_PR_PATH}" != "x" ; then \
@@ -664,6 +685,12 @@
 		../scripts/update.sh ${GF180MCU_PV_PATH} ; \
 	fi
 
+update-klayout-repo:
+	if test "x${GF180MCU_WS_KLAYOUT_PATH}" != "x" ; then \
+		echo "Updating GF180MCU klayout libraries from ${PDK_LIB_WS_KLAYOUT}" ; \
+		../scripts/update.sh ${GF180MCU_WS_KLAYOUT_PATH} ; \
+	fi
+
 update-io-repo:
 	if test "x${GF180MCU_IO_PATH}" != "x" ; then \
 		echo "Updating GF180MCU I/O library from ${PDK_LIB_IO}" ; \
@@ -791,35 +818,18 @@
 	mkdir -p ${IRSIMTOP_STAGING_$*}
 	mkdir -p ${IRSIM_STAGING_$*}
 
-klayout-%: ${GF180MCU_PV_PATH} ${GF180MCU_PR_PATH}
+klayout-%: ${GF180MCU_WS_KLAYOUT_PATH} ${GF180MCU_PR_PATH}
 	mkdir -p ${KLAYOUTTOP_STAGING_$*}
 	mkdir -p ${KLAYOUT_STAGING_$*}
 	rm -rf ${KLAYOUT_STAGING_$*}/drc
 	rm -rf ${KLAYOUT_STAGING_$*}/lvs
 	rm -rf ${KLAYOUT_STAGING_$*}/tech
 	rm -rf ${KLAYOUT_STAGING_$*}/pymacros
-	mkdir ${KLAYOUT_STAGING_$*}/drc
-	mkdir ${KLAYOUT_STAGING_$*}/lvs
 	mkdir ${KLAYOUT_STAGING_$*}/tech
-	mkdir ${KLAYOUT_STAGING_$*}/tech/macros
-	mkdir ${KLAYOUT_STAGING_$*}/tech/pymacros
-	mkdir ${KLAYOUT_STAGING_$*}/tech/pymacros/cells
-	mkdir ${KLAYOUT_STAGING_$*}/tech/pymacros/klayout_api_cells
 
-	cp -rp ${GF180MCU_PV_PATH}/klayout/drc/* \
-		${KLAYOUT_STAGING_$*}/drc
-	cp -rp ${GF180MCU_PV_PATH}/klayout/lvs/* \
-		${KLAYOUT_STAGING_$*}/lvs
-	cp -rp ${GF180MCU_PR_PATH}/rules/klayout/macros/* \
-		${KLAYOUT_STAGING_$*}/tech/macros
-	cp -rp ${GF180MCU_PR_PATH}/cells/klayout/pymacros/cells/* \
-		${KLAYOUT_STAGING_$*}/tech/pymacros/cells
-	cp -rp ${GF180MCU_PR_PATH}/cells/klayout/pymacros/klayout_api_cells/* \
-		${KLAYOUT_STAGING_$*}/tech/pymacros/klayout_api_cells
-	cp -rp ${GF180MCU_PR_PATH}/tech/klayout/* \
-		${KLAYOUT_STAGING_$*}/tech
-	cp -rp ${GF180MCU_PR_PATH}/cells/klayout/pymacros/*.lym \
-		${KLAYOUT_STAGING_$*}/tech/pymacros
+	# This is a pre-built library;  just copy the entire thing.
+	cp -rp ${GF180MCU_WS_KLAYOUT_PATH}/${GF180MCU$*}/libs.tech/klayout/tech \
+		${KLAYOUT_STAGING_$*}
 
 xcircuit-%:
 	rm -rf ${XCIRCUIT_STAGING_$*}
diff --git a/gf180mcu/gf180mcu.json b/gf180mcu/gf180mcu.json
index 9ba8437..a41b478 100644
--- a/gf180mcu/gf180mcu.json
+++ b/gf180mcu/gf180mcu.json
@@ -78,6 +78,7 @@
     },
     "verification": {
         "gf180mcu_fd_pv": "FD_PV_COMMIT"
+        "gf180mcu_ws_klayout": "WS_KLAYOUT_COMMIT"
     },
     "memory": {
         "gf180mcu_fd_ip_sram": "FD_IP_SRAM_COMMIT"
@@ -95,11 +96,12 @@
         "magic": "MAGIC_COMMIT"
     },
     "reference": {
-        "open_pdks": "8fa792c6f7db44c0873c619d62190496b89c0083",
+        "open_pdks": "08cfcaf22e0a9e87b2578c71602829e9a01822c7",
         "magic": "22a230edc9f83b7890469d65a22c9c5c8fb06d86",
         "gf180mcu_pdk": "a897aa30369d3bcec87d9d50ce9b01f320f854ef",
         "gf180mcu_fd_pr": "739f508876db86bd7d3403f1fe056dedfeaabdab",
         "gf180mcu_fd_pv": "50cc2fe338c81925e24a6ac4907ddaab534c1312",
+        "gf180mcu_ws_klayout": "041640819a8054b8dc79852c89f8bbf2f392b727",
         "gf180mcu_fd_io": "545621fdbac44f55344834e6c03486310c0862d7",
         "gf180mcu_fd_sc_mcu7t5v0": "5641d172662a7d9086e5b99c5d54506c05e65cee",
         "gf180mcu_fd_sc_mcu9t5v0": "e0e80f5a6522f10b82165d3aeab9b8ee28e89849",
diff --git a/scripts/configure b/scripts/configure
index 567946f..f0f2a72 100755
--- a/scripts/configure
+++ b/scripts/configure
@@ -624,6 +624,7 @@
 GF180MCU_FD_SC_MCU9T5V0_PATH
 GF180MCU_FD_SC_MCU7T5V0_PATH
 GF180MCU_FD_IO_PATH
+GF180MCU_WS_KLAYOUT_PATH
 GF180MCU_FD_PV_PATH
 GF180MCU_FD_PR_PATH
 SKY130_OSU_T18_PATH
@@ -749,6 +750,7 @@
 enable_osu_t18_sky130
 enable_primitive_gf180mcu
 enable_verification_gf180mcu
+enable_klayout_gf180mcu
 enable_io_gf180mcu
 enable_sc_7t5v0_gf180mcu
 enable_sc_9t5v0_gf180mcu
@@ -1482,6 +1484,9 @@
   --enable-verification-gf180mcu[=path]
                           Install gf180mcu_fd_pv. If path is omitted, the repository
                           will be downloaded. [default=enabled]
+  --enable-klayout-gf180mcu[=path]
+                          Install gf180mcu_ws_klayout. If path is omitted, the repository
+                          will be downloaded. [default=enabled]
   --enable-io-gf180mcu[=path]
                           Install gf180mcu_fd_io. If path is omitted, the repository
                           will be downloaded. [default=enabled]
@@ -3794,6 +3799,50 @@
 
     # echo target targetvar flag location
 
+    GF180MCU_WS_KLAYOUT_PATH=""
+
+    # Check whether --enable-klayout-gf180mcu was given.
+if test ${enable_klayout_gf180mcu+y}
+then :
+  enableval=$enable_klayout_gf180mcu;
+            if test "$enableval" == "yes" -o "$enableval" == "YES"; then
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Package 'gf180mcu_ws_klayout' will be installed automatically during make." >&5
+printf "%s\n" "$as_me: Package 'gf180mcu_ws_klayout' will be installed automatically during make." >&6;}
+        	export GF180MCU_WS_KLAYOUT_PATH=../sources/gf180mcu_ws_klayout
+            elif test "$enableval" == "no" -o "$enableval" == "NO"; then
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling package 'gf180mcu_ws_klayout'" >&5
+printf "%s\n" "$as_me: Disabling package 'gf180mcu_ws_klayout'" >&6;}
+    		export GF180MCU_WS_KLAYOUT_PATH=""
+            else
+                GF180MCU_WS_KLAYOUT_PATH=$enableval
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Enabling package 'gf180mcu_ws_klayout' at $GF180MCU_WS_KLAYOUT_PATH" >&5
+printf "%s\n" "$as_me: Enabling package 'gf180mcu_ws_klayout' at $GF180MCU_WS_KLAYOUT_PATH" >&6;}
+            fi
+            GF180MCU_WS_KLAYOUT_PATH=`realpath $GF180MCU_WS_KLAYOUT_PATH`
+
+else case e in #(
+  e)
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Package 'gf180mcu_ws_klayout' will be installed automatically during make." >&5
+printf "%s\n" "$as_me: Package 'gf180mcu_ws_klayout' will be installed automatically during make." >&6;}
+	    GF180MCU_WS_KLAYOUT_PATH=../sources/gf180mcu_ws_klayout
+
+     ;;
+esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+    # echo target targetvar flag location
+
     GF180MCU_FD_IO_PATH=""
 
     # Check whether --enable-io-gf180mcu was given.
diff --git a/scripts/configure.ac b/scripts/configure.ac
index 00d8624..d5c11a9 100755
--- a/scripts/configure.ac
+++ b/scripts/configure.ac
@@ -255,6 +255,7 @@
 # GlobalFoundries gf180mcu essential
 M4_GEN_INSTALLATION(gf180mcu_fd_pr, primitive-gf180mcu, ../sources)
 M4_GEN_INSTALLATION(gf180mcu_fd_pv, verification-gf180mcu, ../sources)
+M4_GEN_INSTALLATION(gf180mcu_ws_klayout, klayout-gf180mcu, ../sources)
 M4_GEN_INSTALLATION(gf180mcu_fd_io, io-gf180mcu, ../sources)
 M4_GEN_INSTALLATION(gf180mcu_fd_sc_mcu7t5v0, sc-7t5v0-gf180mcu, ../sources)
 M4_GEN_INSTALLATION(gf180mcu_fd_sc_mcu9t5v0, sc-9t5v0-gf180mcu, ../sources)
diff --git a/sky130/sky130.json b/sky130/sky130.json
index 23f13aa..b7d68f5 100644
--- a/sky130/sky130.json
+++ b/sky130/sky130.json
@@ -94,7 +94,7 @@
         "magic": "MAGIC_COMMIT"
     },
     "reference": {
-        "open_pdks": "8fa792c6f7db44c0873c619d62190496b89c0083",
+        "open_pdks": "08cfcaf22e0a9e87b2578c71602829e9a01822c7",
         "magic": "22a230edc9f83b7890469d65a22c9c5c8fb06d86",
         "sky130_fd_pr": "c996d0e7417d7574714079050e2768da70f7fdca",
         "sky130_fd_io": "e60737bf624df95c211fe99c007ddec78e3e081d",