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.

Question on the functions of the C28x Floating Point Unit DSP Library

Hello,

I have to do some processing that are mainly: matrix operations of complex numbers in floating point format.

So I need very often to multiply 2 matrix.

I understood that the provided library provides "vectors" API. So to manage matrix we just need to call several time some "vectors" API.

I do not have any problem with that.

However, to do the multiplication by vectors, I need always an API such as:

Multiply-and-Accumulate of a Complex Vector (Single Precision Float
and a Complex Vector (Single Precision Float)

but there is only the following one:

Multiply-and-Accumulate of a Real Vector (Signed 16-bit Integer)
and a Complex Vector (Single Precision Float)

 

I would like to know if I missed something ?

One solution that I saw is to first call the function mpy_SP_CVxCV and then do the sum of the vector elements. But this sum does not exist (even if of course I can do it manually in C with a loop) or do I have top call: mac_SP_i16RVxCV with i16RV = (1, 1, .., 1) ?

I have the version v3.3.8 of this library.

Do you plan to deliver the functions that I indicated or you recommend to me to use an alternative solution?

Thanks and bets regards,

Mathieu

  • Hi Mathieu,

    What you are looking for is a mac_SP_CVxCV which we haven't implemented yet. I have put in a "requirement" request to add this and mac_SP_CVxCVC for the next realease. 

    If you give me about a week i will post the routine in reply to this post. 

  • Hi Vishal,

    Thanks a lot for your answer.


    I will really appreciate if you can provide in advance in the post a first version of this routine. In addition, later if you can also include it in the next version it would be perfect!


    Thanks again.


    Regards,


    Mathieu
  • Mathieu,

    Here is a preliminary version of the routine.mac_SP_CVxCV.asm

    Add the following prototype to fpu_vector.h

    //! \brief Multiply-and-Accumulate of a Complex Vector and a Complex Vector.
    //!
    //! This module multiplies and accumulates a complex vector and another
    //! complex vector.
    //! \f[y_{re} &=& \sum(w_{re}[i]* x_{re}[i] - w_{im}[i] * x_{im}[i]) \f]
    //! \f[y_{im} &=& \sum(w_{re}[i]* x_{im}[i] + w_{im}[i] * x_{re}[i]) \f]
    //! \param y complex result
    //! \param w pointer to the first complex input vector
    //! \param x pointer to the second complex input vector
    //! \param N length of the w and x vectors
    //! \attention N must be a minimum of 3
    //
    extern complex_float mac_SP_CVxCV(const complex_float *w,
                             const complex_float *x, const uint16_t N);
                             

    It will be a while till the next release as it is a major one so i expect this may not be the final version of the routine, although i dont really see further room to optimize it--- but someone else might. Anyway, let me know if this works or if there are issues with it.

  • Thanks a lot Vishal for this function provided in advance. I really appreciated!
    I tested it and it seems to work fine.
    In addition it saves numerous CPU cycles. It looks like that the Number of Cycles = 6*N + constant
    Do you confirm that the latest version for FPU DSP Software Library is: V1.50.00.00: Moderate Update ?
    Thanks and best regards,
    Mathieu
  • Mathieu, Yes the last released version of the FPU library was 1.50.00.00