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/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)