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 10/23/2013
Status Active
Type General Article
Tools