File tree Expand file tree Collapse file tree 5 files changed +26
-12
lines changed
Expand file tree Collapse file tree 5 files changed +26
-12
lines changed Original file line number Diff line number Diff line change 33# Set developer paths and environment variables here,
44# user settings go in ./env.sh
55function __setpaths() {
6- local DIR=$( readlink -f " $( dirname " ${BASH_SOURCE[0]} " ) " )
6+ local DIR=$( readlink -f " $( dirname " ${BASH_SOURCE[0]:- ${( % ) :-% x} } " ) " )
77 [ " $( find $DIR /dependencies -type f -user root) " ] && echo " WARNING! Files set up by sudo found in $DIR "
88 export PATH=" $DIR /dependencies/bin:$PATH "
99 export CMAKE_INSTALL_RPATH=$DIR /dependencies/lib:$DIR /dependencies/lib64
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22function __setpaths() {
33 if [[ " $OSTYPE " == " darwin" * ]]; then
4- DIR=" $( dirname $( perl -e ' use Cwd "abs_path";print abs_path(shift)' " ${BASH_SOURCE[0]} " ) ) "
4+ DIR=" $( dirname $( perl -e ' use Cwd "abs_path";print abs_path(shift)' " ${BASH_SOURCE[0]:- ${( % ) :-% x} } " ) ) "
55 else
6- DIR=" $( dirname $( readlink -f " ${BASH_SOURCE[0]} " ) ) "
6+ DIR=" $( dirname $( readlink -f " ${BASH_SOURCE[0]:- ${( % ) :-% x} } " ) ) "
77 fi
88
99 export OPENROAD=${DIR} /tools/OpenROAD
Original file line number Diff line number Diff line change @@ -18,15 +18,19 @@ proc load_design { design_file sdc_file } {
1818 }
1919 }
2020 read_verilog $::env(RESULTS_DIR) /$design_file
21- if { [env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] ||
22- [env_var_exists_and_non_empty SWAP_ARITH_OPERATORS] } {
21+ if {
22+ [env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] ||
23+ [env_var_exists_and_non_empty SWAP_ARITH_OPERATORS]
24+ } {
2325 link_design -hier $::env(DESIGN_NAME)
2426 } else {
2527 link_design $::env(DESIGN_NAME)
2628 }
2729 } elseif { $ext == " .odb" } {
28- if { [env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] ||
29- [env_var_exists_and_non_empty SWAP_ARITH_OPERATORS] } {
30+ if {
31+ [env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] ||
32+ [env_var_exists_and_non_empty SWAP_ARITH_OPERATORS]
33+ } {
3034 read_db -hier $::env(RESULTS_DIR) /$design_file
3135 } else {
3236 read_db $::env(RESULTS_DIR) /$design_file
Original file line number Diff line number Diff line change @@ -56,8 +56,10 @@ json -o $::env(RESULTS_DIR)/mem.json
5656exec -- $::env(PYTHON_EXE) $::env(SCRIPTS_DIR) /mem_dump.py \
5757 --max-bits $::env(SYNTH_MEMORY_MAX_BITS) $::env(RESULTS_DIR) /mem.json
5858
59- if { [env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] ||
60- [env_var_exists_and_non_empty SWAP_ARITH_OPERATORS] } {
59+ if {
60+ [env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] ||
61+ [env_var_exists_and_non_empty SWAP_ARITH_OPERATORS]
62+ } {
6163 source $::env(SCRIPTS_DIR) /synth_wrap_operators.tcl
6264} else {
6365 synth -top $::env(DESIGN_NAME) -run fine: {*}$synth_full_args
Original file line number Diff line number Diff line change @@ -215,7 +215,15 @@ vars:
215215.PHONY : print-%
216216# Print any variable, for instance: make print-DIE_AREA
217217print-% :
218- $(file >$(OBJECTS_DIR ) /print_tmp_$$,$($* ) )
218+ # HERE BE DRAGONS!
219+ #
220+ # We have to use /tmp. $(OBJECTS_DIR) may not exist
221+ # at $(file) expansion time, which is before commands are run
222+ # here, so we can't mkdir -p $(OBJECTS_DIR) either
223+ #
224+ # We have to use $(file ...) because we want to be able
225+ # to print variables that contain newlines.
226+ $(file >/tmp/print_tmp$$,$($*))
219227 @echo -n "$* = "
220- @cat $( OBJECTS_DIR ) /print_tmp_ $$
221- @rm $( OBJECTS_DIR ) /print_tmp_ $$
228+ @cat /tmp/print_tmp $$
229+ @rm /tmp/print_tmp $$
You can’t perform that action at this time.
0 commit comments