APM

Introduction

This page describes the APM driver which is available in Xilinx Linux distribution as
drivers/uio/uio_xilinx_apm.c

HW IP features

  • Connects as a 32-bit slave on AXI4-Lite interface
  • Configurable number of (AXI4/AXI3/ AXI4-Stream/AXI4-Lite) monitor slots (up to eight)
  • Flexible support for monitor slots with any data width, ID width and frequency
  • Free running Global Clock Counter
  • Supports AXI and external events logging
  • Supports AXI and external events counting
  • Supports external event triggering and cross probing between event counting and event logging

Features supported in driver

  • Connects as a 32-bit slave on AXI4-Lite interface
  • Configurable number of (AXI4/AXI3/ AXI4-Stream/AXI4-Lite) monitor slots (up to eight)
  • Flexible support for monitor slots with any data width, ID width and frequency
  • Free running Global Clock Counter
  • Supports AXI and external events logging
  • Supports AXI and external events counting
  • Supports external event triggering and cross probing between event counting and event logging


Missing Features and known Issues/Limitations in Driver

  • None

Kernel Configuration

The following config options should be enabled in order to build the apm driver:

config UIO_XILINX_APM
    tristate "Xilinx AXI Performance Monitor driver"
    depends on MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP
    help
      This driver is developed for AXI Performance Monitor IP, designed to
      monitor AXI4 traffic for performance analysis of AXI bus in the
      system. Driver maps HW registers and parameters to userspace.
 
      To compile this driver as a module, choose M here; the module
      will be called uio_xilinx_apm.

Devicetree

AXI PL APM Example:

apm_pl: apm@800A0000 {
    xlnx,enable-profile = <0>;
    xlnx,enable-trace = <0>;
    xlnx,num-monitor-slots = <4>;
    xlnx,enable-event-count = <1>;
    xlnx,enable-event-log = <1>;
    xlnx,have-sampled-metric-cnt = <1>;
    xlnx,num-of-counters = <8>;
    xlnx,metric-count-width = <32>;
    xlnx,metrics-sample-count-width = <32>;
    xlnx,global-count-width = <32>;
    xlnx,metric-count-scale = <1>;
    xlnx,id-filter-32bit;
    status = "okay";
    compatible = "xlnx,axi-perf-monitor";
    interrupt-parent = <&&gic>;                /* Check for Interrupt Controller Node
    clocks = <&&clkc 71>;                      /* Check for the CLK */
    interrupts = <0x0 93 0x4>;                /* Check for the interrupt number */
    reg = <0x0 0x800A0000 0x0 0x10000>;
};


There are 4 APMs available on the Zynq Ultrascale PS:







  • PS APM DDR Example:
apm: apm@FD0B0000 {
    xlnx,enable-profile = <0>;
    xlnx,enable-trace = <0>;
    xlnx,num-monitor-slots = <4>;
    xlnx,enable-event-count = <1>;
    xlnx,enable-event-log = <1>;
    xlnx,have-sampled-metric-cnt = <1>;
    xlnx,num-of-counters = <8>;
    xlnx,metric-count-width = <32>;
    xlnx,metrics-sample-count-width = <32>;
    xlnx,global-count-width = <32>;
    xlnx,metric-count-scale = <1>;
    xlnx,id-filter-32bit;
    status = "okay";
    compatible = "xlnx,axi-perf-monitor";
    interrupt-parent = <&&gic>;                /* Check for Interrupt Controller Node
    clocks = <&&clkc 28>;                      /* Check for the CLK */
    interrupts = <0x0 123 0x4>;                /* Check for the interrupt number */
    reg = <0x0 0xFD0B0000 0x0 0x10000>;
};

Test Procedure

Run the apm app.
The app can be found at
APP

./main -d /dev/uio0
AXI PMON is in Advanced Mode
Required metrics: 0

Mainline Status

The driver is not mainlined.

Change Log


2016.3
None

2017.1
None

2017.2
None

2017.3
Summary:

  • Add runtime support
  • Warning fixes.

Commits:
cbc0b6f :  uio: apm: Add runtime support
cbc0b: uio : uio_xilinx_apm: Fix warnings in the driver
acbf6de: uio: uio_xilinx_apm: Fix Kernel doc warnings

2017.4
None

2018.1
None

2018.2
None

2018.3
None

2019.1
Summary:

  • uio: apm: Do not show error in case of deferred probe
  • uio: uio_xilinx_apm: Fix the suspend resume

Commits:
6465c7 :uio: apm: Do not show error in case of deferred probe

c3d5df: uio: uio_xilinx_apm: Fix the suspend resume


2019.2
None

2020.1
Summary:

  • uio: apm: Do not show error in case of deferred probe
  • uio: axi-perf-monitor: Enable shared irq for the apms

Commits:
87ec38 :uio: apm: Do not show error in case of deferred probe
83759a :uio: axi-perf-monitor: Enable shared irq for the apms


2020.2
None

2021.1
None

2021.2
None

2022.1
None

2022.1
None

2023.1
None

2023.2
None

Related Links

© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy