简体   繁体   中英

Number of RAM memory access in Cortex-M4

I using a Cortex-M4 in a STM32F4 board, developing in a Keil uVision5 and I am trying to count the exact number of reads and writes performed by the CPU in the memory RAM. Including loads, stores and fetched instructions. With the help of instruction set simulator I can calculate the number of load/stores and executed instructions, however I need to make sure that is a good approximation. I am aware of the DTW registers, but they don't have enough information.

Cortex-M4 has only the DWT registers which can provide some limited performance information. There is no equivalent to the PMU (performance monitor unit) which might provide the information you're looking for in a larger core. Still, you're more likely to see a count of executed instructions rather than fetches on the instruction interface.

You can use ETM trace to confirm the sequence that you see in simulation (if there are real-time events which might make simulation inaccurate), but this will only provide the same 'executed instruction' view.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM