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!

AR# 52217

Vivado - Can I pass a parameter from a Tcl script to synthesis in the Vivado tool?

Description

Can I pass a parameter from a Tcl script to synthesis in the Vivado tool?

Solution

The Vivado tool supports the ability to pass a defparam value from the command line to the synthesis tool. For example, assume you have a parameter defined as a generic, as below:

e clk_infra 
#(parameter    CLKCORETREE = 0

When you run synthesis from a run, set the parameter value using the set_property:

set_property generic {CLKCORETREE=1} [current_fileset]

If you are calling synth_design directly, use the generic option (see synth_design help).

These are the data types you can use for the parameter:

  • Boolean: set_property generic {ACTIVE_LOW=1'b0 } [current_fileset]
  • Single bit vector : set_property generic {ENABLE=1'b0 } [current_fileset]
  • Multi-bit vector : set_property generic {INIT_VALUE=4'b0101} [current_fileset]
  • Integer: set_property generic { BUS_WIDTH=12} [current_fileset]
  • String: set_property generic {MODE={\"FULL\"}} [current_fileset]
AR# 52217
Date Created 10/03/2012
Last Updated 10/23/2013
Status Active
Type General Article
Tools
  • Vivado Design Suite