Designing and testing FPGA-based accelerators usually requires having access to expensive FPGA evaluation boards. Here, I will explain how we can still design, debug, and test an FPGA-based accelerator using the related emulators.
1- First of all, we should install the Xilinx Vitis toolset on a Linux machine. Here, I am using Ubuntu 2020.4 running inside VirtualBox.
2- Go to the Xilinx Vitis Embedded Platforms download website.

3- Download two files from this page:
ZCU102 Base 2020.2 (you can choose the corresponding file for other ZYNQMP FPGAs)
4- Create two nested directories with the name of “vitis-platforms” and “zcu102”mkdir vitis-platforms
cd vitis-platforms
mkdir zcu102
5- Unzip the downloaded files into the zcu102 folder.

6- Go to the “xilinx-zynqmp-common-v2020.2” folder and create a folder with the name of “linux_files”

7- Run ./sdk and enter the “linux_files” path as the destination

8- Define the “PLATFORM_REPO_PATHS” variable that points to the vitis-platforms folder created earlier.
export PLATFORM_REPO_PATHS=/home/numvar/vitis-platforms
you can add this line into the .bashrc file for later usage.
9- Now run the Xilinx Vitis IDE.

10- Create a new application by clicking on “File->new->Application Project …”

11- In the “Create a New Application Project” page, click on Next.

12- On the Platform page, you should see the Xilinx_zcu102_base… platform. If you cannot see that, you have not properly defined the PLATFORM_REPO_PATHS variable. Select the platform and press Next.

13- In the next page, enter the application name, for example “vector_addition”. And press next

14 – In the Domain page, enter the Application setting as follows and then press Next.
Sysroot path: <vitis-platforms folder>/zcu102/xilinx-zynqmp-common-v2020.2/linux_files/sysroots/aarch64-xilinx-linux
Root FS: <vitis-platforms folder> /zcu102/xilinx-zynqmp-common-v2020.2/rootfs.ext4
Kernel image: <vitis-platforms folder> /zcu102/xilinx-zynqmp-common-v2020.2/Image

15- In the Template page select the Vector Addition and then press Finish

16- Ensure that the “Software Emulation” is selected as the target, as shown below.

17- Then build the project by right-clicking on the Vector_addition_system and select Build Project.

18- After building the project, run the emulator by right-clicking on the project and selecting the “Launch SW Emulator” then click on “Start Emulator and Run” button.

19- After a couple of minutes, you should see the “TEST PASSED” in the console view.

20- You can do similarly with the hardware emulator.
