ARM Technical Support Knowledge Articles

Is there a simple way to measure the execution performance of arbitrary code in simulation?

Applies to: Cortex-M3, Cortex-M4


Chip designers who have licensed the Cortex-M3 or Cortex-M4 processor can easily measure the performance of the processor in simulation by choosing to generate a "tarmac.log" file in their simulation run.

Each line in this file starts with a timestamp.

Lines corresponding to execution of individual instructions include a unique "tag" field for each instance of that instruction being executed.

The "tag" field is structured as:

   ( <memory address of the instruction> : <instruction count> )

So the execution performance (instructions per second) can easily be calculated between any two instructions in the execution history simply by calculating the difference in hexadecimal <instruction count> divided by the difference in the timestamps of those lines.

Note that the tarmac log files for Cortex-M0 and Cortex-M0+ do not include this tag field, and would therefore require some further work to calculate the number of instructions contained in the listing between the points of interest.

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential