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.

Floating point/fixed point mode

Expert 1110 points
Other Parts Discussed in Thread: TMS320C6748

Hi,

TMS320C6748 is capable of working in both floating point and fixed point mode, how can I understand which mode my chip is working in? Is it related to defined values in firmware? Can the chip work in both modes or it should be configured in one of them at the first of the code?

Thanks in advance for the help.

Regards,

Vala

  • Hi Vala,

    TMS320C6748 is capable of working in both floating point and fixed point mode, how can I understand which mode my chip is working in? Is it related to defined values in firmware? Can the chip work in both modes or it should be configured in one of them at the first of the code?

    No need to change any firmware or setting register etc.,

    Fixed and Floating point processing could work/support directly.

    Refer to the following link and chapter 3.3.1 of C6748 data sheet.

    www.ti.com/lit/pdf/sprufe8

  • Hi Titus S,

    Thanks for the fast reply. Just to make sure what is in my mind is correct. It means that if fixed-point variables are sent to CPU the fixed-point arithmetic will be employed and if floating-point variables are sent, floating-point arithmetic will be used. Is that correct?

    Regards,

    Vala

  • Hi,

    Thanks for your update.

    Yes you are correct.

    It all depends on the numeric representation you declare the variables and how you program the code in your application. The CPU compuations will be dynamically processed accordingly to the fixed/floating point representation of variables used in the code to perform arithmetic operations in your application.

    Thanks & regards,

    Sivaraj K

  • You guys are talking about different things. Fixed-point is presentation that allows processing with integer-only instructions, not single-precision floating point, as Sivaraj suggests. Naturally it takes floating-point capable processor to [efficiently] process floating point numbers, be they single- or double-precision ones. Yes, different floating point instructions are used to process single- and double-precision values and compiler does all the job. But once again, processor has to be capable of executing floating-point instructions. If processor is integer-only, then floating-point is not feasible. Note that it's not impossible, but performance would hardly be acceptable. Which is why fixed-point presentation is right choice for integer-only processor. But when it comes to fixed-point, compiler offers no help and you have to explicitly program operations yourself. This is because exact parameters of these operations depend on target precision, which you choose yourself. Choosing fixed-point presentation on FP-capable processor might still make sense depending on situation, e.g. when addition ends up on critical path, it's complicated question...

  • Hi Andy,

    Thanks for your answer. I asked about C6748 which is capable of doing both floating-point and fixed-point arithmetic. I wanted to know how to avoid floating-point arithmetic as all of my data representations were in fixed-point shape. 

    -Vala

  • And I couldn't see that TI has adequately answered the question. Indeed, reference to "section 3.3.1" and suggestion that it will be "dynamically processed accordingly to the fixed/floating point representation" can mean two things: 1. TI mixed up fixed-point with either of two real floating point presentations, single or double; 2. TI suggests that compiler supports fixed-point floating point presentation. Neither of the two are correct, which is the reason for comment. Once again, to eliminate doubt. I'm not saying that TI compiler or processor in question doesn't support integer or real floating point operations, I'm saying that fixed-point floating-point operations [that are performed with integer arithmetic] has to be coded explicitly, i.e. compiler offers you no actual help [besides supporting 64-bit result of multiplication]. Well, given your question in another thread, you, Vala, know it better. Comment was actually targeted more at TI than you.