DSPRelated.com
Forums

Any Utility like profiler

Started by Nitin Madhukar Yewale September 25, 2002
Hi,
Does codewarrior provide any utility like profiler? I want to
know how much time/machine cycles are required for a specific function.
Just to count machine cycles we can use simulator but I don't
know how to use it for each function.

Regards,
nitin


**************************Disclaimer********************************************\
******

Information contained in this E-MAIL being proprietary to Wipro Limited is
'privileged'
and 'confidential' and intended for use only by the individual or entity to
which it is
addressed. You are notified that any use, copying or dissemination of the
information
contained in the E-MAIL in any manner whatsoever is strictly prohibited.

********************************************************************************\
********



The easiest way I have found to do timing analysis is to dedicate 1 or 2 output pins as test points, and monitor those points with an oscilloscope.  Then, by inserting single-bit toggle instructions, you can "bracket" an area of code, and not only see the execution time, but also the period, and relationship between different sections of "bracketed"code.
 
Jerry
-----Original Message-----
From: Nitin Madhukar Yewale [mailto:n...@wipro.com]
Sent: Wednesday, September 25, 2002 8:50 AM
To: m...@yahoogroups.com
Subject: [motoroladsp] Any Utility like profiler

Hi,
      Does codewarrior provide any utility like profiler? I want to
know how much time/machine cycles are required for a specific function.
      Just to count machine cycles we can use simulator but I don't
know how to use it for each function.

Regards,
nitin


_____________________________________
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:  m...@yahoogroups.com

To Post:  m...@yahoogroups.com

To Leave: m...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/motoroladsp

More Groups: http://www.dsprelated.com/groups.php3


">Yahoo! Terms of Service.


--- In motoroladsp@y..., "Nitin Madhukar Yewale" <nitin.yewale@w...>
wrote:
> Hi,
> Does codewarrior provide any utility like profiler? I want to
> know how much time/machine cycles are required for a specific
function.
> Just to count machine cycles we can use simulator but I don't
> know how to use it for each function.
>
> Regards,
> nitin

See section 5.2.4.2", Cycle Count Services Specifications", in the
SDK Programmer's Guide. Here you can learn how to use the stopwatch
function provided by SDK to time your code. Here's an example:

void main (void)
{ UWord32 pCycleCount[2];
cycleCountCalibrate();
cycleCountStart();
// EXECUTE 4 NOPs
asm(nop); asm(nop); asm(nop); asm(nop);
pCycleCount[0] = cycleCountStop();
if (pCycleCount[0] == CYCLECOUNT_CALIBRATION_FAILURE)
{ // test failed }

cycleCountStart();
// EXECUTE 8 NOPs
asm(nop); asm(nop); asm(nop); asm(nop); asm(nop); asm(nop);
asm(nop); asm(nop);
pCycleCount[1] = cycleCountStop();
if (pCycleCount[1] == CYCLECOUNT_CALIBRATION_FAILURE)
{ // test failed }

cycleCountReport((long *) pCycleCount, 2);
}