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. ********************************************************************************\ ******** |
|
Any Utility like profiler
Started by ●September 25, 2002
Reply by ●September 25, 20022002-09-25
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
|
Reply by ●September 26, 20022002-09-26
--- 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); } |