Setting Up the XRT Native API - 2023.1 English

Vitis Tutorials: Hardware Acceleration (XD099)

Document ID
XD099
Release Date
2023-08-02
Version
2023.1 English
#include <iostream>
#include <cstring>

// XRT includes
#include "xrt/xrt_bo.h"
#include "xrt/xrt_device.h"
#include <experimental/xrt_xclbin.h>
#include <experimental/xrt_ip.h>

The XRT native API requires some #include statements to support the various class objects and functions of the different elements of the system. In the code sample above you can see the inclusion of header files for the Xilinx device, the device binary (.xclbin), the buffer objects (xrt_bo), and the user-managed kernel (xrt_ip). This last is an important difference in the XRT native API when working with XRT-managed kernels and user-managed kernels.

XRT-managed kernels (xrt::kernel) meet specific requirements of control protocols and interfaces, as described in Requirements of an RTL Kernel and as such, have a richer feature set in the XRT API. User-managed kernels are a bit more unstructured, and so are represented in the IP class with limited features.