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# 45715

Project Navigator - How to pass a Tcl variable to an XST generic


Using Tcl variables to apply values to HDL and XST generics can be very powerful to allow users to have greater control of their design without modifying constant values in their code. Is this possible with Tcl scripts?


While XST is not able to directly read a Tcl variable, it is possible to assign the value of a Tcl variable to an XST property.

To apply a Tcl variable value to an XST generic the syntax in the example below can be used:


set test_var 16

set_property generic generic_name_in_hdl=$test_var [current_fileset]

This will apply the value 16 to the generic in question, (i.e. generic_name_in_hdl).
AR# 45715
Date Created 01/23/2012
Last Updated 12/15/2012
Status Active
Type General Article
  • ISE Design Suite - 13.1
  • ISE Design Suite - 13.2
  • ISE Design Suite - 13.3
  • ISE Design Suite - 13.4