Skip to content

Latest commit

 

History

History
 
 

15-post-link-recompile

AI Engine Development

See Vitis™ Development Environment on xilinx.com
See Vitis™ AI Development Environment on xilinx.com

Post-Link Recompile of an AI Engine Application

Version: Vitis 2024.1

Introduction

AI Engine application development can start early in the system development stage. Versal™ adaptive SoCs combine programmable logic (PL), processing system (PS), and AI Engines with leading-edge memory and interfacing technologies to deliver powerful heterogeneous acceleration for any application. The hardware and software are targeted for programming and optimization by data scientists and software and hardware developers. A host of tools, software, libraries, IP, middleware, and frameworks enable Versal adaptive SoCs to support all industry-standard design flows.

This tutorial shows you how to modify an AI Engine application after the platform has been frozen while avoiding a complete AMD Vivado™ tool run, which might take long if timing closure requires specific attention.

There are two ways to perform this operation:

  1. Recompile the AI Engine application right after the link stage, using specific constraints to set the interface ports.
  2. Use the output .xsa file as a platform, which embeds these constraints.

In the first case, you have to extract the constraints from the files generated by the AI Engine compiler and use them as input constraints when you run it for the second time.

In the second case, you use the .xsa file generated during the link stage as the target platform, which contains the constraints already on the AI Engine array interface specification. This tutorial explains the complete flow for these two cases.

This tutorial details all the steps to perform hardware emulation (hw_emu), but it also supports the hardware implementation flow by changing the compilation target.

IMPORTANT: Before beginning the tutorial, make sure that you have installed the Vitis 2024.1 software. The AMD Vitis™ release includes all the embedded base platforms including the VCK190 base platform that is used in this tutorial. In addition, ensure that you have downloaded the Common Images for Embedded Vitis Platforms from this link https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-platforms/2024-1.html. The ‘common image’ package contains a prebuilt Linux kernel and root file system that can be used with the Versal board for embedded design development using Vitis. Before starting this tutorial, run the following steps:

  1. Go to the directory where you have unzipped the Versal Common Image package.
  2. In a Bash shell, run the /Common Images Dir/xilinx-versal-common-v2024.1/environment-setup-cortexa72-cortexa53-xilinx-linux script. This script sets up the SDKTARGETSYSROOT and CXX variables. If the script is not present, run the /Common Images Dir/xilinx-versal-common-v2024.1/sdk.sh.
  3. Set up your ROOTFS, and IMAGE to point to the rootfs.ext4 and Image files located in the /Common Images Dir/xilinx-versal-common-v2024.1 directory.
  4. Set up your PLATFORM_REPO_PATHS environment variable to $XILINX_VITIS/lin64/Vitis/2024.1/base_platforms/.

This tutorial targets the VCK190 production board for 2024.1 version.

The sub-directory Files contains all the source files necessary for this tutorial.

AI Engine Application Post-Link Recompile

This tutorial contains the following labs:

  • Lab 1 is based on a direct recompile Makefile flow.
  • Lab 2 is based on a Vitis Makefile flow.

Each lab is divided into the following phases:

  1. Creating an AI Engine application using the VCK190 platform with all necessary PL kernels added, and linking the complete system.
  2. Creating a new AI Engine application with interface location constraints (Lab 1) or with the previously created fixed platform (Labs 2), adding a PS application, and running hardware emulation.

Objectives

This tutorial shows you how to modify an AI Engine application after the platform has been frozen. It demonstrates a Vitis Makefile flow.

Completing this tutorial should give you the confidence to develop AI Engine designs based on a hardware/software platform, knowing that you can modify the AI Engine part and the processing system control application. The only limitation is that the hardware connection between the AI Engine array and the programmable logic (PL) must be kept fixed.

License


The MIT License (MIT)

Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: MIT

Support

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

Copyright © 2020–2024 Advanced Micro Devices, Inc
XD039

Terms and Conditions