Step 2: Create and Build the AI Engine Component - 2025.1 English - XD100

Vitis Tutorials: AI Engine Development (XD100)

Document ID
XD100
Release Date
2025-08-25
Version
2025.1 English

As shown in the figure above, this tutorial contains three AI Engine kernels: Interpolator, Polar_clip, and Classifier. Start by creating the AIE component that will contain the graph and kernels. Run the following steps:

  1. From the main menu select File > New Component > AI Engine

This opens the Create AI Engine Component wizard on the Name and Location page.

  1. Enter the Component name as aie_component (default), enter the Component location as the workspace (default), and click Next.

This opens the Add Source Files page.

  1. Select Import Sources > Add Folder and navigate to <tutorial_path>/ 05-AI-engine-versal-integration/aie and click OK.

  2. Under Select top-level file confirm that graph.cpp has been selected and click Next.

The tool automatically selects the top-level graph from imported files. You just need to make sure it has chosen correctly. Clicking Next opens the Select Part page.

  1. Select the xilinx_vck190_base_202410_1 platform and click Next to open the Summary page.

  2. Review the Summary page and click Finish to create the defined AI Engine component.

This results in the aie_component vitis-comp.json file being opened. This is the file associated with the component in the Vitis unified IDE as shown in the following image. The tab at the top will display vitis-comp.json, but it is the aie_component you just created.

System Diagram

Select the aiecompiler.cfg link and open the config file. It contains include statements for the added aie source code folder, and the [aie] section that contains configuration commands such as the xchess statement. Refer to v++ Mode AI Engine for more information on these configuration commands.

In the Vitis Components explorer, expand the aie_component and examine the included sub-folders: Settings, Includes, Sources… Notice the aie folder you imported into the Sources folder.

In the Flow Navigator the aie_component you just created is now the active component. It is currently the only component.

Select the Build command under the X86 Simulation heading.

The tool compiles the aie_component for use with the x86simulator using the following command which is displayed in the aie_component::x86sim Output window:

v++ -c --mode aie --target x86sim --config ./workAIE/aie_component/aiecompiler.cfg –platform ../base_platforms/xilinx_vck190_base_202410_1/xilinx_vck190_base_202410_1.xpfm --work_dir ./workAIE/aie_component/build/x86sim/./Work ./workAIE/aie_component/aie/graph.cpp
Flag Description
--target Target how the compiler will build the graph and it is set to x86sim. Default is hw
--config The configuration file containing commands to apply during the build process.
--platform The platform or device to target the build to.
--work_dir The location where the work directory will be created.

Examine the Output folder of the aie_component in the Vitis Components Explorer. Notice the addition of the x86sim folder with the results of the build. It contains the Work folder, the Makefiles, the aiecompiler.log, and the libadf.a output that contains the compiled AI Engine configuration, graph, and Kernel .elf files.

After building the component the Reports view under the X86 Simulation heading displays the Summary report, the Graph report, Logs, and Guidance. The Summary view displays compilation runtime, version of the compiler used, the platform targeted, kernels created, and the command line used for compilation.

The Graph view provides an overview of your graph and how the graph is designed in a logical fashion. Clicking on any kernel in the graph diagram highlights the corresponding kernel in the GRAPH INSTANCE column. You can open the source code by clicking the file name in the SOURCE column.

Unified IDE - AIE Graph

You can click Log to view the compilation log for your graph.