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.

rts2800_fpu32_fast_supplement.lib division issue

Other Parts Discussed in Thread: CONTROLSUITE

I believe to have found an issue with the division routine from rts2800_fpu32_fast_supplement.lib (version 1.00): for certain values of x the quotient x/x is not exactly 1.0 (see here).

Is there a more recent version of rts2800_fpu32_fast_supplement.lib in which the issue is fixed?

Where do I get the most recent version of that library? sprc664.zip appears to have gone, even though it is still being referenced by TI documents (e.g. sprueo2a.pdf).

Is there a way to restrict the use of rts2800_fpu32_fast_supplement.lib's division routine to certain parts of the project and use rts2800_fpu32.lib's division everywhere else?

Regards,
Johannes

  • Johannes,

    Interesting finding.  I just replicated the example from the other post.

    The fast RTS library (as is most C2000 software) is now released in ControlSuit, http://www.ti.com/tool/controlsuite.

    rts2800_fpu32_fast_supplement.lib v1.00 is the latest.  The easiest thing for you to do is just grab the source files for the library from ControlSuite.  There are only 10 of them, so this is manageable.  Don't grab the division source file.  Then, add any of the other function source files you are using to your CCS project.  For division you will use the regular rts2800_fpu32.lib.  For the other functions, you'll use the fast version that you included the source files for.

    You could also build a new library for yourself using the fast version source files (again, exclude the division routine).  You would us the archiver tool AR2000 that comes with the compiler.  The archiver is documented in the ASM tools user guide, SPRU513E.

    I will bring the division routine problem to the attention of the C2000 team.

    Regards,

    David

  • Hi David,

    thank you for your quick response.

    David M. Alter said:
    You could also build a new library for yourself using the fast version source files (again, exclude the division routine).

    I just did that. I took the whole project that came with sprc664.zip, renamed FS$$DIV and rebuilt the library. Now I use the renamed function to get fast division and get rts2800_fpu32.lib's division everywhere else.

    Regards,

    Johannes

  • I spoke to the C2000 people.  They said this is a known limitation of the fast RTS library.  When doing y/x in the fast RTS, it computes (1/x)*y, with 1/x being computed independently first.  So, there can be some numerical errors due to floating point limitations.

    The trade-off is speed (fast RTS) vs. accuracy (normal RTS).

    - David

  • A side note: if you compute

      q = (1/x)*x;

    using the standard RTS library (instead of q=x/x), you get the same problem as has the fast RTS library.

    - David