Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make issue tcl fixes #2673

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions flow/test/test_make_issue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
11 changes: 2 additions & 9 deletions flow/util/generate-vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
maliberty marked this conversation as resolved.
Show resolved Hide resolved

# convert absolute paths if possible to use FLOW_HOME variable
if [[ "${name}" == *"SCRIPTS_DIR"* ]]; then
Expand All @@ -63,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
Expand Down
2 changes: 1 addition & 1 deletion flow/util/utils.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading