5.7 Example PMU setup

Two PMU events can be counted at the DEM.

You can:

The HN-F, RN-I, and XP PMU features can be used independently or simultaneously. You can set up just one or the other, or multiple instances of each from different HN-Fs, RN-Is, and XPs, driving onto different DTBus bits.

The following is an example of the steps that are used to enable the PMU events to be counted. The example:


  1. Select the performance event at the component:
    • Write the pmu_event0_id field in the HN-F pmu_event_sel register to select PMU_HN_CACHE_MISS_EVENT on bit 0 of the HN-F PMU interface.
    • Write the dt_config register to write this event on DTB[0].
  2. Select the watchpoint in the XP:
    • Write the dt_config register to select the watchpoint to drive DTB[1].
    • In the dt_interface_sel register, select:

      • XP device port 0 or 1.
      • Channel type, which can be REQ, SNP, RSP, or DATA.
      • Direction, either transmit or receive, on which the watchpoint compare is active.
    • In the dt_cmp_val*_l and dt_cmp_val*_h registers, write the value for fields to be compared in the watchpoint.
    • In the dt_cmp_mask*_l or dt_cmp_mask*_h register, write the mask to determine which flit-fields are compared in the watchpoint.
  3. For each XP, set dt_control.dt_enable = 1, to enable the debug watchpoint and PMU capability in that XP.
  4. Program the PMU control:
    • In the pmcr register:

      • Write the cntcfg field to configure as 8×32-bit counters, no pairs.
      • Write the pmu_en bit to enable PMU counting.
      • Write 1 to pmsr_req to enable PMU counter snapshot.
    • Read the pmevcntsr0 register for the HN-F event counter.
    • Read the pmevcntsr1 register for the watchpoint counter.
Non-ConfidentialPDF file icon PDF versionARM 100052_0001_00_en
Copyright © 2014, 2015, 2017 ARM Limited or its affiliates. All rights reserved.