diff options
author | Humberto Jimenez <humberto.jimenez@ni.com> | 2020-04-13 14:48:48 -0500 |
---|---|---|
committer | Wade Fife <wade.fife@ettus.com> | 2020-04-14 10:43:51 -0500 |
commit | 932b7cbb040cef7fce0c83f81839722fd8ad5bdf (patch) | |
tree | 316d7ea8b825632b37099868663de3813ad71491 /fpga/usrp3/tools/scripts | |
parent | 9d6d26ca350b9cc055a556dd420d56f48384ddf4 (diff) | |
download | uhd-932b7cbb040cef7fce0c83f81839722fd8ad5bdf.tar.gz uhd-932b7cbb040cef7fce0c83f81839722fd8ad5bdf.tar.bz2 uhd-932b7cbb040cef7fce0c83f81839722fd8ad5bdf.zip |
fpga: tools: Option to check for full Vivado version
This commits enables the FPGA build infrastructure to require a very
specific Vivado version, all the way to the patch level.
Vivado typically has the following version format:
Year.release.update_patch
This commit enables setupenv_base.sh to optionally look for the
environment variable VIVADO_VER_FULL, which should contain the
full Vivado version in the format specified above.
Vivado is directly used to retrieve the installed version, returning
an error if the requested version is not found.
Example in setupenv.sh (which calls setupenv_base.sh):
VIVADO_VER=2019.1
VIVADO_VER_FULL=2019.1.1_AR73068
The setupenv.sh script will setup Vivado 2019.1, but it will also
verify that both Update 1 and patch AR73068 are installed.
Diffstat (limited to 'fpga/usrp3/tools/scripts')
-rw-r--r-- | fpga/usrp3/tools/scripts/setupenv_base.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/fpga/usrp3/tools/scripts/setupenv_base.sh b/fpga/usrp3/tools/scripts/setupenv_base.sh index d401b410e..76385c598 100644 --- a/fpga/usrp3/tools/scripts/setupenv_base.sh +++ b/fpga/usrp3/tools/scripts/setupenv_base.sh @@ -199,6 +199,30 @@ if [[ -x `which tput 2>/dev/null` ]] ; then fi VIVADO_EXEC="$REPO_BASE_PATH/tools/scripts/launch_vivado.sh" +# If an extended (i.e. full) version is provided, use Vivado to check +# that the installed version is correct. +# This optional env variable may be used to check for specific Vivado +# Updates or Patches to be installed. +# If multiple patches are installed, it is recommended that the user +# runs 'vivado -version' from the installation directory to determine +# the order in which patches were applied by Vivado. +# Example: +# VIVADO_VER=2019.1 +# VIVADO_VER_FULL=2019.1.1_AR73068 +# The setupenv.sh script will setup Vivado 2019.1, but it will also +# verify that both Update 1 and patch AR73068 are installed. +if [[ -n $VIVADO_VER_FULL ]]; then + INSTALLED_VIV=$($VIVADO_PATH/bin/vivado -version | grep $VIVADO_VER_FULL) + if [[ $? -eq 0 ]]; then + echo " Installed version is $INSTALLED_VIV" + else + echo "- Vivado: ERROR! Requested version ($VIVADO_VER_FULL) not installed." + echo " Install the required updates/patches and verify that the env variable" + echo " \"VIVADO_VER_FULL\" matches the version printed by \"vivado -version\"." + return 1 + fi +fi + #---------------------------------------------------------------------------- # Prepare Modelsim environment #---------------------------------------------------------------------------- |