This is the third blog entry in the Acceleration series. Previously, we discussed how to create the hardware and software projects. In this blog we will discuss how this is all packaged together in Vitis™.
When we accelerate a software function in Vitis (create a kernel), we are creating a Hardware IP core and the resulting infrastructure to connect this to the existing platform.
To do this, Vitis needs to rebuild your platform. Vitis uses the XSA to rebuild the Vivado project. It will then append the updated hardware and then re-spin the Vivado project.
Everything else will remain static, except for the bitstream and the generated kernel application of course. So our boot image cannot be static. Instead we provide a BIF that has placeholders for the images that will be created in Vitis.
Also, In order for the kernel to be able to execute, we need to cross-compile for our target hardware. Here, we use the sysroot created in PetaLinux.
Preparing the Images:
This step is not really needed, but I have organized the platform files for ease of use. The important thing to remember is the boot images location when creating the BIF file, as we are using placeholders.
Copy the image.ub, boot.scr and rootfs.cpio.gz from the PetaLinux image/linux folder to sw_comp/src/a53/xrt/image
Copy the bl31.elf, uboot.elf, zynqmp_fsbl (renamed fsbl.elf), pmufw.elf from the PetaLinux image/linux folder to sw_comp/src/boot
Create the BIF:
The BIF file is used in bootgen to create the SD boot image.
This contains the location of all of the partitions in the BOOT.BIN file. A template can be seen below.
It is important to note that here we are just providing placeholder file names, not the actual file name. The tools will add the path to the files. This is why I recommend having all of these files in the same boot folder. The zcu104_base will be the name of our platform.