The FIR filter AI Engine tutorial uses the embedded PS as an external controller to control the AI Engine graph and data mover PL kernel. Review Programming the PS Host Application Section in the AI Engine Documentation to understand the process to create a host application.
In addition to the PS host application (
design/app_src/fir_aie_app.cpp), the AI Engine control code must also be compiled. This control code (
aie_control_xrt.cpp) is generated by the AI Engine compiler when compiling the AI Engine design graph and kernel code.
The AI Engine control code is used by the PS host application for the following reasons:
Control the initial loading of the AI Engine kernels
Run the graph for several iterations, exit, and reset the AI Engine tiles.
Within the PS host application, three classes are defined (two for the PL kernels (datamover) and one for the FilterChain graph), which defines methods used to control and monitor the corresponding kernels.
The main sections of the PS host application code is described in the following subsections: