Skip to content

Commit c6905f5

Browse files
authored
Merge pull request #2673 from Pinata-Consulting/make-issue-tcl-fixes
Make issue tcl fixes
2 parents d331b37 + b9498cf commit c6905f5

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

flow/test/test_make_issue.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
# make issue smoketest
33
set -ue -o pipefail
44

5-
testname=Element
5+
# Pick a design that builds quickly and has
6+
# has some interesting "make issue" features to test,
7+
# such as ADDITIONAL_FILES
68

7-
make DESIGN_CONFIG=designs/asap7/mock-array/$testname/config.mk floorplan
8-
make ISSUE_TAG=tag DESIGN_CONFIG=designs/asap7/mock-array/$testname/config.mk io_placement_random_issue
9+
make DESIGN_CONFIG=designs/asap7/mock-array/Element/config.mk floorplan
10+
make ISSUE_TAG=tag DESIGN_CONFIG=designs/asap7/mock-array/Element/config.mk io_placement_random_issue
11+
# io placement needs ADDITIONAL_FILES to work, so not a random test
912
test_archive=io_placement_random_tag.tar.gz
1013
ls -l $test_archive
1114
echo "Testing $test_archive"
@@ -14,6 +17,8 @@ rm -rf results/make-issue/
1417
mkdir -p results/make-issue/
1518
cd results/make-issue/
1619
tar --strip-components=1 -xzf ../../$test_archive
17-
runme=run-me-mock-array_$testname-asap7-base.sh
20+
runme=run-me-mock-array_Element-asap7-base.sh
1821
sed -i 's/openroad -no_init/openroad -exit -no_init/g' $runme
1922
./$runme
23+
# check for basic syntax errors
24+
openroad -exit -no_init vars-mock-array_Element-asap7-base.tcl

flow/util/generate-vars.sh

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,6 @@ while read -r VAR; do
4646
# skip variables that match the exclude patterns
4747
continue
4848
fi
49-
# handle special case where the variable needs to be splitted in Tcl code
50-
if [[ "${name}" == "GND_NETS_VOLTAGES" || "${name}" == "PWR_NETS_VOLTAGES" ]]; then
51-
echo "export ${name}='${value}'" >> $1.sh
52-
echo "set env(${name}) ${value}" >> $1.tcl
53-
echo "set env ${name} ${value}" >> $1.gdb
54-
continue
55-
fi
5649

5750
# convert absolute paths if possible to use FLOW_HOME variable
5851
if [[ "${name}" == *"SCRIPTS_DIR"* ]]; then
@@ -63,8 +56,8 @@ while read -r VAR; do
6356

6457
echo "export ${name}=\"${value}\"" >> $1.sh
6558
if [[ "${value}" == *'$'* ]]; then
66-
echo "set env ${name} $(sed -e 's,${FLOW_HOME},getenv("FLOW_HOME"),' <<< ${value})" >> $1.gdb
67-
echo "set env(${name}) \"$(sed -e 's,${FLOW_HOME},$::env(FLOW_HOME),' <<< ${value})\"" >> $1.tcl
59+
echo "set env ${name} $(sed -e 's,${FLOW_HOME},getenv("FLOW_HOME"),g' <<< ${value})" >> $1.gdb
60+
echo "set env(${name}) \"$(sed -e 's,${FLOW_HOME},$::env(FLOW_HOME),g' <<< ${value})\"" >> $1.tcl
6861
else
6962
echo "set env(${name}) \"${value}\"" >> $1.tcl
7063
echo "set env ${name} ${value}" >> $1.gdb

flow/util/utils.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ define \n
9393
endef
9494

9595
define get_variables
96-
$(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$ )))
96+
$(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$ )))
9797
endef
9898

9999
export UNSET_VARIABLES_NAMES := $(call get_variables,command% line environment% default automatic)

0 commit comments

Comments
 (0)