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.

TMS320F280049: Different result on CPU and CLA

Part Number: TMS320F280049


Hello,
customer has 2nd order filter code which produces different results (coefficients) on CPU and CLA. The CLA is not correct and the results seams a little improper like it has some rounding errors or calculating with 32bit or 64bit.

Coefficient    Simulation results    CPU                   CLA                     Data Type
c1                 0.01241                   0.0124099338    0.0125049111      float
c2                 0            0.0             0.                        0                          float
c3                -0.01241                  -0.0124099338    -0.0125049111    float
d2               1.975                        1.975                   1.98791492         float
d3               -0.9752                    -0.975                  -0.988072157      float

Would could be the reason? I can send you the code snippet per email

Regards, Holger

  • Holger, 

    Were these values calculated by code running on the CLA?  If so, one thing to check is that the rounding mode for the CLA is setIf (RNDF32 = 1) 

    Assembly: 

      MSETFLG RNDF32=1                                                                           

    Or in C using the intrinsic (ref the compiler guide -http://www.ti.com/lit/spru514)

    __msetflg(unsigned short flag , unsigned short value )
    
    Example: This example sets the RNDF32 flag (bit 7) to 0, the
    TF flag (bit 6) to 0, and the NF flag (bit 2) to 1. The
    0b prefix is a GCC language extension indicating
    that these are binary numbers.
    
    __msetflg(0b11000100, 0b00000100);

    If this is not the case, then I need more information

    • testcase
    • compiler version
    • exact build options used

    Thank you

    Lori