Get the Required Simulation Files - 2022.1 English

Vivado Design Suite Tutorial: Designing with IP (UG939)

Document ID
UG939
Release Date
2022-06-10
Version
2022.1 English
As an alternative to the export_simulation command, you can manually gather the required files to support third-party simulation.
Note: If there is a need to use the VIP (Verification IP) on IP, use the Tcl command: set_property CONFIG.<AXI interface> [get_ips <ip>] and additional simulation files will be generated. See Vivado Design Suite User Guide: Designing with IP (UG896) for more information.
  1. To get all files that an IP delivers for simulation, use the get_files Tcl command. In the Tcl Console, type the following command:
    get_files -compile_order sources -used_in simulation -of_objects [get_ips char_fifo]
    Where:
    -used_in
    Lets you specify files that are marked for use in simulation, or marked for use in synthesis.
    -of_object
    Lets you extract files that are associated with the specified IP customization file.

    This produces a list of file names, including the full path, required to simulate the IP.

    In this case, the list includes:

    …/char_fifo/fifo_generator_v13_2/simulation/fifo_generator_vlog_beh.v
    …/char_fifo/fifo_generator_v13_2/hdl/fifo_generator_v13_2_rfs.vhd
    …/char_fifo/fifo_generator_v13_2/hdl/fifo_generator_v13_2_rfs.v
    …/char_fifo/sim/char_fifo.v

    Each simulation file has a LIBRARY property that you can query. For VHDL files, the library associated with each file is required for simulation.

  2. To extract the LIBRARY property, type the following Tcl command:
    get_property LIBRARY [get_files char_fifo.v]

    This returns the xil_defaultlib library.

  3. Use the following Tcl script to print out each file used for simulation, including the path, and its associated library:
    # Get the list of files required for simulation
    set ip_files [get_files -compile_order sources -used_in simulation -of_objects 
    [get_ips <IP name>]]
    # For each of these files, get the library information
    foreach file $ip_files {
    puts "[get_property LIBRARY $file] $file"
    }

    In the preceding script, replace <ip_name> with the name of the customized IP to extract files from. In this case, you would use char_fifo.