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

Vitis Tutorials: Hardware Acceleration (XD099)

Document ID
XD099
Release Date
2022-12-01
Version
2022.2 English

Here we use set_property command to set two required property sdx_kernel and sdx_kernel_type. Then we issue ipx::update_source_project_archive and ipx::save_core commands to package the Vivado project into Vivado IP. Finally we use 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

Please note in the above package_xo command usage, we let the tool to generate the kernel description XML file automatically, and don’t 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 below 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.