Top Level Application - 2023.2 English

Vitis Tutorials: AI Engine (XD100)

Document ID
Release Date
2023.2 English

Define a top-level application file fir_aie_graph.cpp in this design. It creates an instance of the FirGraph graph, and triggers the instances with Graph API calls. that contains an instance of the graph class and connects the graph to a simulation platform to provide file input and output:

FirGraph FilterChain;

For this graph to be simulated using the AI Engine simulator, or the x86 functional simulator, the main function is defined, which calls methods to initialize the FilterChain, runs it the specified number of iterations, and then performs cleanup:

#if defined(__AIESIM__) || defined(__NEW_X86Sim__)

int main(void) {
        FilterChain.init() ;;
        FilterChain.end() ;
    return 0 ;


For more details, refer to the AI Engine Documentation for details.

Note that for running on the hardware (hw) or hardware emulation (hw_emu), the main() function is not required. In this case, it is only necessary to create an instance of the platform and graph, and the PS Host application code controls it through XRT calls. (See PS Host Application in the following section)

PL Kernels