DSPRelated.com
Forums

Execution Time calculation using CCS for TMS320F2812

Started by ashu...@yahoo.com September 30, 2008
Hello,

I am using TMS320F2812 processor along with Code Composer Studio and XDS510USB Emulator. I have got my code running in flash so I have got a restriction of setting of maximum of 2 hardware breakpoints in my code.

In my code an application/process is hooked to timer2 interrupt which is set for getting called every XYZ milliseconds and my objective is to confirm that the application is getting finished before XYZ millesecond time elapses. There are other application/processes also hooked to timer0 of the TMS320F2812 and are scheduled to happen for some time.

Now in the above mentioned environment and code I am facing problem while trying to find out the execution time. The first approach was to use the profiling of code composer. In this, I tried to profile all the functions in application/process hooked to timer2 but couldn't do so as profiling requires break points and maximum of 2 break points are allowed.

The second approach I followed is of calculating the CPU cycle count but on trying this I was getting different set of values with lots of variation. I think because of different path and interruptions from processes on other timers.

Can any one suggest other methods of calculating the execution time of the process?

What could be the reason for getting too much of variation using CPU cycle clock method? Is these any way of getting rid of the variations?


OMAP35x EVM jump-starts low-power apps
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building applications based on the OMAP35x architecture: http://www.DSPRelated.com/omap35x
I will speak from our experience at MGEUPS SYSTEMS.
We build our own small Operating system with task execution statistics and
cpu load level.
We use Timer0 at 150Mhz which represent for our taget numbers of ticks per
seconds.

So for interrupts, simply sub the timer value before and after executing
this interrupts.
For task (or lower priority interrupts), we accumulate time consumed in
each higher priority interrupts, and sub this sum from to classical "sub
the timer value before and after executing".

So this is very accurate, we have a ONE cycle measurement precision.
I hope you understand the global overview.
>>>could be the reason for getting too much of variation using CPU cycle
clock method?

Some point to watch:

* Beware timer rollback. It generally count from a value downto 0. You
must detect this rollback, or you will endup with negative value (a 32bit
timer @150Mhz => can measure up to 28s).
* The variation can come from other higher priority interrupts
* Running from flash is slow, and interrupting flash execution is even
slower (Flash -> RAM -> Flash).,
* Different path ?
* conditionnal jump can deadly slow down you execution speed since on
C28xx for example, each cond. jump will broke the pipeline and so
execution drop from 150Mhz to 18Mhz until pipeline is filled again (well,
it's a good approximation).

I hope this will helps you to understand your value.

A.SALMETOZ.

a...@yahoo.com
Envoypar : c...
30/09/2008 02:55
Veuillez rondre br /> a...@yahoo.com
A
c...
cc

Objet
[c28x] Execution Time calculation using CCS for TMS320F2812

Hello,

I am using TMS320F2812 processor along with Code Composer Studio and
XDS510USB Emulator. I have got my code running in flash so I have got a
restriction of setting of maximum of 2 hardware breakpoints in my code.

In my code an application/process is hooked to timer2 interrupt which is
set for getting called every XYZ milliseconds and my objective is to
confirm that the application is getting finished before XYZ millesecond
time elapses. There are other application/processes also hooked to timer0
of the TMS320F2812 and are scheduled to happen for some time.

Now in the above mentioned environment and code I am facing problem while
trying to find out the execution time. The first approach was to use the
profiling of code composer. In this, I tried to profile all the functions
in application/process hooked to timer2 but couldn't do so as profiling
requires break points and maximum of 2 break points are allowed.

The second approach I followed is of calculating the CPU cycle count but
on trying this I was getting different set of values with lots of
variation. I think because of different path and interruptions from
processes on other timers.

Can any one suggest other methods of calculating the execution time of the
process?

What could be the reason for getting too much of variation using CPU cycle
clock method? Is these any way of getting rid of the variations?

OMAP35x EVM jump-starts low-power apps
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building applications based on the OMAP35x architecture: http://www.DSPRelated.com/omap35x