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.

Are there some special optimized multiply function for float variable in C674x?

Other Parts Discussed in Thread: MATHLIB

Are there some special optimized multiply function for float variable in C674x?

We use DM8168,the dsp core built-in is C674x.And we use multiply for float variable, for that MathLib is only can be used for divide operation,but for multiply,are there such a lib for us to use?

BR!

  • Dear Suit,
    I've not worked with IQmath library, can you check the IQMath library for effective math multiply operations ?
    processors.wiki.ti.com/.../IQmath_Library_for_C64x+
    http://www.ti.com/tool/sprc542
  • IQMath is for FIXED POINT DSP,such as C64x.
    But the DSP core we use is C674x,a FLOAT POINT DSP.
    I think there is some more suitable method to do this.

    Thank you all the same.
  • SuitJune,

    Since the C674x will do floating point multiplication natively, all you need to do is write your code in C and let the compiler do the optimization. For initial function testing, use the Debug build configuration. Once you have the numerical answers you want, switch to the Release build configuration in CCS to enable compiler optimization.

    Simple code such as the following will perform floating point multiplication:

    float a=3.14159, b=0.5, c;
    c = a * b;
    printf( "product=%f\n", c );

    If I have any syntax errors, I apologize. But you can get the idea. If you have issues with printf working, contact the Code Composer forum for help or get rid of that line or replace it with something that will work in your system.

    Regards,
    RandyP
  • Adding to what RandyP said.

    Randy is correct. The C674X is a floating point processor. I am not sure what you mean by optimized (floating point) multiplication? Is it two ways 32-bit floating point multiplication (that is, in one cycle and in one M unit perform two multiplication?) The C66 can do it (the instruction name is dmpysp, but the C647X cannot do it.


    You can look at the compiler user's guide at table 7-3. inwww.ti.com/.../spru187u.pdf

    This shows you what intrinsic instructions are supported by which DSP core. If you find an instruction that optimizes your code and is available for the C674X core (the last column of the table) you can use it in your C code. I really discourage you from writing assembly code.


    Does it help? If so, can you close the thread


    Ran
  • Thanks for all TIer's reply very much.

    But sorry for my delay verify for that My ti's account's gmail have been forbidden in china,so I can NOT know the thread's status on time.