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.

ATAN2 function in Fast_RTS library seems to be executing slower than rts2800_fpu32 on F28335

 

My question regarding the use of the FastRTS library for the TI C2000 for some floating point operations.  The library can be found here:

 http://focus.ti.com/docs/toolsw/folders/print/sprc664.html

When I implement this library for atan2, the execution time is slower than using the library rts2800_fpu32 that comes with the code generation tools (v5.0.2).

 My expectation was there would be a performance improvement using the FastRTS library. Is my expectation correct?

 

I know the FastRTS library is linking correctly by examining the resulting memory map file from the build process.

  • Hi Greg,

    I haven't checked the normal RTS cycle count in a while so I'll need to do some experiments before I can say positively.

    I guess it is possible, but I'll be surprised of the regular RTS was faster - the fast RTS library uses a lookup table method while the normal RTS probably uses something like a taylor expansion.

    Are you using the lookup table in the ROM or has it been loaded into RAM? 

    How many cycles are you seeing for the FastRTS library?  It should be around 50 cycles (a few less if the lookup table is in single cycle RAM and a few more if it is linked to 1 wait Boot ROM).

    Lori

     

  • Greg,

    I ran a quick test using the 5.1.5 compiler.  I see around 50 cycles if I use the fast RTS library.  The normal RTS library is taking around 900 cycles.   

    Do either of these numbers align to what you are seeing? 

    Can you try a newer compiler and see if it makes a difference?

    Also please check that the code for both cases is in single wait state RAM and not a heavily waitstated memory like flash or XINTF.

    Also quickly looked at the disassembly I don't see the normal RTS being faster.  The fastRTS uses a lookup table and doesn't make any other function calls.  The normal RTS is making multiple calls to other functions and has a number of discontinuites.

    Cheers

    Lori

  • Hi Lori,

      Would you mind viewing what I am doing over webex?  I am pretty sure that I am doing everything correctly, but I may be using a different profiling mechanism that you are.

    If you are willing, I would be happy to setup the webex.

    Cheers,

    -Greg

    greg.wolff@mathwork.remove*this(text*lksjdflkdsjsfdlkj.com

     

  • Greg,

    I did a quick screen capture of how I profiled the function.  Please let me know if it helps.

    http://www.youtube.com/watch?v=bDA8hClY2gY

    Regards,

    Lori

     

  • Could you please provide some instructions for including the FastRTS library and link orders in Code Composer 4?