Modified the configuration file to better handle the installation
options. In particular, removed the "install-local" and "install-dist"
targets in favor of just using "make install", with the install type
dependent on the choices made by "configure". Made the local and
distributed install paths specific to the PDK. Added the link type
and efabless-style to the configuration options. Added a list of
generic standard cell gates to be used by (not yet posted) software
to automatically generate digital symbol libraries.
diff --git a/Makefile.in b/Makefile.in
index 9f28a08..202fa8d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -11,20 +11,25 @@
# make
# generates the tech files from source masters.
#
-# make install-local
+# make install
#
-# installs the tech files locally.
-#
-# make install-dist
-#
-# installs the tech files in the git project
-# that is used for distribution of software
-# across the system.
+# installs the tech files. If the configuration
+# script has been given the "--with-<PDK>-dist-path="
+# option, then tech files are installed in the path
+# (such as a git repository) that is used for
+# distribution of software across a system. Otherwise,
+# files are installed in the local path specified by
+# the configuration option "--with-<PDK>-local-path=".
#
# make clean
#
# clean up all files generated by 'make'
#
+# make veryclean
+#
+# clean up all files generated by 'make' and remove
+# all log files.
+#
#---------------------------------------------------
#
# The following definitions are tied to the contents
@@ -45,11 +50,8 @@
#---------------------------------------------------
-install-sky130-local: sky130
- (cd sky130 && ${MAKE} install-local)
-
-install-sky130-dist: sky130
- (cd sky130 && ${MAKE} install-dist)
+install-sky130: sky130
+ (cd sky130 && ${MAKE} install)
clean-sky130:
(cd sky130 && ${MAKE} clean)
@@ -59,27 +61,18 @@
#---------------------------------------------------
-install:
- ${MAKE} install-local
-
-install-local: ${TECHS}
+install: ${TECHS}
for tech in ${TECHS}; do \
${MAKE} install-$${tech}-local; done
-install-dist: ${TECHS}
- for tech in ${TECHS}; do \
- ${MAKE} install-$${tech}-dist; done
-
-#---------------------------------------------------
-
-clean:
+clean: ${TECHS}
for tech in ${TECHS}; do \
${MAKE} clean-$${tech}; done
-veryclean:
+veryclean: ${TECHS}
for tech in ${TECHS}; do \
${MAKE} veryclean-$${tech}; done
-distclean:
+distclean: ${TECHS}
for tech in ${TECHS}; do \
${MAKE} veryclean-$${tech}; done
diff --git a/common/gate_list.txt b/common/gate_list.txt
new file mode 100644
index 0000000..84fd5b7
--- /dev/null
+++ b/common/gate_list.txt
@@ -0,0 +1,124 @@
+#-----------------------------------------------------------------------
+# List of standard gate symbols with mapping to liberty file fields
+#
+# Y, X refer to logic output pins
+# C, S, ... refer specifically to adder carry and sum output pins
+# Q, QB refer specifically to flip-flop or latch output pins
+# IQ, IQB refers to function entries for flops. "I" is literal.
+# A, B, C, ... refer to input pins
+# D, R, S, ... refer specifically to flip-flop input pins
+# SD refers to scan data input pin for flip-flops
+# CI refers specifically to full adder carry-in input
+# Z refers to high-impedance state
+# & means AND
+# | means OR
+# ! means NOT
+# ( ) groups
+#
+# Symbol Liberty Liberty
+# primitive file field
+# name field value ...
+#-----------------------------------------------------------------------
+AND2 function Y=A&B
+AND3 function Y=A&B&C
+AND4 function Y=A&B&C&D
+AND5 function Y=A&B&C&D&E
+AND8 function Y=A&B&C&D&E&F&G&H
+
+AND2I function Y=!A&B
+
+AO21 function Y=(A&B)|C
+AO22 function Y=(A&B)|(C&D)
+
+AOI21 function Y=!((A&B)|C)
+AOI22 function Y=!((A&B)|(C&D))
+
+NAND2 function Y=!(A&B)
+NAND3 function Y=!(A&B&C)
+NAND4 function Y=!(A&B&C&D)
+NAND5 function Y=!(A&B&C&D&E)
+NAND8 function Y=!(A&B&C&D&E&F&G&H)
+
+NAND2I function Y=!(!A&B)
+
+OR2 function Y=A|B
+OR3 function Y=A|B|C
+OR4 function Y=A|B|C|D
+OR5 function Y=A|B|C|D|E
+OR8 function Y=A|B|C|D|E|F|G|H
+
+OR2I function Y=!A|B
+
+OA21 function Y=(A|B)&C
+OA22 function Y=(A|B)&(C|D)
+
+OAI21 function Y=!((A|B)&C)
+OAI22 function Y=!((A|B)&(C|D))
+
+NOR2 function Y=!(A|B)
+NOR3 function Y=!(A|B|C)
+NOR4 function Y=!(A|B|C|D)
+NOR5 function Y=!(A|B|C|D|E)
+NOR8 function Y=!(A|B|C|D|E|F|G|H)
+
+NOR2I function Y=!(!A|B)
+
+XOR2 function Y=(A&!B)|(!A&B)
+
+XNOR2 function Y=(A&B)|(!A&!B)
+
+INV function Y=!A
+
+BUF function Y=A
+
+TBUF function Y=A three_state E
+
+TBUFI function Y=A three_state !E
+
+MUX2 function Y=(A&C)|(B&!C)
+
+MUX2I function Y=!((A&!C)|(B&C))
+
+MUX4 function Y=(A&!E&!F)|(B&!E&F)|(C&E&!F)|(D&E&F)
+
+MUX4I function Y=!((A&!E&!F)|(B&!E&F)|(C&E&!F)|(D&E&F))
+
+HA function C=A&B function S=(A&!B)|(!A&B)
+FA function C=(A&B)|(A&CI)|(B&CI) function S=(A&B&CI)|(!A&B&!CI)|(!A&!B&CI)|(A&B&CI)
+
+LATCH function Q=IQ enable E data_in D
+LATCHI function Q=IQ enable !E data_in D
+LATCHR function Q=IQ enable E data_in D clear !R
+LATCHIR function Q=IQ enable !E data_in D clear !R
+LATCHSR function Q=IQ enable E data_in D preset !S clear !R
+LATCHISR function Q=IQ enable E data_in D preset !S clear !R
+
+LATCHQ function Q=IQ QB=IQB enable E data_in D
+LATCHIQ function Q=IQ QB=IQB enable !E data_in D
+LATCHRQ function Q=IQ QB=IQB enable E data_in D clear !R
+LATCHIRQ function Q=IQ QB=IQB enable !E data_in D clear !R
+LATCHSRQ function Q=IQ QB=IQB enable E data_in D preset !S clear !R
+LATCHISRQ function Q=IQ QB=IQB enable E data_in D preset !S clear !R
+
+DFF function Q=IQ clocked_on C next_state D
+DFFQ function Q=IQ function QB=IQB clocked_on C next_state D
+DFFS function Q=IQ clocked_on C next_state D preset !S
+DFFR function Q=IQ clocked_on C next_state D clear !R
+DFFSR function Q=IQ clocked_on C next_state D preset !S clear !R
+DFFSQ function Q=IQ function QB=IQB clocked_on C next_state D preset !S
+DFFRQ function Q=IQ function QB=IQB clocked_on C next_state D clear !R
+DFFSRQ function Q=IQ function QB=IQB clocked_on C next_state D clear !R preset !S
+DFFI function Q=IQ clocked_on !C next_state D
+DFFIQ function Q=IQ function QB=IQB clocked_on !C next_state D
+DFFIS function Q=IQ clocked_on !C next_state D preset !S
+DFFIR function Q=IQ clocked_on !C next_state D clear !R
+DFFISR function Q=IQ clocked_on !C next_state D preset !S clear !R
+DFFISQ function Q=IQ function QB=IQB clocked_on !C next_state D preset !S
+DFFIRQ function Q=IQ function QB=IQB clocked_on !C next_state D clear !R
+DFFISRQ function Q=IQ function QB=IQB clocked_on !C next_state D clear !R preset !S
+
+EDFF function Q=IQ clocked_on C next_state (D&E)|(IQ&!E)
+EDFFQ function Q=IQ QB=IQB clocked_on C next_state (D&E)|(IQ&!E)
+
+SDFF function Q=IQ clocked_on C next_state (D&!E)|(SD&E)
+SDFFQ function Q=IQ QB=IQB clocked_on C next_state (D&!E)|(SD&E)
diff --git a/scripts/configure b/scripts/configure
index e319bae..536a041 100755
--- a/scripts/configure
+++ b/scripts/configure
@@ -586,6 +586,7 @@
ac_subst_vars='LTLIBOBJS
LIBOBJS
+EF_STYLE
MAGIC
pkgpyexecdir
pyexecdir
@@ -596,9 +597,10 @@
PYTHON_PREFIX
PYTHON_VERSION
PYTHON
-LOCAL_PATH
-test_tech_SOURCE_PATH
-sky130_SOURCE_PATH
+SKY130_LINK_TARGETS
+SKY130_DIST_PATH
+SKY130_LOCAL_PATH
+SKY130_SOURCE_PATH
target_alias
host_alias
build_alias
@@ -641,8 +643,10 @@
ac_user_opts='
enable_option_checking
with_sky130_source
-with_test_tech_source
-with_local_path
+with_sky130_local_path
+with_sky130_dist_path
+with_sky130_link_targets
+with_ef_style
'
ac_precious_vars='build_alias
host_alias
@@ -1258,8 +1262,16 @@
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-sky130-source=/path/to/sky130/source
"location of the source files for sky130"
- --with-local-path=/path/to/install/pdks
- "location where the PDKs will be installed"
+ --with-sky130-local-path=/path/to/install/pdks
+ "run-time location of the PDKs"
+ --with-sky130-dist-path=/path/to/install/pdks
+ "staging location to install the PDKs for
+ distribution (optional)"
+ --with-sky130-link-targets=none|source
+ "make symbolic links to existing files
+ [default=none]"
+ --with-ef-style Use efabless style file system structure
+ [default=no]
Some influential environment variables:
PYTHON the Python interpreter
@@ -1699,37 +1711,46 @@
# detect PDKs based on directories that include Makefile.in files
+# check for the source and install paths for each PDK.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: Found technology directories: sky130 test_tech" >&5
-$as_echo "$as_me: Found technology directories: sky130 test_tech" >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: Found technology directories: sky130" >&5
+$as_echo "$as_me: Found technology directories: sky130" >&6;}
# --with-pdk-source=PDK_SOURCE_PATH
- { $as_echo "$as_me:${as_lineno-$LINENO}: Checking whether 'sky130' is specified" >&5
-$as_echo "$as_me: Checking whether 'sky130' is specified" >&6;}
+
+ SKY130_SOURCE_PATH=""
# Check whether --with-sky130-source was given.
if test "${with_sky130_source+set}" = set; then :
- withval=$with_sky130_source;
- sky130_SOURCE_PATH=$with_sky130_source
- { $as_echo "$as_me:${as_lineno-$LINENO}: Checking specified path for 'sky130' at $sky130_SOURCE_PATH" >&5
-$as_echo "$as_me: Checking specified path for 'sky130' at $sky130_SOURCE_PATH" >&6;}
+ withval=$with_sky130_source; SKY130_SOURCE_PATH=$withval
- # force an absolute path
- # pdk[]_SOURCE_PATH=$(readlink -f $[]pdk[]_SOURCE_PATH)
+fi
- # basic check that the PDK exists there (the path must exist in any case)
- as_ac_File=`$as_echo "ac_cv_file_$sky130_SOURCE_PATH" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sky130_SOURCE_PATH" >&5
-$as_echo_n "checking for $sky130_SOURCE_PATH... " >&6; }
+
+ # Require this argument
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Checking whether source path is specified for 'sky130'" >&5
+$as_echo "$as_me: Checking whether source path is specified for 'sky130'" >&6;}
+ if test "x$SKY130_SOURCE_PATH" == "x" ; then
+ as_fn_error $? "Option --with-sky130-source=<path> not specified!" "$LINENO" 5
+ fi
+
+ SKY130_SOURCE_PATH=$(readlink -f $SKY130_SOURCE_PATH)
+
+ # basic check that the PDK exists there (the path must exist in any case)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Checking specified path for 'sky130' at $SKY130_SOURCE_PATH" >&5
+$as_echo "$as_me: Checking specified path for 'sky130' at $SKY130_SOURCE_PATH" >&6;}
+ as_ac_File=`$as_echo "ac_cv_file_$SKY130_SOURCE_PATH" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SKY130_SOURCE_PATH" >&5
+$as_echo_n "checking for $SKY130_SOURCE_PATH... " >&6; }
if eval \${$as_ac_File+:} false; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "$sky130_SOURCE_PATH"; then
+if test -r "$SKY130_SOURCE_PATH"; then
eval "$as_ac_File=yes"
else
eval "$as_ac_File=no"
@@ -1740,90 +1761,78 @@
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: 'sky130' source path found at $sky130_SOURCE_PATH" >&5
-$as_echo "$as_me: 'sky130' source path found at $sky130_SOURCE_PATH" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: 'sky130' source path found at $SKY130_SOURCE_PATH" >&5
+$as_echo "$as_me: 'sky130' source path found at $SKY130_SOURCE_PATH" >&6;}
else
- as_fn_error $? "Specified path for 'sky130' at $sky130_SOURCE_PATH not found" "$LINENO" 5
-
+ as_fn_error $? "Specified path for 'sky130' at $SKY130_SOURCE_PATH not found" "$LINENO" 5
fi
+
+
+ # --with-pdk-local-path=PDK_LOCAL_PATH
+
+
+ SKY130_LOCAL_PATH=""
+
+# Check whether --with-sky130-local-path was given.
+if test "${with_sky130_local_path+set}" = set; then :
+ withval=$with_sky130_local_path; SKY130_LOCAL_PATH=$withval
+
fi
+ # Require this argument
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Checking whether local path is specified for 'sky130'" >&5
+$as_echo "$as_me: Checking whether local path is specified for 'sky130'" >&6;}
+ if test "x$SKY130_LOCAL_PATH" == "x" ; then
+ as_fn_error $? "Option --with-sky130-local-path=<path> not specified!" "$LINENO" 5
+ fi
+ SKY130_LOCAL_PATH=$(readlink -f $SKY130_LOCAL_PATH)
- { $as_echo "$as_me:${as_lineno-$LINENO}: Checking whether 'test_tech' is specified" >&5
-$as_echo "$as_me: Checking whether 'test_tech' is specified" >&6;}
-# Check whether --with-test_tech-source was given.
-if test "${with_test_tech_source+set}" = set; then :
- withval=$with_test_tech_source;
- test_tech_SOURCE_PATH=$with_test_tech_source
- { $as_echo "$as_me:${as_lineno-$LINENO}: Checking specified path for 'test_tech' at $test_tech_SOURCE_PATH" >&5
-$as_echo "$as_me: Checking specified path for 'test_tech' at $test_tech_SOURCE_PATH" >&6;}
+ # --with-pdk-dist-path=PDK_DIST_PATH
- # force an absolute path
- # pdk[]_SOURCE_PATH=$(readlink -f $[]pdk[]_SOURCE_PATH)
- # basic check that the PDK exists there (the path must exist in any case)
- as_ac_File=`$as_echo "ac_cv_file_$test_tech_SOURCE_PATH" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $test_tech_SOURCE_PATH" >&5
-$as_echo_n "checking for $test_tech_SOURCE_PATH... " >&6; }
-if eval \${$as_ac_File+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "$test_tech_SOURCE_PATH"; then
- eval "$as_ac_File=yes"
-else
- eval "$as_ac_File=no"
+ SKY130_DIST_PATH=""
+
+# Check whether --with-sky130-dist-path was given.
+if test "${with_sky130_dist_path+set}" = set; then :
+ withval=$with_sky130_dist_path; SKY130_DIST_PATH=$withval
+
fi
-fi
-eval ac_res=\$$as_ac_File
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: 'test_tech' source path found at $test_tech_SOURCE_PATH" >&5
-$as_echo "$as_me: 'test_tech' source path found at $test_tech_SOURCE_PATH" >&6;}
+ # Require this argument
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Checking whether distribution path is specified for 'sky130'" >&5
+$as_echo "$as_me: Checking whether distribution path is specified for 'sky130'" >&6;}
+ if test "x$SKY130_DIST_PATH" == "x" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Option --with-sky130-dist-path=<path> not specified. Local install only.\"" >&5
+$as_echo "$as_me: Option --with-sky130-dist-path=<path> not specified. Local install only.\"" >&6;}
+ fi
+ SKY130_DIST_PATH=$(readlink -f $SKY130_DIST_PATH)
-else
- as_fn_error $? "Specified path for 'test_tech' at $test_tech_SOURCE_PATH not found" "$LINENO" 5
+ # --with-pdk-link-targets=PDK_LINK_TARGETS
+
+
+ # Default link_targets = "none"
+ SKY130_LINK_TARGETS="none"
+
+
+# Check whether --with-sky130-link-targets was given.
+if test "${with_sky130_link_targets+set}" = set; then :
+ withval=$with_sky130_link_targets; SKY130_LINK_TARGETS=$with_sky130_link_targets
fi
-
-fi
-
-
-
-
-
-# --with-local-path=LOCAL_PATH
-
-# Check whether --with-local-path was given.
-if test "${with_local_path+set}" = set; then :
- withval=$with_local_path;
- LOCAL_PATH=$with_local_path
- { $as_echo "$as_me:${as_lineno-$LINENO}: Local installation path set to $LOCAL_PATH" >&5
-$as_echo "$as_me: Local installation path set to $LOCAL_PATH" >&6;}
-
-else
-
- as_fn_error $? "--with-local-path=/path/to/install/pdks is a required argument" "$LINENO" 5
-
-
-fi
-
-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Link targets set to $SKY130_LINK_TARGETS" >&5
+$as_echo "$as_me: Link targets set to $SKY130_LINK_TARGETS" >&6;}
@@ -1869,7 +1878,7 @@
$as_echo_n "(cached) " >&6
else
- for am_cv_pathless_PYTHON in python python2 python3 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
+ for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
test "$am_cv_pathless_PYTHON" = none && break
prog="import sys
# split strings by '.' and convert to numeric. Append some zeros
@@ -2092,33 +2101,28 @@
if test -z $PYTHON;
then
- if test -z "";
- then
- PYTHON="python3"
- else
- PYTHON=""
- fi
+ PYTHON="python"
fi
PYTHON_NAME=`basename $PYTHON`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $PYTHON_NAME module: distutils" >&5
$as_echo_n "checking $PYTHON_NAME module: distutils... " >&6; }
- $PYTHON -c "import distutils" 2>/dev/null
- if test $? -eq 0;
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $PYTHON -c "import distutils" 2>/dev/null
+ if test $? -eq 0;
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- eval HAVE_PYMOD_DISTUTILS=yes
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ eval HAVE_PYMOD_DISTUTILS=yes
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- eval HAVE_PYMOD_DISTUTILS=no
- #
- if test -n ""
- then
- as_fn_error $? "failed to find required module distutils" "$LINENO" 5
- exit 1
- fi
- fi
+ eval HAVE_PYMOD_DISTUTILS=no
+ #
+ if test -n ""
+ then
+ as_fn_error $? "failed to find required module distutils" "$LINENO" 5
+ exit 1
+ fi
+ fi
# Extract the first word of "magic", so it can be a program name with args.
@@ -2165,6 +2169,20 @@
as_fn_error $? "You need 'magic' to generate the needed various cell views" "$LINENO" 5
fi
+# Check for "--with-ef-style"
+EF_STYLE=0
+
+# Check whether --with-ef-style was given.
+if test "${with_ef_style+set}" = set; then :
+ withval=$with_ef_style;
+ pdks_ef_style=$withval
+ if test "$withval" == "yes" -o "$withval" == "YES"; then
+ EF_STYLE=1
+ fi
+
+fi
+
+
MAKEFILES=$(find .. -name "Makefile.in" | sed 's/\(.*\)\.in/\1/g')
diff --git a/scripts/configure.ac b/scripts/configure.ac
index 52e74d5..362d3d2 100755
--- a/scripts/configure.ac
+++ b/scripts/configure.ac
@@ -3,64 +3,114 @@
# detect PDKs based on directories that include Makefile.in files
m4_define([M4_GET_TECHS], [m4_normalize(m4_esyscmd(cd .. && find * -mindepth 1 -name "Makefile.in" -exec dirname {} \; | tr "\n" " "))])
-AC_DEFUN([M4_GEN_WITH_PDK_SOURCE_ARGS],
+# check for the source and install paths for each PDK.
+AC_DEFUN([M4_GEN_WITH_PDK_ARGS],
[
# --with-pdk-source=PDK_SOURCE_PATH
m4_foreach_w(pdk, $1, [
- AC_MSG_NOTICE([Checking whether 'pdk' is specified])
+ m4_define([pdkvar], [m4_normalize(m4_esyscmd(echo pdk | tr "a-z" "A-Z"))])
+ pdkvar[]_SOURCE_PATH=""
AC_ARG_WITH(pdk-source,
[AS_HELP_STRING([--with-pdk-source=/path/to/pdk/source], "location of the source files for pdk")],
- [
- pdk[]_SOURCE_PATH=$with_[]pdk[]_source
- AC_MSG_NOTICE([Checking specified path for 'pdk' at $[]pdk[]_SOURCE_PATH])
-
- # force an absolute path
- # pdk[]_SOURCE_PATH=$(readlink -f $[]pdk[]_SOURCE_PATH)
-
- # basic check that the PDK exists there (the path must exist in any case)
- AC_CHECK_FILE($[]pdk[]_SOURCE_PATH,
- [
- AC_MSG_NOTICE(['pdk' source path found at $[]pdk[]_SOURCE_PATH])
- ],
- [
- AC_MSG_ERROR([Specified path for 'pdk' at $[]pdk[]_SOURCE_PATH not found])
- ]
- )
- ]
+ [pdkvar[]_SOURCE_PATH=$withval]
)
- AC_SUBST([]pdk[]_SOURCE_PATH)
+
+ # Require this argument
+ AC_MSG_NOTICE([Checking whether source path is specified for 'pdk'])
+ if test "x$[]pdkvar[]_SOURCE_PATH" == "x" ; then
+ AC_MSG_ERROR([Option --with-pdk-source=<path> not specified!])
+ fi
+
+ pdkvar[]_SOURCE_PATH=$(readlink -f $[]pdkvar[]_SOURCE_PATH)
+
+ # basic check that the PDK exists there (the path must exist in any case)
+ AC_MSG_NOTICE([Checking specified path for 'pdk' at $[]pdkvar[]_SOURCE_PATH])
+ AC_CHECK_FILE($[]pdkvar[]_SOURCE_PATH,
+ [
+ AC_MSG_NOTICE(['pdk' source path found at $[]pdkvar[]_SOURCE_PATH])
+ ],
+ [
+ AC_MSG_ERROR([Specified path for 'pdk' at $[]pdkvar[]_SOURCE_PATH not found])
+ ])
+ AC_SUBST([]pdkvar[]_SOURCE_PATH)
+ ])
+
+
+ # --with-pdk-local-path=PDK_LOCAL_PATH
+ m4_foreach_w(pdk, $1, [
+ m4_define([pdkvar], [m4_normalize(m4_esyscmd(echo pdk | tr "a-z" "A-Z"))])
+ pdkvar[]_LOCAL_PATH=""
+ AC_ARG_WITH(pdk-local-path,
+ [AS_HELP_STRING([--with-pdk-local-path=/path/to/install/pdks], "run-time location of the PDKs")],
+ [pdkvar[]_LOCAL_PATH=$withval]
+ )
+ # Require this argument
+ AC_MSG_NOTICE([Checking whether local path is specified for 'pdk'])
+ if test "x$[]pdkvar[]_LOCAL_PATH" == "x" ; then
+ AC_MSG_ERROR([Option --with-pdk-local-path=<path> not specified!])
+ fi
+ pdkvar[]_LOCAL_PATH=$(readlink -f $[]pdkvar[]_LOCAL_PATH)
+ AC_SUBST([]pdkvar[]_LOCAL_PATH)
+ ])
+
+ # --with-pdk-dist-path=PDK_DIST_PATH
+ m4_foreach_w(pdk, $1, [
+ m4_define([pdkvar], [m4_normalize(m4_esyscmd(echo pdk | tr "a-z" "A-Z"))])
+ pdkvar[]_DIST_PATH=""
+ AC_ARG_WITH(pdk-dist-path,
+ [AS_HELP_STRING([--with-pdk-dist-path=/path/to/install/pdks], "staging location to install the PDKs for distribution (optional)")],
+ [[]pdkvar[]_DIST_PATH=$withval]
+ )
+ # Require this argument
+ AC_MSG_NOTICE([Checking whether distribution path is specified for 'pdk'])
+ if test "x$[]pdkvar[]_DIST_PATH" == "x" ; then
+ AC_MSG_NOTICE([Option --with-pdk-dist-path=<path> not specified. Local install only."])
+ fi
+ pdkvar[]_DIST_PATH=$(readlink -f $[]pdkvar[]_DIST_PATH)
+ AC_SUBST([]pdkvar[]_DIST_PATH)
+ ])
+
+ # --with-pdk-link-targets=PDK_LINK_TARGETS
+ m4_foreach_w(pdk, $1, [
+ m4_define([pdkvar], [m4_normalize(m4_esyscmd(echo pdk | tr "a-z" "A-Z"))])
+ # Default link_targets = "none"
+ pdkvar[]_LINK_TARGETS="none"
+
+ AC_ARG_WITH(pdk-link-targets,
+ [AS_HELP_STRING([--with-pdk-link-targets=none|source], "make symbolic links to existing files @<:@default=none@:>@")],
+ [[]pdkvar[]_LINK_TARGETS=$with_[]pdk[]_link_targets]
+ )
+ AC_SUBST([]pdkvar[]_LINK_TARGETS)
+ AC_MSG_NOTICE([Link targets set to $[]pdkvar[]_LINK_TARGETS])
])
])
AC_MSG_NOTICE([Found technology directories: M4_GET_TECHS()])
-M4_GEN_WITH_PDK_SOURCE_ARGS(M4_GET_TECHS())
-
-# --with-local-path=LOCAL_PATH
-AC_ARG_WITH(local-path,
- [AS_HELP_STRING([--with-local-path=/path/to/install/pdks], "location where the PDKs will be installed")],
- [
- LOCAL_PATH=$with_local_path
- AC_MSG_NOTICE([Local installation path set to $LOCAL_PATH])
- ],
- [
- AC_MSG_ERROR([--with-local-path=/path/to/install/pdks is a required argument])
- ]
-)
-AC_SUBST(LOCAL_PATH)
-
-
+M4_GEN_WITH_PDK_ARGS(M4_GET_TECHS())
# Checking if (some) prerequisites are satisfied
AM_PATH_PYTHON([3.4])
-AX_PYTHON_MODULE(distutils)
+AX_PYTHON_MODULE([distutils],[])
AC_PATH_PROG(MAGIC, magic)
if test -z "$MAGIC"; then
AC_MSG_ERROR([You need 'magic' to generate the needed various cell views])
fi
+# Check for "--with-ef-style"
+EF_STYLE=0
+AC_ARG_WITH([ef-style],
+ [AS_HELP_STRING([--with-ef-style],
+ [Use efabless style file system structure @<:@default=no@:>@])],
+ [
+ pdks_ef_style=$withval
+ if test "$withval" == "yes" -o "$withval" == "YES"; then
+ EF_STYLE=1
+ fi
+ ], )
+AC_SUBST(EF_STYLE)
MAKEFILES=$(find .. -name "Makefile.in" | sed 's/\(.*\)\.in/\1/g')
AC_CONFIG_FILES($MAKEFILES)
diff --git a/sky130/Makefile.in b/sky130/Makefile.in
index 1c39ec1..8485deb 100644
--- a/sky130/Makefile.in
+++ b/sky130/Makefile.in
@@ -11,9 +11,41 @@
#
# Instructions:
#
-# Modify values below as needed:
+# Run "configure" from the top level directory. Use the following
+# configuration options to match your environment:
#
-# VENDOR_PATH: points to vendor sources
+# --with-sky130-source-path=<path>
+# where <path> is the location of the Google/Skywater repository
+# cloned from https://github.com/google/skywater-pdk. This
+# option is mandatory and has no default.
+#
+# --with-sky130-local-path=<path>
+# where <path> is the run-time location of the installed PDK
+# files generated by open_pdks. This option is mandatory and
+# has no default.
+#
+# --with-sky130-dist-path=<path>
+# where <path> is the install-time location of the installed
+# PDK files generated by open_pdks, with the expectation that
+# <path> is something like a git repository that is then
+# distributed across a system. If this option is not specified,
+# then files are installed to the local path.
+#
+# --with-sky130-link-targets=<value>
+# where <value> is one of "none" or "source". If set to "source",
+# then where possible, the installed files are symbolic links
+# back to the source, rather than copies of the source. The
+# default value is "none" if the option is not specified.
+#
+# --with-ef-style
+# If specified, then the installation uses the efabless style,
+# which swaps the file hierarchy of file formats vs. IP libraries;
+# e.g., "gds/sky130_fd_sc_hd/" with ef-style, vs.
+# "sky130_fd_sc_hd/gds/" without it.
+#
+# The variables below are substituted from the configuration options:
+#
+# SKYWATER_PATH: points to vendor sources
# EF_STYLE: 1 for efabless style, 0 otherwise
# LINK_TARGETS: link back to source or link to 1st PDK when possible
# DIST_PATH: install location for distributed install
@@ -21,21 +53,16 @@
# for distributed install
#
# Run "make" to stage the PDK for tool setup and vendor libraries
-
-# If installing into the final destination (local install):
#
-# Run "make install-local" to install all staged files
-# ("make install" is equivalent to "make install-local")
-#
-# If installing into a repository to be distributed to the final destination:
-#
-# Run "make install-dist" to install all staged files
+# Run "make install" to install all staged files. The installation is
+# either local or distributed, depending on whether --with-sky130-dist-path
+# has been set when running configure.
#
# Run "make clean" to remove all staging files.
#
# Run "make veryclean" to remove all staging and install log files.
#
-# For the sake of simplicity, the "standard" local install can be done
+# For the sake of simplicity, the "standard" installation can be done
# with the usual
#
# make
@@ -54,8 +81,8 @@
# Mainly, the hierarchy of library names and file types is reversed
# (e.g., sky130_fd_sc_hd/lef vs. lef/sky130_fd_sc_hd).
-EF_STYLE = 0
-# EF_STYLE = 1
+# EF_STYLE = 0 | 1
+EF_STYLE = @EF_STYLE@
# Normally it's fine to keep the staging path in a local directory,
# although /tmp or a dedicated staging area are also fine, as long
@@ -71,9 +98,8 @@
# same files in that PDK, where they exist, and are copied
# from source, where they don't.
-# LINK_TARGETS = source
-LINK_TARGETS = none
-# LINK_TARGETS = sky130A
+# LINK_TARGETS = source | none | sky130A
+LINK_TARGETS = @SKY130_LINK_TARGETS@
# Paths:
@@ -82,26 +108,27 @@
# SKYWATER_PATH = ~/gits/skywater-pdk-scratch/skywater-pdk/libraries
# Version below is also from foss-eda-tools and is more recent than
# the scratch repo above.
-SKYWATER_PATH = @sky130_SOURCE_PATH@
+SKYWATER_PATH = @SKY130_SOURCE_PATH@
-# Path to OSU standard cell library sources
+# Path to OSU standard cell library sources (to be added to configuration options).
OSU_PATH = ~/gits/osu_130_pdk
# NOTE: Install destination is the git repository of the technology platform.
# Once updated in git, the git project can be distributed to all hosts.
#
ifeq (${EF_STYLE}, 1)
- LOCAL_PATH = @LOCAL_PATH@
+ LOCAL_PATH = @SKY130_LOCAL_PATH@
CONFIG_DIR = .ef-config
REV_DIR = ${REVISION}
else
# LOCAL_PATH = /usr/local/share/vlsi/SkyWater
- LOCAL_PATH = @LOCAL_PATH@
+ LOCAL_PATH = @SKY130_LOCAL_PATH@
CONFIG_DIR = .config
REV_DIR = .
endif
-DIST_PATH = ~/gits/ef-skywater-${TECH}
+# DIST_PATH = ~/gits/ef-skywater-${TECH}
+DIST_PATH = @SKY130_DIST_PATH@
# EF process nodes created from the master sources
SKY130A = sky130A
@@ -400,7 +427,12 @@
# ${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_io sky130_fd_io_top_xres4v2 \
# "FIXED_BBOX 0 407 15000 40000"
-install: install-local
+install:
+ if test "x${DIST_PATH}" == "x" ; then
+ ${MAKE} install-local
+ else
+ ${MAKE} install-dist
+ fi
install-local: install-local-a
diff --git a/sky130/netgen/sky130_setup.tcl b/sky130/netgen/sky130_setup.tcl
index bb5c574..7669f39 100644
--- a/sky130/netgen/sky130_setup.tcl
+++ b/sky130/netgen/sky130_setup.tcl
@@ -63,8 +63,7 @@
set devices {mrl1 mrm1 mrm2 mrm3}
#ifdef METAL5
-lappend devices mrm4
-lappend devices mrm5
+lappend devices mrm4 mrm5
#endif (METAL5)
foreach dev $devices {
@@ -101,9 +100,8 @@
#-------------------------------------------
set devices {nshort nlowvt sonos_e nhvnative nhv pshort plowvt phighvt phv}
-lappend devices xcnwvc
-lappend devices xcnwvc2
-lappend devices xchvnwc
+lappend devices ppu npass npd
+lappend devices xcnwvc xcnwvc2 xchvnwc
foreach dev $devices {
if {[lsearch $cells1 $dev] >= 0} {