fpga: tools: Fix HLS IP builder for Vivado 2021.1

Original-commit: 9300a0718274ede56cda3f48e43c9f0e1df4674b
This commit is contained in:
Humberto Jimenez
2022-08-25 13:55:30 -05:00
committed by skooNI
parent 959ce49389
commit f53e3f27fc
3 changed files with 7 additions and 12 deletions
+2 -1
View File
@@ -13,6 +13,7 @@
# Prereqs: # Prereqs:
# - TOOLS_DIR must be defined globally # - TOOLS_DIR must be defined globally
# ------------------------------------------------------------------- # -------------------------------------------------------------------
BUILD_VIVADO_HLS_IP = \ BUILD_VIVADO_HLS_IP = \
@ \ @ \
echo "========================================================"; \ echo "========================================================"; \
@@ -28,7 +29,7 @@ BUILD_VIVADO_HLS_IP = \
cd $(5); \ cd $(5); \
echo "BUILDER: Building HLS IP..."; \ echo "BUILDER: Building HLS IP..."; \
export VIV_ERR=0; \ export VIV_ERR=0; \
vivado_hls -f $(call RESOLVE_PATH,$(TOOLS_DIR)/scripts/viv_generate_hls_ip.tcl) -l $(1).log || export VIV_ERR=$$?; \ vitis_hls -f $(call RESOLVE_PATH,$(TOOLS_DIR)/scripts/viv_generate_hls_ip.tcl) -l $(1).log || export VIV_ERR=$$?; \
$(TOOLS_DIR)/scripts/shared-ip-loc-manage.sh --path=$(5)/$(1) release; \ $(TOOLS_DIR)/scripts/shared-ip-loc-manage.sh --path=$(5)/$(1) release; \
exit $$(($$VIV_ERR)) exit $$(($$VIV_ERR))
+1 -11
View File
@@ -40,22 +40,12 @@ function print_color {
# Functions # Functions
#------------------------------------------ #------------------------------------------
export VLINT_PLATFORM=$(uname -o)
function resolve_vlint_path {
if [[ $VLINT_PLATFORM = "Cygwin" ]]; then
echo $(cygpath -am $1)
else
echo $1
fi
}
# Replace any directories with the files they include # Replace any directories with the files they include
function replace_dirs_with_source { function replace_dirs_with_source {
for file in "$@" for file in "$@"
do do
if [ -d $file ]; then if [ -d $file ]; then
# Quotes so that resolve_vlint_path converts all paths echo "resolve_viv_path $(realpath $(find $file -maxdepth 1 -type f)) "
echo "$(resolve_vlint_path "$(realpath $(find $file -maxdepth 1 -type f))") "
else else
echo "$file " echo "$file "
fi fi
+4
View File
@@ -170,6 +170,7 @@ if [[ ${VIVADO_VER^^} = "CMDLINE_ARG" ]]; then
fi fi
fi fi
export VIVADO_PATH=$VIVADO_BASE_PATH/$VIVADO_VER export VIVADO_PATH=$VIVADO_BASE_PATH/$VIVADO_VER
export VIVADO_HLS_PATH=$VIVADO_BASE_PATH/../Vitis_HLS/$VIVADO_VER
echo "Setting up a ${BITNESS}-bit FPGA build environment for the ${DISPLAY_NAME}..." echo "Setting up a ${BITNESS}-bit FPGA build environment for the ${DISPLAY_NAME}..."
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
@@ -194,6 +195,9 @@ if [[ -e $VIVADO_PATH/.settings${BITNESS}-Vivado_Lab.sh ]]; then
else else
$VIVADO_PATH/.settings${BITNESS}-Vivado.sh $VIVADO_PATH/.settings${BITNESS}-Vivado.sh
fi fi
if [[ -e $(readlink -f $VIVADO_HLS_PATH)/.settings${BITNESS}-Vitis_HLS.sh ]]; then
$(readlink -f $VIVADO_HLS_PATH)/.settings${BITNESS}-Vitis_HLS.sh
fi
if [[ -e $(readlink -f $VIVADO_BASE_PATH/..)/DocNav/.settings${BITNESS}-DocNav.sh ]]; then if [[ -e $(readlink -f $VIVADO_BASE_PATH/..)/DocNav/.settings${BITNESS}-DocNav.sh ]]; then
$(readlink -f $VIVADO_BASE_PATH/..)/DocNav/.settings${BITNESS}-DocNav.sh $(readlink -f $VIVADO_BASE_PATH/..)/DocNav/.settings${BITNESS}-DocNav.sh
fi fi