After the kernel is designed and tested in the example IP project in the Vivado IDE, the final step is to generate the RTL kernel object (XO) file for use by the Vitis compiler.
Click the Generate RTL Kernel command from the menu. The Generate RTL Kernel dialog box opens with three main packaging options:
- Sources only kernel
- Packages the kernel using the RTL design sources directly.
- Pre-synthesized kernel
- Packages the kernel with the RTL design sources with a synthesized cached output that can be used later on in the flow to avoid re-synthesizing. If the target platform changes, the packaged kernel might fall back to the RTL design sources instead of using the cached output.
- Netlist (DCP) based kernel
- Packages the kernel as a block box, using the netlist generated by the synthesized output of the kernel. This output can be optionally encrypted if necessary. If the target platform changes, the kernel might not be able to re-target the new device and it must be regenerated from the source. If the design contains a block design, the netlist (DCP) based kernel is the only packaging option available.
Optionally, the Software Emulation Sources field lets you specify a software model for your kernel that can be used during software emulation. If the software model contains multiple files, provide a space in between each file in the Source files list, or use the GUI to select multiple files using the CTRL key when selecting the file.
After you click OK, the kernel output products are generated. If the pre-synthesized kernel or netlist kernel option is chosen, then synthesis can run. If synthesis has previously run, it uses those outputs, regardless if they are stale. The kernel Xilinx Object (XO) file is generated in the exports directory of the Vivado kernel project.
At this point, you can close the Vivado kernel project. If the Vivado kernel project was invoked from the Vitis IDE, you can add the example host code called host_example.cpp and the kernel object (XO) file into the ./src folder of the appropriate sub-project of the application project in the Vitis IDE. Refer to Adding Sources for more information.