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
日期 12/15/2012
状态 Active
Type 综合文章
Tools More Less