Querying IP Customization Files - 2021.2 English

Vivado Design Suite User Guide : Designing with IP (UG896)

Document ID
Release Date
2021.2 English

Tcl Script for Getting Files for Source Control

This example script shows how to get all files for a given IP customization. You can use this script to generate a list of files for use with a source control system.

# Create a project in memory, no project directory
# created on disk
create_project -in_memory -part <part> 
# read an IP customization
read_ip <ip_name>.xci
# Generate all the output products 
generate_target all [get_ips <ip_name>]
# Create a DCP for the IP
synth_ip [get_ips <ip_name>]
# Query all the files for this IP
get_files -all -of_objects [get_files <ip_name>.xci]
Note: See the following table for a more detailed explanation on these Tcl commands and when to use them.

Querying an Ordered Source List

When creating custom scripts, you can use one of the following Tcl commands:

For IP Only: Synthesis

get_files -compile_order sources -used_in synthesis \
-of_objects [get_files <ip_name>.xci]

For IP Only: Simulation:

get_files -compile_order sources -used_in simulation \
-of_objects [get_files <ip_name>.xci]

For Top-Level Design: Including IP For Synthesis:

get_files -compile_order sources -used_in synthesis 

For Top-Level Design: Including IP For Simulation:

get_files -compile_order sources -used_in simulation