DSPRelated.com
Forums

"optimization-cycle count"

Started by ranju_pai December 12, 2001
hi!

does somebody know how to count a no.fo cycles for a given function
using adsp-21xx(2181) visual dsp++ without the profile option
available?
for eg in TI processor one can do the profiling using
start=clock();
function();
stop=clock();
since there is no <time.h >header file available in adsp visual dsp++
2.0 can any one of u help in getting the benchmarking code on the
adsp-21xx to do optimization.

thanks and regards



I'm quite sure it's the same in the 21xx series as the Sharcs (since
VisualDSP is supposed to be pretty much the same).

Load program in debugger.
Set breakpoint at the beginning of the function
Set breakpoint at the end of the function
Run to first break point
open cycle counter window (see Debugger's manual if you can't find it)
Clear the register and set it to zero.
Run to next breakpoint and watch the value in the cycle counter.
(convert to decimal if necessary since default is Hex i think).

If your function is a library function, you can do the same thing but
you might need to enter into the disassembly window and set
breakpoints in assembly instead.

Cheers
Bhaskar

--- In adsp@y..., "ranju_pai" <ranju_pai@y...> wrote:
> hi!
>
> does somebody know how to count a no.fo cycles for a given function
> using adsp-21xx(2181) visual dsp++ without the profile option
> available?
> for eg in TI processor one can do the profiling using
> start=clock();
> function();
> stop=clock();
> since there is no <time.h >header file available in adsp visual
dsp++
> 2.0 can any one of u help in getting the benchmarking code on the
> adsp-21xx to do optimization.
>
> thanks and regards


Hi,
I too need the same for 2106x SHARC Processors. If any body knows, plz
let me know how to read the cycle count.
Thanks and Regards,
P Narayanaswamy

On Wed, 12 Dec 2001, ranju_pai wrote:

> hi!
>
> does somebody know how to count a no.fo cycles for a given function
> using adsp-21xx(2181) visual dsp++ without the profile option
> available?
> for eg in TI processor one can do the profiling using
> start=clock();
> function();
> stop=clock();
> since there is no <time.h >header file available in adsp visual dsp++
> 2.0 can any one of u help in getting the benchmarking code on the
> adsp-21xx to do optimization.
>
> thanks and regards >
> _____________________________________
> Note: If you do a simple "reply" with your email client, only the author of
this message will receive your answer. You need to do a "reply all" if you want
your answer to be distributed to the entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join: Send an email to
>
> To Post: Send an email to
>
> To Leave: Send an email to
>
> Archives: http://groups.yahoo.com/group/adsp
>
> Other Groups: http://www.dsprelated.com/groups.php3 > ">http://docs.yahoo.com/info/terms/