Write a tcl script on disk that will recreate a given IP.
Syntax
write_ip_tcl [‑force] [‑no_ip_version] [‑ip_name <arg>] [‑multiple_files]
[‑quiet] [‑verbose] [<objects>] [<tcl_filename>...]
Returns
IP TCL file.
Usage
Name | Description |
---|---|
[-force]
|
Flag to overwrite existing file. |
[-no_ip_version]
|
Flag to not include the IP version in the IP VLNV in create_ip commands. NOTE - this may have implications if there are major IP version changes. |
[-ip_name]
|
Set the name of the IP. This argument is not supported for multiple IP. |
[-multiple_files]
|
Flag to create a .tcl file for each IP supplied as an argument |
[-quiet]
|
Ignore command errors |
[-verbose]
|
Suspend message limits during command execution |
[<objects>]
|
IP(s) to be written to disk Values: IP instance(s) as returned by 'get_ips <instance name>' |
[<tcl_filename>]
|
File path to the exported tcl file. If the path is a directory and multiple IP are given as an argument, a file for each IP will be created. Default: ./ |
Description
This command exports the given IPs as a Tcl script file to the disk.The Tcl script file lets you recreate a configured instance of an IP based on your original sources. When working with a new AMD Vivado™ Design Suite software release, ensure to use the output script from the write_ip_tcl
command. This command creates an IP in the same software release as the Tcl script was generated and ensures the availability of the needed versions of any IP used in the script. You can then migrate the created IP into a new software release using the upgrade_ip
flow.
This command returns TCL_OK if successful, or TCL_ERROR if it fails, unless -quiet is specified.
Arguments
-force
- (Optional) Overwrites an existing IP Tcl file of the same name if it already exists.
-no_ip_version
- (Optional) Does not include the IP version as part of the create_ip
command. upgrade_ip
to migrate from the IP versions.
-ip_name <name>
- (Optional) When writing the Tcl script, use the new <name> instead of the current name for the IP. When the Tcl script is sourced, it creates an IP called <name>.
-multiple_files
- (Optional) By default, write_ip_tcl
generates a single Tcl file to represent all the IP objects that are passed in as arguments. If this flag is used, one Tcl file is generated per IP object. Each filename matches the name of the IP object being written out.
<objects>
- The IP objects for which you would like to generate a Tcl representation on disk.tcl_filename
- (Optional) The path to the Tcl file to be created. If the file already exists,use-force
flag to overwrite it. If no filename is specified, the flow uses default options of either using the project name or the IP name depending upon other command line options. This argument is incompatible with the -multiple_files
option.-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.
-verbose
- (Optional) Temporarily override any message limits and return all messages from this command.
set_msg_config
command.Example
The following example writes all the IP instances in the current project in a single Tcl file.
```write_ip_tcl [get_ips] my_ips.tcl```
The following example writes individual Tcl files for each IP instance in the project.
```write_ip_tcl -multiple_files [get_ips]```
The following example writes a Tcl file that represents the given IP object but when sourced will create it with a new_name.
```write_ip_tcl -ip_name new_name [get_ips <name>]```