Adding C-Models to RTL Kernels - 2022.2 English

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

Document ID
UG1393
Release Date
2022-12-07
Version
2022.2 English

RTL kernels support the hardware emulation build, and the hardware build described in Build Targets, but an RTL kernel in its native form does not support software emulation. To support software emulation, you must add a C-model to the packaged RTL kernel using the package_xo -kernel_files option.

Tip: C-models are not supported for user-managed kernels. They are only supported for ap_ctrl_hs and ap_ctrl_chain kernels.

The C-model can be a simple C/C++ application defining the RTL function that is packaged with the RTL code for the kernel. The C-model is included in the packaged kernel (.xo) in a folder called cpu_sources, which the Vitis compiler uses during software emulation. For the hardware emulation and hardware builds, the Vitis compiler always use the RTL implementation of the kernel when creating the device binary (.xclbin).

The Vitis IDE also provides a mechanism for including a C-model with the RTL kernel as described in RTL Kernel Wizard.