2.4.3. Using the PMU

For each performance and monitor test that you run you can:

Use the following registers to set up your test:

The following is an example of how you can use the PMU to measure the snoop hit rate for shareable read requests on slave interface 3 and slave interface 4:

  1. Set up the Performance counters as follows:

    1. Set up the Event Select Registers (ESRs) as follows:

      • To set ESR0 to count shareable read requests through slave interface 3:

        • Program bits[7:5] to 0x3 to select slave interface 3.

        • Program bits[4:0] to 0x03 to select the shareable read event.

      • To set ESR1 to count slave interface 3 snoop hits:

        • Program bits[7:5] to 0x3.

        • Program bits[4:0] to 0x0A.

      • To set ESR2 to count shareable read requests through slave interface 4:

        • Program bits[7:5] to 0x4.

        • Program bits[4:0] to 0x03.

      • To set ESR3 to count slave interface 4 snoop hits:

        • Program bits[7:5] to 0x4.

        • Program bits[4:0] to 0x0A.

    2. Enable all of the event counters by doing the following:

      • Program Counter Control Register 0 bit[0] to 0b1.

      • Program Counter Control Register 1 bit[0] to 0b1.

      • Program Counter Control Register 2 bit[0] to 0b1.

      • Program Counter Control Register 3 bit[0] to 0b1.

  2. Program the following bits in the Performance Monitor Control Register (PMCR):

    • Bits[2:1] to 0b11 to reset the cycle counter and all of the event counters.

    • Bit[0] to 0b1 to enable all of the counters.

  3. Allow the test to run for an appropriate amount of time

  4. Do the following to disable all of the counters to stop the test:

    • Program PMCR bit[0] to 0b0.

  5. Read the results of the test from the cycle counter and event counters:

    • The cycle counter holds the number of clock cycles that the test ran for.

    • Counter 0 holds the number of reads for slave interface 3.

    • Counter 1 holds the number of snoop hits for slave interface 3.

    • Counter 2 holds the number of reads for slave interface 4.

    • Counter 3 holds the number of snoop hits for slave interface 4.

  6. Check the overflow bits of all the counters and adjust your results accordingly.

Copyright © 2011-2014 ARM. All rights reserved.ARM DDI 0470J
Non-ConfidentialID031714