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.

compiler v4.1.2 : floating point emulation performance

Other Parts Discussed in Thread: MSP430F5438A

hello,

i used the msp430f5438A.
and CCS 5.3.
and compiler version:TI v4.1.2
and i run in mclk = 16mhz.

Is there any documentation that provides data  
about floating point emulation performance?

thanks.

  • No, there is nothing available. Floating point emulation on CPUs without floating-point instructions is typically quite slow. Which specific operations and functions are you concerned about?
  • float/double operation taking too long.

    e.g.
    my system time build in that way:

    typedef time_t double;
    time_t systemtime;
    #define Tick  0.0001; // the clock is 10khz ,
            //hence every 0.0001sec i promoting the time
    and in the time interrupt service routine i write:
     
     systemtime += Tick;

    this simple operation of :
    systemtime += Tick;
    take about 60usec ( i measure it by scope).

    and because i run in 16mhz , in mean the the number of assembly operation for
    making  this simple operation is 16 * 60 = 960 cycles or
    about 960 assembly commands.

    1) Is the result I got is reasonable?

    2)second thing:
    I would like to receive information
    about the number of cycles of simple operations like
    multiplication, addition, subtraction, division.
    Is this information exist?

    thanks.

  • There isn't any rigorous profiling of the basic operations, but you should expect something on the order of the following.

     
           IEEE-32   IEEE-64
    add     174        737 
    sub     177        794
    mul     372       1355
    div     408       4387
    

    I strongly suggest you use "unsigned long long" instead of a floating-point type to maintain a counter.