aboutsummaryrefslogtreecommitdiffstats
path: root/fpga/.ci/scripts/run_setup.sh
diff options
context:
space:
mode:
authorHumberto Jimenez <humberto.jimenez@ni.com>2022-02-21 16:40:40 -0600
committerHumberto Jimenez <31545256+hjimenez-ni@users.noreply.github.com>2022-03-15 08:49:25 -0500
commit232a9a7345f0264602caba0caf2b96dd0856aed6 (patch)
treef475c37f111750cd5bfbc968c66b6942e66df48f /fpga/.ci/scripts/run_setup.sh
parent4fc2e3beeed4759dc108a670350276ae5554e072 (diff)
downloaduhd-232a9a7345f0264602caba0caf2b96dd0856aed6.tar.gz
uhd-232a9a7345f0264602caba0caf2b96dd0856aed6.tar.bz2
uhd-232a9a7345f0264602caba0caf2b96dd0856aed6.zip
fpga: ci: Add stages-based pipeline
Diffstat (limited to 'fpga/.ci/scripts/run_setup.sh')
-rw-r--r--fpga/.ci/scripts/run_setup.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/fpga/.ci/scripts/run_setup.sh b/fpga/.ci/scripts/run_setup.sh
new file mode 100644
index 000000000..c70fd5702
--- /dev/null
+++ b/fpga/.ci/scripts/run_setup.sh
@@ -0,0 +1,43 @@
+#
+# Copyright 2022 Ettus Research, a National Instruments Brand
+#
+# SPDX-License-Identifier: LGPL-3.0-or-later
+#
+# Description:
+#
+# Script to run NI hwsetup and UHD setupenv for the target build. Always
+# source this file.
+#
+# Arguments:
+#
+# $1 = Directory where setupenv is located
+#
+# Example:
+#
+# source run_setup.sh ./usrp3/top/x400
+#
+
+set -e
+
+echo "---- Set environment variables ----"
+export path_hwtools=$BUILD_SOURCESDIRECTORY/hwtools/head/setup
+export PATH=$path_hwtools:$PATH
+
+echo "---- Run hwsetup ----"
+# This script sets the XILINX_VIVADO, MODELSIM, and LIB_BASE_PATH
+# variables based on the agent's configuration so we can find the EDA
+# tools.
+pushd $BUILD_SOURCESDIRECTORY/uhddev/fpga/.ci/hwtools
+source hwsetup.sh
+popd
+
+echo "---- Install Vivado patches ----"
+pushd $BUILD_SOURCESDIRECTORY
+wget -q $PATCHES_PATH/2019.1/AR73068_Vivado_2019_1_preliminary_rev1.zip -O ./AR73068_Vivado_2019_1_preliminary_rev1.zip
+unzip -q -o AR73068_Vivado_2019_1_preliminary_rev1.zip -d ./patch/
+export XILINX_PATH=$PWD/patch/vivado
+popd
+
+echo "---- Run setupenv ----"
+export MSIM_VIV_COMPLIBDIR=$LIB_BASE_PATH/vivado/2019.1.1/modelsim_SE-64_2020
+source $1/setupenv.sh --vivado-path $(dirname $XILINX_VIVADO) --modelsim-path $(dirname $MODELSIM)