This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to calculate the CPI for ARM Cortex-R4

How to compute the Clock cycles per instruction for arm cortex R4 ?

is it straight forward as, CPI = clock cycle counter (computed using PMU) / Number of instruction executed (computed using PMU)

or CPI = (clock cycle counter + memory stall cycles)/number of instructions

Also it gives rises to another logical question whether the cycle counter counts number of clock cycles of CPU execution or it counts the basic reference clock to the SoC ?

When WFI instruction is executed whether the cycle counter increments or it will hold ??

Parents
  • I believe Pete is wrong on the last point.  The cycle counter will stop incrementing while the processor is stand-by, from the ARMv7-A/R ARM:

    C12.1.5 Interaction with power saving operations

    All counters are subject to any changes in clock frequency, including clock stopping caused by the WFI and WFE instructions.

Reply
  • I believe Pete is wrong on the last point.  The cycle counter will stop incrementing while the processor is stand-by, from the ARMv7-A/R ARM:

    C12.1.5 Interaction with power saving operations

    All counters are subject to any changes in clock frequency, including clock stopping caused by the WFI and WFE instructions.

Children