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.

TDA3XEVM: Looking for complex matrix add DSP API

Part Number: TDA3XEVM

Hi,

I need a DSP API that performs complex element by element add in two given complex matrices. I looked into the DSPLib that included in the Vision SDK but don't seem or recognize such a function exist. Is there such an API exist that has been optimized on TDA3 DSP?

Thanks,

--Khai

  • Hello!

    Complex sum on matrices is just sequence of complex sums on their elements, while complex sum on elements is just two scalar sums on real and imaginary parts. Because of that I suspect that C natural implementation would optimize well enough.

    Next, you did not mentioned, what is representation of your numbers. If they are floats, I would simply add real/imag in loop twice large as matrix is. If they are integers, DSP_add16/32 might be of help, though that depends on your matrices storage in memory.

  • Hi Khai,

    can you look at chapter ""3.2 Complex Matrix Operation and Vector Operations using Advanced C66x Fixed-Point Instructions" in this document:
    www.ti.com/.../sprabg7.pdf

    and see if it suits your needs.

    Regards,
    Yordan
  • Yordon,

    Thanks for the link.

    so the doc said: "The C66x adds additional fixed-point SIMD instructions that enable faster fixed-point complex number operations such as vector addition/subtraction, and vector and matrix complex number multiplication.". For complex add I am looking for, It seems I can do complex vector add with one of these two:

    ai±bi no saturation, i=0 ADD2/SUB2 L, S, D _add2/_sub2(a0, b0)

    ai±bi no saturation, i=0, 1 DADD2/DSUB2 L,S _dadd2/_dsub2(ai, bi)

    I don't understand what it means by no saturation and L, S, D, etc... Is there example code of how to use these instructions?

    Thanks,

    --Khai

  • never mind. I found the solution in Vision SDK.

    /VisionSDK/ti_components/algorithms/mmwave_sdk_01_02_00_05/packages/ti/alg/mmwavelib/src/vecutils/mmwavelib_vecsum.c

    Thanks,

    --Khai