Vector addition is the simplest acceleration PL kernel. The Vitis Unified IDE can create this application automatically. Running this test can check the AXI control bus, memory interface, and interrupt setting in platform are working properly.
Creating Vector Addition Application
Go to
WorkSpacedirectory created in step1Run Vitis by typing
vitis -w .in the console.-wis to specify the workspace..means the current workspace directory. Close the welcome tab after Vitis launches.Go to example view by clicking the example button and select and click Simple Vector Addition.
Click Create Application from Template. The project creation wizard would pop up.
Input the System project name as
vaddand use the default location for System project location. Then click Next.Select zcu104_custom platform, click Next.
Note: If the platform component is not in the current workspace user could click + button to add the platform component.
Set Kernel Image to
xilinx-zynqmp-common-v2025.1/Image.Set Root FS to
xilinx-zynqmp-common-v2025.1/rootfs.ext4.Set Sysroot to
zcu104_software_platform/xilinx-zynqmp-common-v2025.1/sysroots/cortexa72-cortexa53-amd-linux. Then click Next.Review the summary of your
vaddsystem project and click Finish.
After seconds the vadd system project, vadd host component and vadd kernel component will be ready in the component view.
Building Vector Addition Application
Vadd system project supports three targets: Software emulation, Hardware emulation and Hardware. User could select the target accordingly following steps below.
Go to flow navigator and select vadd system project.
Click Build All under the target
In the Build Component setup dialog please enable all the components. Then click OK.
After compilation is finished. Users can locate the
sd_card.imgby expanding the Output directory. This provides a logical view of the output. The actual path ofsd_card.imgfile is located inWrokSpace/vadd/build/<TARGET>/package/package/directory. For example, if user targets hardware emulation, thesd_card.imgfile is in located inWrokSpace/vadd/build/hw_emu/package/package/. Users can also view the complete path of thesd_card.imgfile by simply hovering the mouse pointer over the image file.Running Hardware Emulation
After the compilation for hardware emulation is finished, please follow steps below to run hardware emulation.
Click Start Emulator under HARDWARE EMULATION target. The Start Emulator setup page would pop up. Then click Start.
Click Run after the emulator boots up to terminal
Click Stop emulator to stop emulation after emulation is finished.
Running Vector Addition Application on the Board
After the compilation for hardware is finished, please follow steps below to run on board.
Copy
vadd/build/hw/package/package/sd_card.imgto local if the Vitis IDE is running on a remote server.Write
sd_card.imgonto the SD Card with SD Card image writer applications like Etcher on Windows or dd on Linux.Boot ZCU104 board with the SD card in SD boot mode.
Steps to run the application:
First, login with user
petalinuxand set up a new password (it is then also the sudo password):Log into the system
petalinux login:petalinux You are required to change your password immediately (administrator enforced). New password: Retype new password: petalinux:~$ sudo su We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. Password: petalinux:/home/petalinux#
Go to auto mounted FAT32 partition
petalinux:/home/petalinux# cd /run/media/mmcblk0p1/
Run vadd application
./simple_vadd krnl_vadd.xclbin
It should show program prints and XRT debug information.
TEST PASSED