Creating the Platform
Once the hardware and software components have been created, the Vitis tools are used to create a Vitis platform, which integrates the two components to offer a specific solution. A platform that does not use acceleration kernels can still be created for supporting embedded software development, as was previously done with the Xilinx Software Development Kit (SDK). However, a primary feature of the Vitis tool set is that it creates and uses platforms that support acceleration kernels. Platforms with kernel and Linux XRT support provide developers an OpenCL execution model, as well as traditional C/C++ compilation through the Vitis tools.
In this platform creation example (zcu102_min), a single Linux domain for the Cortex™-A53 processor cores is provided in the platform. This platform allows developers to create Linux applications that can use acceleration kernels and run on any of the four Cortex-A53 cores available to the SMP Linux system generated by PetaLinux.
Additional domains can be added to a platform and provided to application developers. Platforms can be defined with multiple domains where each domain specifies a processor core and the OS/BSP that runs on it. Although an unlimited number of domains can be defined for a platform, when applications run on a platform they must use domains that do not conflict with each other. In other words, the domains chosen for running a set of applications on an embedded board must be able to run simultaneously.
The set of domains that can run simultaneously is encapsulated by the Vitis concept of a system project. In the following figure, four domains are defined in the platform and each system project contains applications that use a set of domains that can run simultaneously. System project 1 runs two baremetal applications on two different A53 cores. System project 2 runs multiple Linux applications across all four A53 cores. We could add an R5 processor domain from the platform to either system project and still meet the requirement that applications within the system project must be able to run simultaneously.
Characteristics of the Vitis platform creation tools are:
- A system project is a container for multiple applications that run on different domains of a platform at the same time.
- A domain is the BSP/OS that controls one or more processors of the same type.
- A platform contains one or more domains.
- A Vitis workspace can contain an unlimited number of platforms and an unlimited number of system projects.
Creating Platforms with XRT and Kernel Support
In the Vitis IDE, you can create a platform as described below. The hardware and software components must have been previously generated as described in Creating the Hardware Component and Creating the Software Component respectively.
- Use the Vitis workspace directory you
created earlier to store the platform
project:
cd zcu102_min_pkg/pfm vitis -workspace wksp1 - In the Vitis IDE, select to create a platform project.
- In the Create New Platform Project dialog box, do the following:
- Enter the project name. For this example, type
zcu102_min. - Leave the checkbox for the default location selected.
- Click Next.
- Enter the project name. For this example, type
- In the Platform Project dialog box, do the following:
- Select Create from hardware specification (XSA).
- Click Next.
- In the Platform Project Specification dialog box, do the following:
- Browse to the XSA file generated by the Vivado® Design Suite. In this case, it is located in zcu102_min_pkg/vivado/zcu102_min.xsa.
- Set the operating system to linux.
- Set the processor to psu_cortexa53.
- Leave the checkmark selected to generate boot components.
- Click Finish.
- In the Platform Settings view, observe the following:
- The name of the Platform Settings view matches the platform project name
of
zcu102_min. - A
psu_cortexa53device icon is shown, containing a Linux on psu_cortexa53 domain. - A
psu_cortexa53device icon is shown, containing a zynqmp_fsbl BSP. - A
psu_pmu_0device icon is shown, containing a zynqmp_pmu BSP.
- The name of the Platform Settings view matches the platform project name
of
- Click the linux on psu_cortexa53 domain to set paths to the generated Linux software products. Although you are creating a platform with a single Linux domain, you can add domains to the platform in the Platform Settings dialog box.
- Browse to the locations and select the directory or file needed to complete the
dialog box for the following:
- Linux Build Output
- Browse to zcu102_min_pkg/pfm/boot and click OK.
- Bif file
- Browse to zcu102_min_pkg/pfm/boot/linux.bif file and click OK.
- Image
- Browse to zcu102_min_pkg/pfm/boot and click OK.
- Sysroot
- Browse to zcu102_min_pkg/pfm/sysroots/aarch64-xilinx-linux and click OK.
- To optionally enable emulation on your platform perform the following
steps:
To support emulation, the platform needs a QEMU argument file, a PMU argument file, and a directory containing the necessary ELF files when the emulator is launched. Obtain and modify the QEMU and PMU argument files from the
zcu102_baseplatform for use with yourzcu102_minplatform example.- Locate the
zcu102_baseplatform link:https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-platforms.html - Create a directory named ./emulation within the existing zcu102_min_pkg/pfm directory and add the
qemu_args.txt and pmu_args.txt files from the zcu102_base Zip file:
cd zcu102_min_pkg/pfm mkdir emulation - Edit and save the qemu_args.txt file and pmu_args.txt file to replace any instances of the
platform name
zcu102_basewithzcu102_min. - In the Platform Settings dialog box specify the following settings:
- QEMU Data: Browse to the zcu102_min_pkg/pfm/boot directory and click OK.
- QEMU Arguments: Browse to the zcu102_min_pkg/pfm/emulation/qemu_args.txt file and click OK.
- PMU QEMU Arguments: Browse to the zcu102_min_pkg/pfm/emulation/pmu_args.txt file and click OK.
- Locate the
- With the
zcu102_minproject selected in the Vitis Explorer view, click the Build button to generate the platform.