scripts/xilinx: Version mismatch is upgraded to ERROR

There is a major compatibility issue between 2019.1 and 2019.2.

The file system_top.hdf got a different file extention. This will
cause a compilation failer in the end of the build. To save time
and fail earlier, upgrade the version mismatch message to ERROR.

If user still wants to build a branch with different tool version
the variable ADI_IGNORE_VERSION_CHECK should be set to 1.
main
Istvan Csomortani 2020-05-15 09:23:59 +03:00 committed by István Csomortáni
parent 10c9f7a70d
commit 6535e5b2ba
2 changed files with 28 additions and 8 deletions

View File

@ -264,11 +264,21 @@ proc adi_ip_create {ip_name} {
global IGNORE_VERSION_CHECK global IGNORE_VERSION_CHECK
set VIVADO_VERSION [version -short] set VIVADO_VERSION [version -short]
if {$IGNORE_VERSION_CHECK} {
if {[string compare $VIVADO_VERSION $REQUIRED_VIVADO_VERSION] != 0} { if {[string compare $VIVADO_VERSION $REQUIRED_VIVADO_VERSION] != 0} {
puts -nonewline "CRITICAL WARNING: vivado version mismatch; " puts -nonewline "CRITICAL WARNING: vivado version mismatch; "
puts -nonewline "expected $REQUIRED_VIVADO_VERSION, " puts -nonewline "expected $REQUIRED_VIVADO_VERSION, "
puts -nonewline "got $VIVADO_VERSION.\n" puts -nonewline "got $VIVADO_VERSION.\n"
} }
} else {
if {[string compare $VIVADO_VERSION $REQUIRED_VIVADO_VERSION] != 0} {
puts -nonewline "ERROR: vivado version mismatch; "
puts -nonewline "expected $REQUIRED_VIVADO_VERSION, "
puts -nonewline "got $VIVADO_VERSION.\n"
puts -nonewline "This ERROR message can be down-graded to CRITICAL WARNING by setting ADI_IGNORE_VERSION_CHECK environment variable to 1. Be aware that ADI will not support you, if you are using a different tool version.\n"
exit 2
}
}
create_project $ip_name . -force create_project $ip_name . -force

View File

@ -119,11 +119,21 @@ proc adi_project {project_name {mode 0} {parameter_list {}} } {
} }
set VIVADO_VERSION [version -short] set VIVADO_VERSION [version -short]
if {$IGNORE_VERSION_CHECK} {
if {[string compare $VIVADO_VERSION $REQUIRED_VIVADO_VERSION] != 0} { if {[string compare $VIVADO_VERSION $REQUIRED_VIVADO_VERSION] != 0} {
puts -nonewline "CRITICAL WARNING: vivado version mismatch; " puts -nonewline "CRITICAL WARNING: vivado version mismatch; "
puts -nonewline "expected $REQUIRED_VIVADO_VERSION, " puts -nonewline "expected $REQUIRED_VIVADO_VERSION, "
puts -nonewline "got $VIVADO_VERSION.\n" puts -nonewline "got $VIVADO_VERSION.\n"
} }
} else {
if {[string compare $VIVADO_VERSION $REQUIRED_VIVADO_VERSION] != 0} {
puts -nonewline "ERROR: vivado version mismatch; "
puts -nonewline "expected $REQUIRED_VIVADO_VERSION, "
puts -nonewline "got $VIVADO_VERSION.\n"
puts -nonewline "This ERROR message can be down-graded to CRITICAL WARNING by setting ADI_IGNORE_VERSION_CHECK environment variable to 1. Be aware that ADI will not support you, if you are using a different tool version.\n"
exit 2
}
}
if {$mode == 0} { if {$mode == 0} {
set project_system_dir "./$project_name.srcs/sources_1/bd/system" set project_system_dir "./$project_name.srcs/sources_1/bd/system"