Hi,
I have problem with transform float IEEE-754 to C4x floating-point format (32 and 40bit). Is there CCS library including functions to do it? I read data prepared on PC to EVM OMAP-L137.
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.
Hi,
I have problem with transform float IEEE-754 to C4x floating-point format (32 and 40bit). Is there CCS library including functions to do it? I read data prepared on PC to EVM OMAP-L137.
Hi Mariana,
I have got float data in file created on PC computer (not text). I think float bit organisation for PC platform is diferent to DSP processor. In IEEE 754 standard 31-bit contain sign of float then exponent and fraction, I am not sure but DSP float has diferent order - exponent - sign - fraction. Several years ago I used TIC compiler for C40x processors containing library with functions vieee2flt() that convert PC float to DSP float. I need equivalent of vieee2flt() for CCS OMAP-L137. I am looking for eguivalent of TIC compiler library consist vcoordtrans3Dsf(), vsub3f(), mtransposef(). My next question is: what size is float defined in CCS for OMAP-L137, 32 or 40 bit?
The C40 did not use IEEE standard floats and hence you needed the function. The DSP core (C674x) inside the OMAP-L137 uses IEEE standard floats. Here's a screenshot from the "DSP Features and Options" section of the C674x CPU and Instruction Set Reference Guide.
Hi Brad,
You are right, but what about 40 bit precision operation on C++ CCS level.
I can't speak to C++ as I do everything in C. From a C perspective we have type "long" which is a 40-bit integer. In terms of floating point we have only IEEE standard floats (32-bit single and 64-bit double). There is not a 40-bit floating point data type.
The C3x/C4x floating point forman (non-IEEE) is documented on p. 114 of http://focus.ti.com/lit/ug/spru031f/spru031f.pdf
Later in Chapter 5 are example of how to convert to/from IEEE.