Added recipes to the Makefiles to execute "make update", which
visits all directories in source/ that are git repositories and
runs "git pull". Also: Removed the recipe for installing the
xschem sky130 library, and added a new one which reflects recent
changes in the repository supporting the PDK_ROOT environment
variable and supporting the reram device in sky130B. Properly
resolved differences in xschem's setup for sky130A vs. sky130B.
diff --git a/.gitignore b/.gitignore
index e140415..7fe9b79 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,6 @@
# local install cache
/sources
+
+# can use this file to aid in local installations
+reconfigure.sh
diff --git a/Makefile.in b/Makefile.in
index 1c59993..65efa56 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -48,6 +48,7 @@
endif
TECHS_ALL = $(addprefix tech-,$(ENABLED_TECHS))
+TECHS_UPDATE = $(addprefix update-,$(ENABLED_TECHS))
TECHS_INSTALL = $(addprefix install-,$(ENABLED_TECHS))
TECHS_UNINSTALL = $(addprefix uninstall-,$(TECHS))
TECHS_CLEAN = $(addprefix clean-,$(TECHS))
@@ -55,7 +56,7 @@
#---------------------------------------------------
-.PHONY: all install uninstall clean veryclean
+.PHONY: all install uninstall clean veryclean update
all: $(TECHS_ALL)
@echo $(DONE_MESSAGE)
@@ -66,6 +67,9 @@
uninstall: $(TECHS_UNINSTALL)
@echo $(DONE_MESSAGE)
+update: $(TECHS_UPDATE)
+ @echo $(DONE_MESSAGE)
+
clean: $(TECHS_CLEAN)
@echo $(DONE_MESSAGE)
@@ -123,6 +127,9 @@
uninstall-%: %
(cd $* && ${MAKE} uninstall)
+update-%: %
+ (cd $* && ${MAKE} update)
+
clean-%:
(cd $* && ${MAKE} clean)
diff --git a/VERSION b/VERSION
index cff7ecc..c3ace87 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.285
+1.0.286
diff --git a/sky130/Makefile.in b/sky130/Makefile.in
index d89cfdf..54494fe 100644
--- a/sky130/Makefile.in
+++ b/sky130/Makefile.in
@@ -632,6 +632,51 @@
fi ; \
fi
+# Update prerequisites
+update: update-pdk-repo update-alpha-repo update-xschem-repo update-sram-repo update-osu-t12-repo update-osu-t15-repo update-osu-t18-repo
+
+update-pdk-repo:
+ if test "x${SKYWATER_PATH}" != "x" ; then \
+ echo "Updating SkyWater PDK from ${PDK_URL}" ; \
+ custom/scripts/pdk_update.sh ${SKYWATER_PATH} ; \
+ fi
+
+update-alpha-repo:
+ if test "x${ALPHA_PATH}" != "x" ; then \
+ echo "Updating alphanumeric library from ${ALPHA_URL}" ; \
+ ../scripts/update.sh ${ALPHA_PATH} ; \
+ fi
+
+update-sram-repo:
+ if test "x${SRAM_PATH}" != "x" ; then \
+ echo "Updating SRAM macro library from ${SRAM_URL}" ; \
+ ../scripts/update.sh ${SRAM_PATH} ; \
+ fi
+
+update-xschem-repo:
+ if test "x${XSCHEM_PATH}" != "x" ; then \
+ echo "Updating xschem setup from ${XSCHEM_URL}" ; \
+ ../scripts/update.sh ${XSCHEM_PATH} ; \
+ fi
+
+update-osu-t12-repo:
+ if test "x${OSU_T12_PATH}" != "x" ; then \
+ echo "Updating OSU standard T12 cell library from ${OSU_T12_URL}" ; \
+ ../scripts/update.sh ${OSU_T12_PATH} ; \
+ fi
+
+update-osu-t15-repo:
+ if test "x${OSU_T15_PATH}" != "x" ; then \
+ echo "Updating OSU standard T15 cell library from ${OSU_T15_URL}" ; \
+ ../scripts/update.sh ${OSU_T15_PATH} ; \
+ fi
+
+update-osu-t18-repo:
+ if test "x${OSU_T18_PATH}" != "x" ; then \
+ echo "Updating OSU standard T18 cell library from ${OSU_T18_URL}" ; \
+ ../scripts/update.sh ${OSU_T18_PATH} ; \
+ fi
+
all-%: prerequisites
echo "Starting sky130$* PDK staging on "`date` > ${SKY130$*}_make.log
${MAKE} general-$*
@@ -813,9 +858,6 @@
${CPP} ${SKY130$*_DEFS} xcircuit/${TECH}.xcircuitrc \
${XCIRCUIT_STAGING_$*}/${SKY130$*}.xcircuitrc
-
-
-
xschem-%: ${XSCHEM_PATH}
if test "x${XSCHEM_PATH}" != "x" ; then \
rm -rf ${XSCHEM_STAGING_$*} ; \
@@ -826,23 +868,32 @@
if test "x${XSCHEM_PATH}" != "x" ; then \
cp -rp ${XSCHEM_PATH}/* ${XSCHEM_STAGING_$*} ; \
fi
-
- #add the correct libraries into the test files
- if test "x${XSCHEM_PATH}" != "x" ; then \
- for file in ${XSCHEM_STAGING_$*}/sky130_tests/* ; do \
- ${SED} -i '/.include $$\:\:SKYWATER_MODELS/d' $$file ; \
- grep -zl 'sky130.lib.spice' $$file || ${SED} -z 's|format="tcleval( @value )"\nvalue="|format="tcleval( @value )"\nvalue="\n.lib $$\:\:SKYWATER_MODELS/sky130.lib.spice tt |' -i $$file ; \
- done ; \
- fi
- # Re-copy the xschemrc, with one change to add the PDK install path as
- # a component of XSCHEM_LIBRARY_PATH
+ # xschem setup is for sky130A. Fix for the given target variant.
+ # Add custom additions to the startup file for open_pdk.
if test "x${XSCHEM_PATH}" != "x" ; then \
cat ${XSCHEM_PATH}/xschemrc | \
- ${SED} -e "/PWD/aappend XSCHEM_LIBRARY_PATH :${XSCHEM_STAGING_$*}" | \
- ${SED} -e '/netlist_dir/aset netlist_dir $$env(PWD)' | \
- ${SED} -e "/SKYWATER_MODELS/s#~/pdks/sky130$*/libs.tech/ngspice#${NGSPICE_STAGING_$*}#" | \
- ${SED} -e "/SKYWATER_STDCELLS/s#~/pdks/sky130$*/libs.ref/sky130_fd_sc_hd/spice#${STAGING_PATH}/${SKY130$*}/libs.ref/${HD_SPICE}#" \
- > ${XSCHEM_STAGING_$*}/xschemrc ; \
+ ${SED} -e "/sky130A/s#sky130A#TECHNAME#" \
+ > ${XSCHEM_STAGING_$*}/xschemrc_source ; \
+ ${CPP} ${SKY130$*_DEFS} ${XSCHEM_STAGING_$*}/xschemrc_source \
+ ${XSCHEM_STAGING_$*}/xschemrc ; \
+ cat ${XSCHEM_PATH}/xschem_verilog_import/xschemrc | \
+ ${SED} -e "/sky130A/s#sky130A#TECHNAME#" \
+ > ${XSCHEM_STAGING_$*}/xschemrc_source ; \
+ ${CPP} ${SKY130$*_DEFS} ${XSCHEM_STAGING_$*}/xschemrc_source \
+ ${XSCHEM_STAGING_$*}/xschem_verilog_import/xschemrc ; \
+ rm -f ${XSCHEM_STAGING_$*}/xschemrc_source ; \
+ cat ./custom/xschem/xschemrc_append >> ${XSCHEM_STAGING_$*}/xschemrc ; \
+ fi
+ # In the sky130A variant, remove the reram schematic/symbol and references
+ if test "x${XSCHEM_PATH}" != "x" ; then \
+ if test "x$*" == "xA" ; then \
+ rm -f ${XSCHEM_STAGING_$*}/sky130_tests/tb_reram* ; \
+ rm -f ${XSCHEM_STAGING_$*}/sky130_fd_pr/reram* ; \
+ cat ${XSCHEM_STAGING_$*}/sky130_tests/top.sch | \
+ ${SED} -e "/reram/,+7d" \
+ > ${XSCHEM_STAGING_$*}/temp ; \
+ mv ${XSCHEM_STAGING_$*}/temp ${XSCHEM_STAGING_$*}/sky130_tests/top.sch ; \
+ fi ; \
fi
openlane-%: openlane/config.tcl openlane/rcx_rules.info openlane/sky130_fd_sc_hd/config.tcl openlane/sky130_fd_sc_hs/config.tcl openlane/sky130_fd_sc_ms/config.tcl openlane/sky130_fd_sc_ls/config.tcl openlane/sky130_fd_sc_hdll/config.tcl openlane/sky130_osu_sc_t18/config.tcl
diff --git a/sky130/custom/scripts/pdk_update.sh b/sky130/custom/scripts/pdk_update.sh
new file mode 100755
index 0000000..47910b2
--- /dev/null
+++ b/sky130/custom/scripts/pdk_update.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# pdk_update.sh --
+#
+# Update the PDK from git
+# (mainly for use with the Google/SkyWater SKY130 PDK)
+#
+# Usage: pdk_update.sh <directory>
+#
+
+if [ ! test -d $1 ] ; then
+ echo "Project does not exist in $pdir ; Cannot update."
+ exit 0
+fi
+
+cd $1
+
+# Update top-level PDK repository
+
+echo "Pulling PDK repository"
+git pull
+
+# Update submodules
+
+echo "Updating PDK library submodules"
+git submodule update --remote
+
+# Regenerate liberty files
+
+echo "Regenerating liberty timing files"
+make timing
diff --git a/sky130/custom/xschem/xschemrc_append b/sky130/custom/xschem/xschemrc_append
new file mode 100644
index 0000000..0a922f3
--- /dev/null
+++ b/sky130/custom/xschem/xschemrc_append
@@ -0,0 +1,8 @@
+
+# open_pdks specific:
+# Set variables after ${PDK_ROOT} is known
+# This overrides some of the variables set above.
+
+set XSCHEM_START_WINDOW ${PDK_ROOT}/${PDK}/libs.tech/xschem/sky130_tests/top.sch
+append XSCHEM_LIBRARY_PATH :${PDK_ROOT}/${PDK}/libs.tech/xschem
+