generate_target - 2022.1 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
UG835
Release Date
2022-05-05
Version
2022.1 English

Generate target data for the specified source

Syntax

generate_target [‑force] [‑quiet] [‑verbose] <name> <objects>

Usage

Name Description
[-force] Force target data regeneration
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution
<name> List of targets to be generated, or 'all' to generate all supported targets
<objects> The objects for which data needs to be generated

Description

This command generates target data for the specified IP objects (get_ips) or source file for IP cores (.xci and .xco), DSP modules (.slx or .mdl), or block designs (.bd). The target data that is generated are the files necessary to support the IP or block design through the FPGA design flow.

The instantiation template, synthesis netlist, and simulation netlist are standard targets. However, each IP in the catalog may also support its own set of targets. You can view the available targets on an object by examining the SUPPORTED_TARGETS property, or you can use the list_targets command to list the targets for design source file.

Arguments

-force - (Optional) Force target data regeneration, and overwrite any existing target data files. Without -force, the tool will not regenerate any target data that is up-to-date.

-quiet - (Optional) Execute the command quietly, returning no messages from the command. The command also returns TCL_OK regardless of any errors encountered during execution.
Note: Any errors encountered on the command-line, while launching the command, will be returned. Only errors occurring inside the command will be trapped.
-verbose - (Optional) Temporarily override any message limits and return all messages from this command.
Note: Message limits can be defined with the set_msg_config command.
<name> - (Required) The names of the types of target data to create for the specified source. The specific targets supported by an IP core are listed in the SUPPORTED_TARGETS property on the object. You can query this property to see which targets a specific object supports. Standard values are:
  • all - Generate all targets for the specified IP or file, except the example project.
    Note: You can generate an example project for an IP core using the open_example_project command.
  • instantiation_template - Generate the Instantiation template used to add the RTL module definition for the IP core into the current design. The instantiation template can be copied into any desired level of the design hierarchy.
  • synthesis - Synthesis targets deliver HDL files that are used during synthesis for native IP, or deliver a synthesized netlist file (DCP) generated by Vivado® synthesis.
  • simulation - Simulation targets deliver HDL files that are used in simulation.
  • implementation - Implementation generates the necessary data for implementing the IP core, DSP module, or Embedded Processor in the current design.
<objects> - (Required) The objects to generate the target from. Supported objects can include IP core objects (get_ips), or the source files (.xci or .xco), block design files (.bd) from IP integrator, and DSP modules (.slx or .mdl) imported from System Generator.
Note: Use get_files to specify a file object, rather than specifying a file name.

Examples

This example generates the change log for all of the IP cores in the current project, forcing regeneration of any targets that are up-to-date:
generate_target changelog [get_ips] -force
The following example generates the instantiation template and synthesis targets for all of the IP cores in the current project:
generate_target {instantiation_template synthesis} [get_ips]
Tip: Note the use of the braces to pass the list of targets to the command. The absence of the -force option means that only out-of-date targets will be regenerated.
The following example generates all targets for the specified block design:
generate_target all \
[get_files  C:/Data/project_mb/project_mb.srcs/sources_1/bd/base_mb/base_mb.bd]
Important: The use of get_ips is not supported to generate targets for individual IP within block designs. The tool will return an error.
The following queries the SUPPORTED_TARGETS property of the specified IP object, and then generates the example project for the IP:
get_property SUPPORTED_TARGETS [get_ips blk_mem*]
open_example_project -dir C:/Data/examples -force [get_ips blk_mem*]