From f3b69c15c99bb6c2e26edbd39f25c002a9db1ccd Mon Sep 17 00:00:00 2001 From: Istvan Csomortani Date: Tue, 11 Aug 2020 12:02:16 +0100 Subject: [PATCH] scripts/intel: Update version check --- projects/scripts/adi_project_intel.tcl | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/projects/scripts/adi_project_intel.tcl b/projects/scripts/adi_project_intel.tcl index 070f008bf..be7245ff4 100644 --- a/projects/scripts/adi_project_intel.tcl +++ b/projects/scripts/adi_project_intel.tcl @@ -4,6 +4,13 @@ set family "none" set device "none" set version "19.3.0" +## Define the ADI_IGNORE_VERSION_CHECK environment variable to skip version check +if {[info exists ::env(ADI_IGNORE_VERSION_CHECK)]} { + set IGNORE_VERSION_CHECK 1 +} elseif {![info exists IGNORE_VERSION_CHECK]} { + set IGNORE_VERSION_CHECK 0 +} + ## Create a project. # # \param[project_name] - name of the project, must contain a valid carrier name @@ -20,6 +27,7 @@ proc adi_project {project_name {parameter_list {}}} { global device global version global quartus + global IGNORE_VERSION_CHECK # check $ALT_NIOS_MMU_ENABLED environment variables @@ -73,10 +81,20 @@ proc adi_project {project_name {parameter_list {}}} { # version check set m_version [lindex $quartus(version) 1] - if {[string compare $m_version $version] != 0} { - puts -nonewline "Critical Warning: quartus version mismatch; " - puts -nonewline "expected $version, " - puts -nonewline "got $m_version.\n" + if {$IGNORE_VERSION_CHECK} { + if {[string compare $m_version $version] != 0} { + puts -nonewline "CRITICAL WARNING: Quartus version mismatch; " + puts -nonewline "expected $version, " + puts -nonewline "got $m_version.\n" + } + } else { + if {[string compare $m_version $version] != 0} { + puts -nonewline "ERROR: Quartus version mismatch; " + puts -nonewline "expected $version, " + puts -nonewline "got $m_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 + } } # packages used