UPGRADE YOUR BROWSER
We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!
04-20-2017 09:21 AM
Hi guys,
when executing a tcl script it would be useful know what vivado_hls version is running.
Unfortunately the tcl command I use in Vivado Design Tool:
[version -short]
doesn't work with vivado_hls.
Someone did find a workaround?
10-30-2017 04:57 AM
I did forget about this post for some time. Meanwhile I have developed my own solution. Here the TCL procedure I use in my current scripts
# # TCL procedure that identifies the Vivado_hls version simply looking # inside the path environment variable. Usage example: # "set Vivado_ver [VivadoVer]" # Tested on Vivado versions: 2017.3, 2017.2, 2016.4, 2016.3, 2016.1, 2015.4, 2014.4 # proc VivadoVer {} { set position_VivadoHlsVer [lsearch [file split $::env(PATH)] Vivado_HLS]+1 set position_VivadoVer [lsearch [file split $::env(PATH)] Vivado]+1 set position_SdkVer [lsearch [file split $::env(PATH)] SDK]+1 if {${position_VivadoHlsVer}>0} { set Vivado_ver [lrange [file split $::env(PATH)] ${position_VivadoHlsVer} ${position_VivadoHlsVer}] puts "\[VivadoVer{}\] Found 'Vivado_HLS' string in the path, ver: $Vivado_ver" } elseif {${position_VivadoVer}>0} { set Vivado_ver [lrange [file split $::env(PATH)] ${position_VivadoVer} ${position_VivadoVer}] puts "\[VivadoVer{}\] Did not find 'Vivado_HLS' string in the path but have found 'Vivado', ver: $Vivado_ver" } elseif {${position_SdkVer}>0} { set Vivado_ver [lrange [file split $::env(PATH)] ${position_SdkVer} ${position_SdkVer}] puts "\[VivadoVer{}\] Did not find 'Vivado_HLS' string in the path but have found 'SDK', ver: $Vivado_ver" } else { set Vivado_ver "UNKNOW" puts "\[VivadoVer{}\] Did not find any 'Vivado' string in the path, ver: $Vivado_ver" } return $Vivado_ver }
Depending on the Vivado version I run, I had got different "$path" variables with or without the "Vivado_HLS" string inside. Here some usage example:
2017.2
$ source /soft/Xilinx/Vivado/2017.2/settings64.csh $ tclsh % set Vivado_ver [VivadoVer] [VivadoVer{}] Found 'Vivado_HLS' string in the path, ver: 2017.2 2017.2
2017.3
$ source /soft/Xilinx/Vivado/2017.3/settings64.csh
$ tclsh
%set Vivado_ver [VivadoVer] [VivadoVer{}] Did not find 'Vivado_HLS' string in the path but have found 'Vivado', ver: 2017.3 2017.3
2014.4
$ source /soft/Xilinx/Vivado/2014.4/settings64.csh
$ tclsh
% set Vivado_ver [VivadoVer] [VivadoVer{}] Found 'Vivado_HLS' string in the path, ver: 2014.4 2014.4
Does anyone have a better solution ?
10-27-2017 10:31 AM
I had the same error but I just realized I had to run vivado, not vivado_hls.
10-30-2017 04:57 AM
I did forget about this post for some time. Meanwhile I have developed my own solution. Here the TCL procedure I use in my current scripts
# # TCL procedure that identifies the Vivado_hls version simply looking # inside the path environment variable. Usage example: # "set Vivado_ver [VivadoVer]" # Tested on Vivado versions: 2017.3, 2017.2, 2016.4, 2016.3, 2016.1, 2015.4, 2014.4 # proc VivadoVer {} { set position_VivadoHlsVer [lsearch [file split $::env(PATH)] Vivado_HLS]+1 set position_VivadoVer [lsearch [file split $::env(PATH)] Vivado]+1 set position_SdkVer [lsearch [file split $::env(PATH)] SDK]+1 if {${position_VivadoHlsVer}>0} { set Vivado_ver [lrange [file split $::env(PATH)] ${position_VivadoHlsVer} ${position_VivadoHlsVer}] puts "\[VivadoVer{}\] Found 'Vivado_HLS' string in the path, ver: $Vivado_ver" } elseif {${position_VivadoVer}>0} { set Vivado_ver [lrange [file split $::env(PATH)] ${position_VivadoVer} ${position_VivadoVer}] puts "\[VivadoVer{}\] Did not find 'Vivado_HLS' string in the path but have found 'Vivado', ver: $Vivado_ver" } elseif {${position_SdkVer}>0} { set Vivado_ver [lrange [file split $::env(PATH)] ${position_SdkVer} ${position_SdkVer}] puts "\[VivadoVer{}\] Did not find 'Vivado_HLS' string in the path but have found 'SDK', ver: $Vivado_ver" } else { set Vivado_ver "UNKNOW" puts "\[VivadoVer{}\] Did not find any 'Vivado' string in the path, ver: $Vivado_ver" } return $Vivado_ver }
Depending on the Vivado version I run, I had got different "$path" variables with or without the "Vivado_HLS" string inside. Here some usage example:
2017.2
$ source /soft/Xilinx/Vivado/2017.2/settings64.csh $ tclsh % set Vivado_ver [VivadoVer] [VivadoVer{}] Found 'Vivado_HLS' string in the path, ver: 2017.2 2017.2
2017.3
$ source /soft/Xilinx/Vivado/2017.3/settings64.csh
$ tclsh
%set Vivado_ver [VivadoVer] [VivadoVer{}] Did not find 'Vivado_HLS' string in the path but have found 'Vivado', ver: 2017.3 2017.3
2014.4
$ source /soft/Xilinx/Vivado/2014.4/settings64.csh
$ tclsh
% set Vivado_ver [VivadoVer] [VivadoVer{}] Found 'Vivado_HLS' string in the path, ver: 2014.4 2014.4
Does anyone have a better solution ?