Step 4: Package Vivado IP and generate Vitis kernel file - 2023.1 English

Vitis Tutorials: Hardware Acceleration (XD099)

Document ID
Release Date
2023.1 English

Here you use set_property command to set two required property sdx_kernel and sdx_kernel_type. Then you issue the ipx::update_source_project_archive and ipx::save_core commands to package the Vivado project into Vivado IP. Finally, you use the package_xo command to generate the Vitis XO file.

set_property sdx_kernel true [ipx::current_core]
set_property sdx_kernel_type rtl [ipx::current_core]
ipx::update_source_project_archive -component [ipx::current_core]
ipx::save_core [ipx::current_core]
package_xo -force -xo_path ../krnl_aes.xo -kernel_name krnl_aes -ctrl_protocol ap_ctrl_hs -ip_directory ./krnl_aes_ip -output_kernel_xml ../krnl_aes.xml

Note in the above package_xo command usage, you let the tool to generate the kernel description XML file automatically, and do not need to manually create it. If you have an existing Vitis compatible Vivado IP and need to generate XO file from it, you could also manually create the kernel XML file and designate it in the command as per the following usage:

package_xo -xo_path ../krnl_aes.xo -kernel_name krnl_aes -ip_directory ./krnl_aes_ip -kernel_xml ../krnl_aes.xml

In this way, the kernel execution model is specified in the XML file with hwControlProtocol property instead of in package_xo command line option.