Hi,

I was looking for a way to perform timing analysis on the hardware ( a SHARC ADSP-21489 ) we are currently using. I have found the app note entitled "Cycle Counting and Profiling Application Note (EE-332)". Looking through the document it states that the Statistical Profiler is faster but it is not as accurate or consistent as the Linear Profiler. I am currently seeing accuracy of +- 1 second using the Statistical Profiler. Is there another way to increase the accuracy of the Statistical Profiler without changing the code on my target or running in simulation mode?

Thanks,

David

Hi,

You are not going to get that resolution from the Statistical Profiler, unfortunately. Interrupting processing to read the PC register at such a frequency would have a significant impact on the real-time metrics of an application.

I would recommend using the Cycle Count Registers, instead, as detailed in the same ee-note. The cycle count could be read at the start of the function and stored/compared against the last reading. If you know the core clock in MHz, and know the number of cycles between invocations of the function, you know the time that has elapsed since the last call.

If you need to monitor this over a prolonged period, you could also look at transmitting the result over the BTC channel. You could store the elapsed-cycles value at each step within a BTC channel, and monitor this through the IDDE.

Regards,

Craig.