This module requires the following components:
Build Flow Tutorials
This tutorial uses both Vitis and PetaLinux tools. It is recommended to use separate shells for each of the tools.
The performance monitor server application
perfapm-serveris a bare-metal application that executes on RPU-1. The firmware binary is loaded by the APU master at the end of the Linux boot process. RPU-1 and APU establish a communication channel using the OpenAMP framework. RPU-1 gathers performance data like memory throughput from the PS AXI performance monitor (APM) units and sends it across to the APU where the data is received by the
perfapm-clientlibrary and then visualized on a plotted graph.
Create a new Vitis workspace.
Code Block language bash theme Midnight
% cd $TRD_HOME/workspaces/ws_perfapm-server % vitis -workspace . &
- Click 'Import Project' from the welcome screen, Choose 'Eclipse workspace' and select next.
- Uncheck 'copy projects into workspace', browse to the current working directory and make sure the
perfapm-server_systemare selected. Click 'Finish'.
- Double click on 'perfapm-server_system.sprj' and close the dialog box for platform.
- from the top menu tab choose 'File' → 'New platform', enter Project name as 'hw_platform_0' and select 'Next'.
- Choose 'Create from hardware specification (XSA)' and browse to the xsa file in the 'hwfile' directory of 'ws_heartbeat workspace',
- Select operating system as 'standalone' and processor as 'psu_cortexr5_1' and click Finish.
- In the System Project Settings tab, Add the new custom platform generated from xsa. Click Yes on the dialog box, when prompted to change the platform.
- double click on 'perfapm-ctl.prj' in the Elplorer tab, and click 'Navigate to BSP settings'
- modify BSP settings for Cortexr5_1 processor
- under overview panel enable libraries 'libmetal' and 'openamp'.
- Right-click on the
perfapm-serversystem and select 'Build Project'.
Copy the generated
perfapm-serverexecutable to the dm4 SD card directory.
Code Block theme Midnight
% mkdir -p $TRD_HOME/sd_card/dm4 % cp perfapm-server/Debug/perfapm-server.elf $TRD_HOME/sd_card/dm4/
Perfapm-client-test Application (optional step)
perfapm-client-testapplication receives performance counter values from RPU-1 and prints them to UART-0. It is by default built as part of the meta-user layer of the PetaLinux BSP. The corresponding yocto recipe and source files are located at
$TRD_HOME/petalinux/bsp/project-spec/meta-user/recipes-apps/perfapm-clientand the generated binary is located at
/usr/bin/perfapm-client-teston the target rootfs.