Skip to main content
Knowledgebase
Home
Renesas Electronics America - Knowledgebase

How to get accumulated numbers of clocks in functional units?

Latest Updated:12/01/2011

Question:

In the trace window, the number of clocks is shown in instruction units.
But can I get the accumulated number of clocks or the number of clocks in function units?

Answer:

The accumulated number of clocks cannot be shown in the trace window.
Although this is not a direct method, the approximate value can be obtained as follows:

Number of execution clocks = Execution time / 1 clock cycle time

The following is an actual example:

- Set a breakpoint at the entry point of the function to be measured and set one at the instruction that comes after completion of execution of that function.
- Execute the program and make it stop at the function entry breakpoint.
- Then execute the "Go" command and make it stop at the next breakpoint.
- Next, open the timer dialog box and select "Timer Name" and then "Run-Break."

The execution time then appears.

"Run-Break" is the default timer event in the simulator used to measure the execution time from the last (latest) "Go" command to the "Stop" command.

In addition, the time shown in the timer window is based on the clock cycle obtained from the frequency set in the Clock field of the configuration dialog box.

Therefore, the approximate number of clocks can be obtained as follows:

(Displayed time of timer dialog box) / (1 / Clock value of configuration dialog box)

Here, time measurement is performed simply by setting breakpoints at the beginning and end of the function and obtained by "Run-break."
Measurement of the execution time using an event is also possible.

Refer to 4.2.6 of V800 Series Development Tools Tutorial Guide
Document Number U15196*. Here, read ID850 as SM850 in 4.2.6.

Suitable Products