Hi all,
I am a master student in germany and doing my thesis currently. I wanted to measure CPU cycles using emulation/simulation for some code that is running on a cortex m4F processor based board. I had QEMU in mind at initial but it turns out it doesn't have support for my board and neither it is cycle accurate plus FP is not supported. Now I am searching for any freely available simulator or emulator that I can use for accurate cycle accurate measurement and do support FP and DSP instructions.
I am still not sure how accurate is QEMU for Cortex-M4 in terms of cycle accuracy? anyone with some experience?
I also saw this thread: https://community.arm.com/tools/f/discussions/5212/cycle-accurate-instruction-set-simulator-for-cortex-m
where there is said something about CPAKS for cortex M4 that is cycle accurate. But is it freely available? (for students etc).
Some quick replies will be appreciated. Thank you in advance.
P.S: I am looking for a pure software based solution. I am also aware of keil/IAR simulators. any suggestions apart from these are welcomed :)
Best Regards,
Fahad Masood
Hi Fahad,
Imperas has timing and power estimation support for Cortex-M4. This is not cycle accurate, however, the estimations are accurate to about +/- 10%. This works with the Imperas instruction accurate simulators, built with Open Virtual Platforms (www.OVPworld.org) models. This is free to use through our University Program. Please contact us at univ [at] imperas [dot] com for more information.
Larry
Hi Larry, Thanks for your suggestion. I am gonna send a mail on the above email you mentioned :)
it sounds like cycle accurate simulation is important for you so I would recommend using the Cortex-M4 CPAKs you referenced.
For university usage we can provide the needed tools and models for you at no cost so you can complete your project.
Regards,
Jason
Hi,
Can these CPAKS give me the information about the RAM while my C-code is running? Like dynamic memory consumption? basically, I am interested in measuring the memory while the code is running on these models
Best,
Fahad
Yes, both Arm Cycle Models and Arm Fast Models can provide memory information.
Are you thinking to trace the software execution of a memory allocation function from the software side or look at the memory locations accessed in the hardware memory models? Both can be done.
Thanks,
yes I wanted to see what memory is being consumed by my code from software side. Thank you for your reponse. I just have couple more questions:
1. These CPAKS take ELF or binary files for simulation or they directly simulate the C written code?
2. Do they support some any OS? like mbed or RTOS etc
Models use ELF files or other memory file formats which represent compiled software. C code must be compiled first and then loaded into memory for execution.
Models support all types of software including bare metal software and operating systems.