Add version check to adi_ip.tcl too.

main
Istvan Csomortani 2015-03-05 11:55:09 +02:00
parent bf1388b05e
commit 6995f63134
1 changed files with 19 additions and 0 deletions

View File

@ -1,8 +1,27 @@
# check tool version
if {![info exists REQUIRED_VIVADO_VERSION]} {
set REQUIRED_VIVADO_VERSION "2014.4.1"
}
if {[info exists ::env(ADI_IGNORE_VERSION_CHECK)]} {
set IGNORE_VERSION_CHECK 1
} elseif {![info exists IGNORE_VERSION_CHECK]} {
set IGNORE_VERSION_CHECK 0
}
# ip related stuff # ip related stuff
proc adi_ip_create {ip_name} { proc adi_ip_create {ip_name} {
global REQUIRED_VIVADO_VERSION
global IGNORE_VERSION_CHECK
if {!$IGNORE_VERSION_CHECK && [string compare [version -short] $REQUIRED_VIVADO_VERSION] != 0} {
return -code error [format "ERROR: This library requires Vivado %s." $REQUIRED_VIVADO_VERSION]
}
create_project $ip_name . -force create_project $ip_name . -force
set proj_dir [get_property directory [current_project]] set proj_dir [get_property directory [current_project]]