i need to know how to measure MIPS for given function. i.es how to add MIPS profile in the visual dsp++ 3.0 from the main menu ?

i need to know how to measure MIPS for given function. i.es how to add MIPS profile in the visual dsp++ 3.0 from the main menu ?

kumar wrote:

i need to know how to measure MIPS for given function. i.es how to add MIPS profile in the visual dsp++ 3.0 from the main menu ?

You should have access to the Statistical Profiler in Hardware Sessions (Emulator, EZ-KIT Lite), and the Linear Profiler in Simulator sessions, which allow you to profile the execution of your code. The profilers are available via the 'Tools' menu in the IDDE. While it wont give you a MIPS figure, it will allow you to assess the overall performance of your application.

For details on using the Profilers, you should check the Visual DSP Help documentation. You may also be interested in the application Note "EE-332: Cycle Counting a Profiling" which is available via the link below. Although it is based on VisualDSP++ 5.0, a lot of the information should be applicable to the older tools.

http://www.analog.com/ee-notes

You should also note that VisualDSP++ 3.0 is no longer supported. If you are using 218x or 219x architecture you should update to VisualDSP++ 3.5 (and the October 2006 Update), and if you are using Blackfin, TigerSHARC or SHARC you should update to the latest version of the tools (currently VisualDSP++ 5.0). All the latest software is available via the link below:

Hi CraigG,

I am porting an audio algo to SHARC 21469 and I am using VDSP5.

To choose between 21469 and TI's DSP, I would like to know how many percent of total 21469 total computational power is being used for that algo. (FYI, I noticed that statistical profiling always shows almost 100% of total computational power is used, please correct me if I am wrong).

Thank you.

Regards,

Chong

Hi,

the Statistical Profiler is best used to assess the relative amount of time spent on a particular part of your algorithm, to determine whether optimization should/could be done, or whether a certain section of code is taking longer than it really should.

Unless your application has an 'idle' section of code as a reference point that is. i.e. the % of samples in the Statistical Profiler showing your 'idle' code section is the amount of time the processor isn't doing anything. However if your code is always doing

*something*, the results from the Statistical profiler are harder to interpret in terms of MIPS.If your code contains an idle function - perhaps waiting on a timer or external interrupt, the % of samples in this may serve as a base for determining what % of the processing power you are actually using. Note that we always recommend running code for an extended period of time (into the 100K samples, if not 1M samples) to allow the profile to achieve a good level of accuracy - as the Statistical Profiler samples the Program Counter at a periodic basis, the more samples it can gather, the greater the degree of accuracy it can achieve.

The Statistical Profiler will therefore always show a total of 100%, as its figures are based on the number of samples it has taken, not the number of cycles the processor has expended vs. number of cycles a function consumed.

Ideally, I would recommend using Cycle Counting for the section of code in question: determine how many cycles the code takes, per iteration. Determine how many times per second that piece of code gets executed, and divide that by the clock speed. e.g. if you code takes 100 cycles, executes 30 times a second that's only 30K cycles of the available 450MHz.

Regards,

Craig.

Hi,

the Statistical Profiler is best used to assess the relative amount of time spent on a particular part of your algorithm, to determine whether optimization should/could be done, or whether a certain section of code is taking longer than it really should.

Unless your application has an 'idle' section of code as a reference point that is. i.e. the % of samples in the Statistical Profiler showing your 'idle' code section is the amount of time the processor isn't doing anything. However if your code is always doing

something, the results from the Statistical profiler are harder to interpret in terms of MIPS.If your code contains an idle function - perhaps waiting on a timer or external interrupt, the % of samples in this may serve as a base for determining what % of the processing power you are actually using. Note that we always recommend running code for an extended period of time (into the 100K samples, if not 1M samples) to allow the profile to achieve a good level of accuracy - as the Statistical Profiler samples the Program Counter at a periodic basis, the more samples it can gather, the greater the degree of accuracy it can achieve.

The Statistical Profiler will therefore always show a total of 100%, as its figures are based on the number of samples it has taken, not the number of cycles the processor has expended vs. number of cycles a function consumed.

Ideally, I would recommend using Cycle Counting for the section of code in question: determine how many cycles the code takes, per iteration. Determine how many times per second that piece of code gets executed, and divide that by the clock speed. e.g. if you code takes 100 cycles, executes 30 times a second that's only 30K cycles of the available 450MHz.

Regards,

Craig.