DSPRelated.com
Forums

hi how to check the number of cycles taken bye program

Started by harsha sb sb March 25, 2005

Hi all,

I am new to this VisualDSPĀ  IDE. Presently i am working on the simulator of adsp-21160 processor.

I have a C code and i am running it perfectly. i would like to check the performance of the C - code so whats the procedure to check it.

How many cycles it is taking, whats my processor efficiency, and other things.

Please help me this its little urgent to me, i have to submit the document to the client.

Thanks
Harsha S





Copy the file "benchmarc.asm" from one of the example projects that come
with VisualDSP++ into your project directory and include it into your
project.

Then decleare the following at the start of Main.c:

int count_start();
int count_end(int);
volatile int timeTemp;

In the interupt routine, include the following:

void Process_Samples( int sig_int )
{
Receive_Samples();

int ClkPerioder;
timeTemp= count_start();

// Your code here ClkPerioder = count_end(timeTemp);

Transmit_Samples();
}

Then set a breakpoint at the line with "Transmit_Samples();" and open a
Locals debug window.

The "statistic profiling" tool is also wort investigating.

Best regards.

harsha sb sb a rit :
> Hi all,
>
> I am new to this VisualDSP IDE. Presently i am working on the simulator
> of adsp-21160 processor.
>
> I have a C code and i am running it perfectly. i would like to check the
> performance of the C - code so whats the procedure to check it.
>
> How many cycles it is taking, whats my processor efficiency, and other
> things.
>
> Please help me this its little urgent to me, i have to submit the
> document to the client.
>
> Thanks
> Harsha S >
> <http://clients.rediff.com/signature/track_sig.asp>
>
> *
>
> * To <http://docs.yahoo.com/info/terms/>.