package_xo Command - 2023.2 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2023-12-13
Version
2023.2 English

Syntax

package_xo  -kernel_name <arg> [-force] [-kernel_xml <arg>]
            [-output_kernel_xml <arg>] [-design_xml <arg>]
            [-ip_directory <arg>] [-parent_ip_directory <arg>]
            [-kernel_files <args>] [-kernel_xml_args <args>]
            [-kernel_xml_pipes <args>] [-kernel_xml_connections <args>]
            [-ctrl_protocol <arg>] -xo_path <arg> [-quiet] [-verbose]

Description

The package_xo command is a Tcl command within the AMD Vivado™ Design Suite. Kernels written in RTL are compiled in the Vivado tool using the package_xo command line utility which generates a Xilinx object (XO) file which can subsequently used by the v++ command, during the linking stage.

Table 1. Arguments
Argument Description
-kernel_name <arg> (Required) Specify the name of the RTL kernel.
-force (Optional) Overwrite an existing XO file if one exists.
-kernel_xml <arg> (Optional) Specify the path to an existing kernel XML file. The Vivado tool will create a kernel.xml file for the XO file if one is not specified.
-output_kernel_xml (Optional) Specify the path to write the kernel XML file. The Vivado tool will create a kernel.xml file to include in the XO file, and also write it to the specified output file.
Tip: You can use this option to generate a kernel.xml file which you can edit and use as an input in the package_xo command.
-design_xml <arg> (Optional) Specify the path to an existing design XML file
-ip_directory <arg> (Optional) Specify the path to the packaged IP directory.
-parent_ip_directory (Optional) If the kernel IP directory specified contains multiple IPs, specify a directory path to the parent IP where its component.xml is located directly below.
-kernel_files (Optional) Kernel file name(s). Can be used to add a C-model to your kernel XO to enable software emulation for your kernel.
-kernel_xml_args <args> (Optional) Generate the kernel.xml with the specified function arguments. Each argument value should use the following format:
{name:addressQualifier:id:port:size:offset:type:memSize} 
Note: memSize is optional.
-kernel_xml_pipes <args> (Optional) Generate the kernel.xml with the specified pipe(s). Each pipe value use the following format:
{name:width:depth}
-kernel_xml_connections <args> (Optional) Generate the kernel.xml file with the specified connections. Each connection value should use the following format:
{srcInst:srcPort:dstInst:dstPort}
-ctrl_protocol Kernel control protocol as described in PL Kernel Properties. Valid values: ap_ctrl_hs, ap_ctrl_chain, ap_ctrl_none, user_managed.
Tip: The default ap_ctrl_hs is written to the kernel.xml file when -ctrl_protocol is not specified.
-xo_path <arg> (Required) Specify the path and file name of the compiled object (XO) file.
-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.

Examples

The following example creates the specified XO file containing an RTL kernel of the specified name using the ap_ctrl_chain control protocol, and creates the kernel.xml file because one has not been specified:

package_xo -xo_path Vadd_A_B.xo -kernel_name Vadd_A_B -ctrl_protocol ap_ctrl_chain -ip_directory ./ip
The following example creates the XO file using the specified kernel.xml file:
package_xo -xo_path Vadd_A_B.xo -kernel_name Vadd_A_B -kernel_xml kernel.xml -ip_directory ./ip
Tip: The control protocol will be defined in the specified kernel.xml file.