axi_dmac: generalize version check

In some cases, the Vivado version can contain other characters than just
numbers. One such example is after applying the patch of AR# 71948,
which makes `version -short` return something like `2018.3_AR71948`.

This patch changes the version check to ignore anything after the first
two components of the version.
main
Mathias Tausen 2020-04-02 09:30:36 +02:00 committed by Laszlo Nagy
parent b774e1ca7d
commit 3857bdd16b
1 changed files with 2 additions and 1 deletions

View File

@ -28,7 +28,8 @@ proc init {cellpath otherInfo} {
# Versions earlier than 2017.3 infer sub-optimal asymmetric memory
# See https://www.xilinx.com/support/answers/69179.html
if {[expr [join [lrange [split [version -short] .] 0 1] .] > 2017.2 ]} {
regexp {^[0-9]+\.[0-9]+} [version -short] short_version
if {[expr $short_version > 2017.2]} {
set_property "CONFIG.ALLOW_ASYM_MEM" 1 $ip
}
}