I need to benchmark some C++ code on the FVP_MPS2_Cortex-M4 simulator.
I considered using CMSIS function osKernelGetTickCount() to provide timestamps but the resolution of the tick timer seems to be 1ms, which is too coarse.
What would be a suitable clock counter to use for the timings?
Would ARM_CM_DWT_CYCCNT be suitable and, if so, how would I access it?Best regards
David
Hi David, this is not totally unexpected, and goes to the same issue that Toshi said earlier, that Fast Models are not 100% cycle accurate.
I think what you are seeing here is an affect of the 'quantum' of instructions that Fast Models use to accelerate execution. If you single step though the loop with low cycle count, do you get different numbers?