Tip: For an example of an embedded system
design that includes an AI Engine graph application refer to Vitis-Tutorials/Developer_Contributed/01-Versal_Custom_Thin_Platform_Extensible_System/.
For Versal AI Core devices, the AI Engine graph application is an xxx. The graph
application (libadf.a) is packaged as part of the device binary
(.xclbin) by the v++ --package
command, and
also copied to the SD card. The following is an example of how you would load and run
the graph application from the software program.
- Add required header to
#include
statement:#include <experimental/xrt_aie.h>
- Set up the application environment as described in Specifying the Device ID and Loading the XCLBIN.
- Identify the AI Engine graph
from the
xrt::device
object, theuuid
of the loaded .xclbin, and thename
of the graph application:auto my_graph = xrt::graph(device, uuid, "mygraph_top");
- Reset and run the graph application from the software program as
needed:
my_graph.reset(); std::cout << STR_PASSED << "my_graph.reset()" << std::endl; my_graph.run(0); std::cout << STR_PASSED << "my_graph.run()" << std::endl;
Tip: For more information on building and
running AI Engine applications refer to Versal ACAP AI Engine Programming Environment User Guide
(UG1076).