This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how many cycles spent CPU for function done?

Other Parts Discussed in Thread: TMS320C5515

Hello, 

I have TMS320C5515 eZDSP USB STICK and some function X. It is possible to known how many cycles spent CPU for function done? I tried to use cycles in CCS v4.1 (Target-> Clock), thus if I use it step by step(F6) in function body and/or by breakpoint to breakpoint that final number of cycles not the same.Generally, which method of calculation of cycles has preference?Maybe there is some function to make that? 

Also, another question, how is possible to known real CPU, PLL, clock frequency for use it, for example, in a body of function or like her argument?

 Best regards! (Sorry for my "upper-elementary"-"pre-intermediate" english)

 

  • One way to measure is to use a spare I/O and drive it high before the function call and low after the function call. I have used the XF pin to do this, but that pin may not be as accessable on the eZdsp, because it drives an LED. If you have a logic analyzer or oscilloscope, connect to the spare I/O pin to make the measurement. It is the most accurate way to get an idea of how long your function takes to execute.

  • I concur with Mr. Anderson.  If you don't have a logic analyzer, get one.  They're cheap and invaluable for this sort of work.

     In regards to the CPU frequency, I typically use a project-level define (i.e., CPU_FREQ).  This assumes that your clock frequency is not dynamic.