AI Engine Debug Walkthrough Tutorial - From Simulation to Hardware

Migrate Command-Line Based Projects to Vitis IDE

This section documents the necessary steps to migrate command-line based projects to Vitis™ IDE.

Step 1 Create project

Step 2 Import project source code

Step 3 Configure project

Step 4 Configure system project in packaging options

Step 1 Create project

Launch Vitis IDE by issuing the command, vitis.

After the previously listed steps are completed, the created system project is expected to have AI Engine and hardware link sub-projects.

Then we need to create PS and PL sub-projects under system project.

Fill in sysroot, rootfs, and image information for PS application.

Select “Empty Application” under “Acceleration templates with PL and AIE accelerators” for PS sub-project. After the previously listed steps are completed, you should have AI Engine, PS, PL and hardware link sub-projects under system project.

Step 2 Import project source code

Import source code for AI Engine sub-projects.

Continue to import data for aiengine sub-project, source code for PS, PL, and hardware link sub-projects.

Note: If the PS sub-project requires defer-aie-run option in packaging, aie_control_xrt.cpp is required to be imported in the PS sub-project.

Step 3 Configure project

Step 3.1 Configure AI Engine sub-project

Configure top level graph.

Configure include paths.

Step 3.3 Configure hardware kernels

Add hardware functions to project.

Configure number of instances for each PL kernel.

Update (comment out) nk=kernel:1:kernel_n line from the system.cfg file. This is because the Vitis IDE relies on the previous step to determine the number of instances for each PL kernel. Redundant configuration of number of kernels in system.cfg results compilation errors.

Step 3.4 Configure PS sub-project

Configure PS application include paths.

Configure PS application link libraries.

Step 4 Configure system project in packaging options

Note: This configuration is optional and depends on the design.

  1. If initialize is required, run, and end from PS, then use the --package.defer_aie_run option.

  2. If data files need to be packaged to the sd_card, then use the --package.sd_dir ${PROJECT_PATH}/data option.

Support

GitHub issues will be used for tracking requests and bugs. For questions go to support.xilinx.com.

License

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

XD005 | © Copyright 2021 Xilinx, Inc.