This blog shows how to perform software and hardware emulations for ZCU102 platform using Vitis-2022.2. This flow has been tested on Ubuntu 22.04 running inside a VirtualBox. The flow consists of four stages:

Step 1- Install Vitis 2022.2

Step 2- Prepare the ZCU102 platform

Step 3-Create a project

Step 4- Perform SW/HW emulation.

Step 1: Install Vitis 2022.2

1- Make sure that you have libtinfo5 installed on your Ubuntu OS. If not, run the following commands to install that

sudo apt-get update -y
sudo apt-get install -y libtinfo5

2- Download the  Xilinx Unified Installer 2022.2: Linux Self Extracting Web Installer located on the Xilinx download website here.

3- Make the downloaded file executable by running this command

chmod u+x Xilinx_Unified_2022.2_1014_8888_Lin64.bin

4- Run the software and follow the instructions using this command

sudo ./Xilinx_Unified_2022.2_1014_8888_Lin64.bin

Step 2: Prepare the ZCU102 Platform

1- Download the ZYNQMP common image file from the Xilinx website located here.

2- Create a folder path to save the zcu102 common image. For example, create this folder path

mkdir -p ~/Vitis-Platforms/zcu102

3- Uncompress the downloaded file into the created folder

tar -zxvf xilinx-zynqmp-common-v2022.2_10141622.tar.gz -C ~/Vitis-Platforms1/zcu102/

4- Go to the ~/Vitis-Platforms1/zcu102/ folder and run the following command to create the sysroot folders and files

./sdk.sh -y -d ./ -p

Step 3: Create a Project

1- Open a shell and run this command to add the Vitis variables into the shell environment.

source /tools/Xilinx/Vitis/2022.2/settings64.sh

2- Run the Vitis software by running the vitis command in the same shell. The Vitis IDE Launcher will appear. Choose a proper path as the workspace, then press Launch.

3- Create a new application project

4- Choose the xilinx_zcu102_base_202220_1 platform and press Next.

5- Choose a project name such as Vector_Addition-Vitis and press Next

6- Fill in the fields in the Domain window, as shown in this figure. Note that all files and folders are in the created platform in ~/Vitis-Platforms/zcu102/xilinx-zynqmp-common-v2022.2 folder. Press Next

7- Choose the Simple Vector Addition example in the Template window and press Finish.

8- Examine the created project and files.

Step 4: Perfrom SW/HW Emulation

Software Emulation

1- Make sure that Emulation-SW is selected as the “Active build configuration” option.

2- Right-click on the project and select Build Project.

— If you received the following error message then you should install gcc-multilib in Ubuntu. Run this commands

sudo apt-get update -y
sudo apt-get install -y gcc-multilib

3- After compiling the project successfully, run the project by right-click on the project folder and selecting Run As->Launch SW Emulator

4- Click on the “Start Emulator and Run” icon

After a while you should see the “TEST PASSED ” message inside Console.

Hardware Emulation

1- Change the “Active build configuration” option to Emulation-HW

2- Right-click on the project and select Build Project.

3- After compiling the project successfully, run the project by right-click on the project folder and selecting Run As->Launch HW Emulator

4- Click on the “Restart Emulator and Run” icon

After a while you should see the “TEST PASSED ” message inside Console.

Leave a Reply