简体   繁体   English

Cortex-M4中的RAM存储器访问数量

[英]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. 我在STM32F4板上使用了Cortex-M4,并在Keil uVision5中进行开发,我试图计算内存RAM中CPU执行的读写的确切次数。 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. 我知道DTW寄存器,但是它们没有足够的信息。

Cortex-M4 has only the DWT registers which can provide some limited performance information. Cortex-M4仅具有DWT寄存器,可以提供一些有限的性能信息。 There is no equivalent to the PMU (performance monitor unit) which might provide the information you're looking for in a larger core. 没有与PMU (性能监视器单元)等效的功能,它可以在更大的内核中提供您正在寻找的信息。 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. 您可以使用ETM跟踪来确认您在模拟中看到的顺序(如果存在可能使模拟不准确的实时事件),但这只会提供相同的“已执行指令”视图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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