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.

The output buffer data structure of VCU2 CFFT example

Dear, C2K champs,

I am using the VCU2 CFFT example project, but confuse on the output buffer data arrangement.

Is it magnitude1 - phase1 --------- magnitude1024 - phase1024 or magnitude1 -------- magnitude1024 - phase1 -------------- phase1024?

Regards,

Hardy

  • Hi Hardy,

    The VCU2 examples do not compute magnitude and phase just the complex spectrum of the input.

    The user must calculate the magnitude and phase for the FFT output using either their own function or one from another library. The VCU2 instruction set does not have any native instructions to do phase so you will likely have to use the IQmath library to calculate the phase IQ15atan2(imag, real).

    I havent written the magnitude function for this library. There is a VCU2 instruction, VCMAG, that can compute the magnitude of a complex data point in one cycle.

  • HI, Vishal,
    Got and understand, thanks for your answer.
    Regards,
    Hardy