The Application component is an application that runs on the processor, Arm or x86, that loads and runs the device binary (.xclbin) which you will build later. The Vitis unified IDE automatically detects whether the Application component uses XRT native API or OpenCL and compiles the code as needed. Create the Application component using the following steps:
From the main menu select File > New Component > Application
This opens the Create Application Component wizard on the Name and Location page.
Enter the
Component nameas host, enter theComponent locationas the workspace (default), and click Next.
This opens the Select Platform page.
On the Select Platform page select the
xilinx_vck190_base_202410_1platform and click Next to open the Select Domain page.
On the Select Domain page you will select from the available processor domains and OS. In this case there is only one choice.
Select the xrt domain and click Next to open the Sysroot page.
On the Sysroot page you will provide a path to the sysroot as part of the common images for the selected platform. You can find more information on this at Installing Embedded Platforms.
Enter the path to the Sysroot for the selected platform and click Next to open the Summary page.
Review the Summary page and click Finish to create the defined Application component.
The Application component vitis-comp.json file is opened in the center editor, and the component is added to the Component Explorer. When creating the Application component you do not specify source files so you must add the required source files after the component is created.
In the Vitis Components Explorer view expand the host component, right-click the Sources folder and Import Source > Files to import the following source files:
<tutorial_path>/05-AI-engine-versal-integration/sw/host.cpp
<tutorial_path>/05-AI-engine-versal-integration/sw/data.h
NOTE: If your design uses the ADF API to control the AI Engine then you must also import the aie_control_xrt.cpp file into your Application component Sources folder. Refer to Host Programming on Linux for more information. This design uses the XRT native API and so does not require it.
With the files in place, you are now ready to build the Application.
With the host application active in the Flow Navigator, select Build under the x86 SIMULATION header. This will build the host application for use in software emulation. Even though the xilinx_vck190_base_202410_1 is an embedded platform, software emulation is run on the x86 processor as described in Embedded Processor Emulation Using PS on x86. The compilation process is reported to the host::x86sim Output window.
After the x86sim build completes you can select Build under the HARDWARE heading in the Flow Navigator. The compilation process is reported to the host::hw Output window. You have now compiled the host application for both the software emulation flow and the hardware emulation/hardware flows of the System project.