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!

AR# 35500

Tcl - Is there a command to determine what version of the xtclsh is being run?


Is there a Xilinx Tcl command that returns the version of Xilinx software being used?

It would be nice if there were a command that wouldreport the version of the tools are installed and currently being sourced. Some users would like toinclude this in their Tcl scripts for when multiple people are working on a project and they might have different versions of the tools. They would like the script to be able to automatically take care of any different properties that exist between versions of the tools by being able to know what version of the tools is on a particular computer.


No, there is not a specific command that returns the software version. However, the following code this will do what is requested (run from xtclsh or the Project Navigator Tcl console):

set xil [lindex [split $::env(XILINX) ";"] 0]
if { [catch { open "$xil/fileset.txt" r } hfset] } {
puts "error, could not open install info file, version unknown"
} else {
set versionStr ""
while { ![eof $hfset] } {
set line [gets $hfset]
# get the last entry in the file
regexp {version=(.*)} $line match versionStr

catch { close $hfset }
puts "version is $versionStr"
AR# 35500
Date 12/15/2012
Status Active
Type General Article
  • ISE - 10.1
  • ISE Design Suite - 11.1
  • ISE - 8.1i
  • More
  • ISE - 8.2i
  • ISE - 9.1i
  • Less
Page Bookmarked