Added "--with-sky130-variants=" to the configuration, so that the compile and install can be restricted to only sky130A or sky130B. The default is to compile and install both variants, equivalent to "--with-sky130-variants=all".
diff --git a/scripts/configure b/scripts/configure index 5ccc6d5..29224d0 100755 --- a/scripts/configure +++ b/scripts/configure
@@ -607,6 +607,7 @@ KLAYOUT_DISABLED ALL_TECHS SKY130_SOURCE_PATH +SKY130_ENABLED_VARIANTS SKY130_LINK_TARGETS SED pkgpyexecdir @@ -661,6 +662,7 @@ enable_option_checking enable_sky130_pdk with_sky130_link_targets +with_sky130_variants enable_klayout enable_magic enable_netgen @@ -1346,6 +1348,9 @@ --with-sky130-link-targets=none|source "make symbolic links to existing files [default=none]" + --with-sky130-variants=all|A|B|... + "compile/install specified PDK variants only + [default=all]" --with-ef-style Use efabless style file system structure [default=no] @@ -2186,6 +2191,7 @@ echo "Checking technology sky130..." + SKY130_ENABLED_VARIANTS="all" SKY130_SOURCE_PATH="" SKY130_LINK_TARGETS="none" SKY130_AUTO="0" @@ -2262,6 +2268,18 @@ { $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;} + + # --with-pdk-variants=PDK_ENABLED_VARIANTS + +# Check whether --with-sky130-variants was given. +if test "${with_sky130_variants+set}" = set; then : + withval=$with_sky130_variants; SKY130_ENABLED_VARIANTS=$with_sky130_variants + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: Enabled variants set to $SKY130_ENABLED_VARIANTS" >&5 +$as_echo "$as_me: Enabled variants set to $SKY130_ENABLED_VARIANTS" >&6;} fi @@ -2269,6 +2287,7 @@ + # Export the list of known technologies to the Makefile ALL_TECHS="sky130"
diff --git a/scripts/configure.ac b/scripts/configure.ac index 7f1ba4b..940362d 100755 --- a/scripts/configure.ac +++ b/scripts/configure.ac
@@ -41,6 +41,7 @@ echo "Checking technology pdk..." m4_define([pdkvar], [m4_normalize(m4_esyscmd(echo pdk | tr "a-z-" "A-Z_"))]) + pdkvar[]_ENABLED_VARIANTS="all" pdkvar[]_SOURCE_PATH="" pdkvar[]_LINK_TARGETS="none" pdkvar[]_AUTO="0" @@ -88,10 +89,19 @@ ) AC_SUBST([]pdkvar[]_LINK_TARGETS) AC_MSG_NOTICE([Link targets set to $pdkvar[]_LINK_TARGETS]) + + # --with-pdk-variants=PDK_ENABLED_VARIANTS + AC_ARG_WITH(pdk-variants, + [AS_HELP_STRING([--with-pdk-variants=all|A|B|...], "compile/install specified PDK variants only @<:@default=all@:>@")], + [[]pdkvar[]_ENABLED_VARIANTS=$with_[]pdk[]_variants] + ) + AC_SUBST([]pdkvar[]_ENABLED_VARIANTS) + AC_MSG_NOTICE([Enabled variants set to $pdkvar[]_ENABLED_VARIANTS]) fi AC_SUBST(pdkvar[]_SOURCE_PATH) AC_SUBST(pdkvar[]_LINK_TARGETS) + AC_SUBST(pdkvar[]_ENABLED_VARIANTS) ]) ])
diff --git a/sky130/Makefile.in b/sky130/Makefile.in index 7edf57f..92f9fd5 100644 --- a/sky130/Makefile.in +++ b/sky130/Makefile.in
@@ -113,6 +113,7 @@ # SKYWATER_PATH: Points to vendor sources # EF_STYLE: 1 for efabless style, 0 otherwise # LINK_TARGETS_A: If "source", link back to source when possible +# ENABLED_VARIANTS: If not "all", then compile/install only the specified variants # # Run "make" to stage the PDK for tool setup and vendor libraries # @@ -192,6 +193,18 @@ LINK_TARGETS_A = @SKY130_LINK_TARGETS@ LINK_TARGETS_B = sky130A +# ENABLED_VARIANTS = all | A | B +ENABLED_VARIANTS = @SKY130_ENABLED_VARIANTS@ +ifeq (${ENABLED_VARIANTS},) + VARIANTS += A B +else + ifeq (${ENABLED_VARIANTS}, all) + VARIANTS += A B + else + VARIANTS += ${ENABLED_VARIANTS} + endif +endif + # Paths: # Path to skywater_pdk @@ -538,7 +551,7 @@ SPIEXT = spice endif -all: all-A all-B +all: $(foreach var, ${VARIANTS}, all-$(var)) # Handle prerequisites (fetch and install the PDK and requested libraries) prerequisites: pdk-repo alpha-repo xschem-repo sram-repo osu-t12-repo osu-t15-repo osu-t18-repo @@ -1461,7 +1474,7 @@ options=custom/scripts/gds_import_setup.tcl \ -library digital sky130_osu_sc_18t_ls 2>&1 | tee -a ${SKY130$*}_make.log -install: install-A install-B +install: $(foreach var, ${VARIANTS}, install-$(var)) install-A: echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_install.log @@ -1481,7 +1494,7 @@ -link_from ${DIST_LINK_TARGETS_B} 2>&1 | tee -a ${SKY130B}_install.log echo "Ended SKY130 PDK migration on "`date` >> ${SKY130B}_install.log -uninstall: uninstall-A uninstall-B +uninstall: $(foreach var, ${VARIANTS}, uninstall-$(var)) uninstall-A: echo "Uninstalling SKY130 PDK from ${SHARED_PDKS_PATH}" @@ -1497,7 +1510,7 @@ fi echo "Finished SKY130 PDK uninstall" -clean: clean-A clean-B +clean: $(foreach var, ${VARIANTS}, clean-$(var)) clean-A: ${STAGE} -target ${STAGING_PATH}/${SKY130A} -clean @@ -1505,7 +1518,7 @@ clean-B: ${STAGE} -target ${STAGING_PATH}/${SKY130B} -clean -veryclean: veryclean-A veryclean-B +veryclean: $(foreach var, ${VARIANTS}, veryclean-$(var)) veryclean-A: clean-A ${RM} ${SKY130A}_make.log