Querying IP Customization Files - 2024.2 English - 2024.1 English

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

Document ID
UG896
Release Date
2024-11-13
Version
2024.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.
Note: Run the generate_target all [get_ips] and compile_c [get_ips]commands before synth_ip for HLS IPs.

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