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.

DM816x: Hardware Floating Point on the DSP?

Hello:

How do we instruct the compiler to compile DSP code using the DSP's HARDWARE floating point?

Do we have to do anything special  (Compiler settings, etc?)

How do we know whether a software emulated floating point was used or if it indeed is using the hardware floating point unit / instructions.

Is the hardware floating point unit only used for float data types, or does it use this floating point unit for doubles too?

Where can I learn more about the floating point unit?

Regards,

--B

  • Hi,

    You need a libc that has been built with hardware floating point support  before you can do anything. The Code Sourcery compiler that is provided free with the EZSDK does not have a libc with hardware floating point, however the compiler itself _does_ support hardware floating point.

    I recommend using Cross Tools as your first stage of building a libc/compiler with hardware floating point support.

    If you want to know more about the VFP you need to read up on the ARM Cortex A8 at arm.com. If you need to verify that your built applications are using the VFP unit you should look at the machine code/disassembly of the binaries you have built and check that the correct instructions are being used for floating point.

    Ralph

  • Thanks Ralph: 

    That is helpful for compiling for the Cortex A8. 

    The C6x DSP has a floating point unit too (and a different compiler) and this is what I am interested in. 

    Any ideas here?

    Thanks,

    --B

  • Oops, sorry. Totally missed that.

    Have you looked in <EZSDK>/dsp-devkit?

    There will be a PDF (try TMS320C674x DSP CPU and Instruction Set - SPRUFE8.pdf)  about the C6000 instruction set you can consult on the various op codes that the DSP uses and once you've built a very simple binary doing floating point for the DSP you'd need to disassemble it to check there were the correct op codes (no software floating point emulation).

    I'd always assumed the DSP used hardware floating point only and that software floating point did not exist.....

    Ralph