From 2b69e25d15600f7dc38c5de96d4a6de0165306c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Sat, 11 Jan 2025 18:18:51 +0100 Subject: [PATCH 1/4] makefile: retire moot and broken special casing of *_NETS_VOLTAGES MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Øyvind Harboe --- flow/util/generate-vars.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/flow/util/generate-vars.sh b/flow/util/generate-vars.sh index a45a0556e0..e8e022bde0 100755 --- a/flow/util/generate-vars.sh +++ b/flow/util/generate-vars.sh @@ -46,13 +46,6 @@ while read -r VAR; do # skip variables that match the exclude patterns continue fi - # handle special case where the variable needs to be splitted in Tcl code - if [[ "${name}" == "GND_NETS_VOLTAGES" || "${name}" == "PWR_NETS_VOLTAGES" ]]; then - echo "export ${name}='${value}'" >> $1.sh - echo "set env(${name}) ${value}" >> $1.tcl - echo "set env ${name} ${value}" >> $1.gdb - continue - fi # convert absolute paths if possible to use FLOW_HOME variable if [[ "${name}" == *"SCRIPTS_DIR"* ]]; then From f4c9ebef2051ba9e8f1caa76dc3924302127c16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Sat, 11 Jan 2025 18:19:43 +0100 Subject: [PATCH 2/4] makefile: make issue fix of multiple FLOW_HOME occurrences in one variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Øyvind Harboe --- flow/util/generate-vars.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flow/util/generate-vars.sh b/flow/util/generate-vars.sh index e8e022bde0..0c5a04b5d5 100755 --- a/flow/util/generate-vars.sh +++ b/flow/util/generate-vars.sh @@ -56,8 +56,8 @@ while read -r VAR; do echo "export ${name}=\"${value}\"" >> $1.sh if [[ "${value}" == *'$'* ]]; then - echo "set env ${name} $(sed -e 's,${FLOW_HOME},getenv("FLOW_HOME"),' <<< ${value})" >> $1.gdb - echo "set env(${name}) \"$(sed -e 's,${FLOW_HOME},$::env(FLOW_HOME),' <<< ${value})\"" >> $1.tcl + echo "set env ${name} $(sed -e 's,${FLOW_HOME},getenv("FLOW_HOME"),g' <<< ${value})" >> $1.gdb + echo "set env(${name}) \"$(sed -e 's,${FLOW_HOME},$::env(FLOW_HOME),g' <<< ${value})\"" >> $1.tcl else echo "set env(${name}) \"${value}\"" >> $1.tcl echo "set env ${name} ${value}" >> $1.gdb From e499c5bf673abe2e72865b137ad9ea2e1b405162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Sat, 11 Jan 2025 18:20:31 +0100 Subject: [PATCH 3/4] makefile: make issue now excludes 'export' keyword in variable list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fewer questions when reviewing vars-*.* files Signed-off-by: Øyvind Harboe --- flow/util/utils.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow/util/utils.mk b/flow/util/utils.mk index c1f368bbd9..b9bbcc6075 100644 --- a/flow/util/utils.mk +++ b/flow/util/utils.mk @@ -93,7 +93,7 @@ define \n endef define get_variables -$(foreach V, $(.VARIABLES),$(if $(filter-out $(1), $(origin $V)), $(if $(filter-out .% %QT_QPA_PLATFORM% %TIME_CMD% KLAYOUT% GENERATE_ABSTRACT_RULE% do-step% do-copy% OPEN_GUI% OPEN_GUI_SHORTCUT% SUB_MAKE% UNSET_VARS%, $(V)), $V$ ))) +$(foreach V, $(.VARIABLES),$(if $(filter-out $(1), $(origin $V)), $(if $(filter-out .% %QT_QPA_PLATFORM% %TIME_CMD% KLAYOUT% GENERATE_ABSTRACT_RULE% do-step% do-copy% OPEN_GUI% OPEN_GUI_SHORTCUT% SUB_MAKE% UNSET_VARS% export%, $(V)), $V$ ))) endef export UNSET_VARIABLES_NAMES := $(call get_variables,command% line environment% default automatic) From b9498cf9ebc6a7070561fbfe22082e684082fbe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Sat, 11 Jan 2025 18:21:13 +0100 Subject: [PATCH 4/4] test: make issue, add vars-*.tcl smoketest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Øyvind Harboe --- flow/test/test_make_issue.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/flow/test/test_make_issue.sh b/flow/test/test_make_issue.sh index bc055ddbf6..4f6dd524c0 100755 --- a/flow/test/test_make_issue.sh +++ b/flow/test/test_make_issue.sh @@ -2,10 +2,13 @@ # make issue smoketest set -ue -o pipefail -testname=Element +# Pick a design that builds quickly and has +# has some interesting "make issue" features to test, +# such as ADDITIONAL_FILES -make DESIGN_CONFIG=designs/asap7/mock-array/$testname/config.mk floorplan -make ISSUE_TAG=tag DESIGN_CONFIG=designs/asap7/mock-array/$testname/config.mk io_placement_random_issue +make DESIGN_CONFIG=designs/asap7/mock-array/Element/config.mk floorplan +make ISSUE_TAG=tag DESIGN_CONFIG=designs/asap7/mock-array/Element/config.mk io_placement_random_issue +# io placement needs ADDITIONAL_FILES to work, so not a random test test_archive=io_placement_random_tag.tar.gz ls -l $test_archive echo "Testing $test_archive" @@ -14,6 +17,8 @@ rm -rf results/make-issue/ mkdir -p results/make-issue/ cd results/make-issue/ tar --strip-components=1 -xzf ../../$test_archive -runme=run-me-mock-array_$testname-asap7-base.sh +runme=run-me-mock-array_Element-asap7-base.sh sed -i 's/openroad -no_init/openroad -exit -no_init/g' $runme ./$runme +# check for basic syntax errors +openroad -exit -no_init vars-mock-array_Element-asap7-base.tcl