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 ??