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.

CPU cycles need for 32-bit float plus 32-bit float

Hi all,

I am using the chip F28377D. I want to measure the CPU cycles need for 32-bit float plus another 32-bit float. Here is what I do.

1. Set the GPIO = 1;

2. 32-bit float plus 32-bit float runs 100 times

3. Set the GPIO = 0;

4. Measure the on time of the GPIO on the scope and calculate the average CPU cycles according to the system pll frequency.

The code is run from Ram. I find the average CPU cycle is around 20, no matter what the system pll frequency is (I tested when it is 100Mhz or 200Mhz). Does it make sense? The CPU really takes 20 cycles for just one float plus another float?

Thanks

  • Hi,

    20 cycles for each addition?  Or 20 cycles between the setting and clearing of the GPIO?  I assume the first, but your description is not completely clear.

    Can you make sure that fpu32 is enabled? 

    Right-click on your project -> Properties -> Build -> C2000 Compiler -> Processor Options 
    and make sure that fpu32 floating point support is enabled


    Thank you,
    Brett