Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Design Components

This module requires the following components:
  • petalinux_bsp
  • perfapm-server
  • perfapm-client-test

Build Flow Tutorials

This tutorial uses both Vitis and PetaLinux tools. It is recommended to use separate shells for each of the tools.

Perfapm-server Application

The performance monitor server application perfapm-server is 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-client library and then visualized on a plotted graph.
  • Create a new Vitis workspace.

    Code Block
    % cd $TRD_HOME/workspaces/ws_perfapm-server
    % vitis -workspace . &

  • Click 'Import Project' from the welcome screen, Choose 'Eclipse workspace' and select next.

    Image Removed       Image Added

  • Uncheck 'copy projects into workspace', browse to the current working directory and make sure the perfapm, perfapm-server, and perfapm-server_system are selected. Click 'Finish'.
  • Double click on 'perfapm-server_system.sprj' and close the dialog box for platform.

                     Image Removed  Image Added

  • from the top menu tab choose 'File' →  'New platform', enter Project name as 'hw_platform_0' and select 'Next'.

          Image Removed Image Added

  • 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.

Image Removed             Image Added

  • 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.

Image Removed       Image Added

  • double click on 'perfapm-ctl.prj' in the Elplorer tab, and click 'Navigate to BSP settings'

Image Removed         Image Added

  • modify BSP settings for Cortexr5_1 processor

Image Removed   Image Added

  • under overview panel enable libraries 'libmetal' and 'openamp'.

Image Removed     Image Added

  • Right-click on the perfapm-server system  and select 'Build Project'.

Image Removed                                                    Image Added

  • Copy the generated perfapm-server executable to the dm4 SD card directory.

    Code Block
    % 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)

The perfapm-client-test application 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-client and the generated binary is located at /usr/bin/perfapm-client-test on the target rootfs.