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.

DSP/BIOS CPU Load Calculations

Hi, I have a small application running in DSP BIOS usinf tasks, SWI and HWI and now I would like to get an accurate measure of the CPU load however my CU load graph isn't working I have enbled RTDX subbort and HST as suggested in the wiki but the CPU load graph still isn't woking I am using a C5515 EVM with the onboard Spectrum Digital emulator.

I have already tried the following:

My IDLE function is called as I have inserted a log_printf statement in one of the functions called by the IDLE fuction manager and I can see it in the logs.

I think I will have to carry out my own CPU load calculations however how can I find out the MIPS for my CPU along with the number of instruction cycles spend in my IDLE loop.  If I know these values then based on the number of times my IDLE loop is called per second I can calculate the CPU load based of the MIPS.

any help would be Highly appreciated.

MY IDE is CCSv5

  • Ali,

    Maybe you could try the following.

    1.  Determine how fast your CPU is running....for example if its 200 Mhz part then it can do 200 MIPS.

    2.  If there's no counter on the device, you could configure a Timer with a huge period and determine the timer frequency.

    3.  In your idle function read the count value of the timer.  This will tell you how many timer cycles you spent doing some work.

    4.  If the Timer frequency and CPU frequency are not the same, you need to factor into the equation this ratio.

    If you do this, I think you can determine how many instructions its doing work from the 200 MIPS.

    Judah

  • Thanks for your reply Judah, however I do find it a bit amazing that the IDE does not have a reliable profiler, I ended using the following explanation on the wiki:

    http://processors.wiki.ti.com/index.php/Calculating_DSP/BIOS_5_CPU_Load

    with a periodic function calculating the CPU load ever 500ms, I found it a bit strange that my CPU load was shown as 19% even with all my interrupts disabled, I expected this to be much lower any idea if this is normal ?

  • Ali,

    That is not normal.  If nothing is doing work the CPU load should be ~0%.

    I'm not sure what you are doing wrong.  500ms periodic function is pretty long.

    Judah