Complex FFT Q31

RISCV_DSP_ATTRIBUTE riscv_status riscv_cfft_init_q31 (riscv_cfft_instance_q31 *S, uint16_t fftLen)
RISCV_DSP_ATTRIBUTE void riscv_cfft_q31 (const riscv_cfft_instance_q31 *S, q31_t *p1, uint8_t ifftFlag, uint8_t bitReverseFlag)
FFTINIT(EXT, SIZE)
CFFTINIT_Q31(LEN, LENTWIDDLE)
group Complex FFT Q31

Defines

FFTINIT(EXT, SIZE)
CFFTINIT_Q31(LEN, LENTWIDDLE)

Functions

RISCV_DSP_ATTRIBUTE riscv_status riscv_cfft_init_q31 (riscv_cfft_instance_q31 *S, uint16_t fftLen)

Initialization function for the cfft q31 function for 4096 samples.

Initialization function for the cfft q31 function for 2048 samples

Initialization function for the cfft q31 function for 1024 samples

Initialization function for the cfft q31 function for 512 samples

Initialization function for the cfft q31 function for 256 samples

Initialization function for the cfft q31 function for 128 samples

Initialization function for the cfft q31 function for 64 samples

Initialization function for the cfft q31 function for 32 samples

Initialization function for the cfft q31 function for 16 samples

Generic initialization function for the cfft q31 function
Use of this function is mandatory only for the RVV versions of the FFT.

Other versions can still initialize directly the data structure using variables declared in riscv_const_structs.h

Use of this function is mandatory only for the RVV versions of the FFT.

Other versions can still initialize directly the data structure using variables declared in riscv_const_structs.h

Use of this function is mandatory only for the RVV versions of the FFT.

Other versions can still initialize directly the data structure using variables declared in riscv_const_structs.h

Use of this function is mandatory only for the RVV versions of the FFT.

Other versions can still initialize directly the data structure using variables declared in riscv_const_structs.h

Use of this function is mandatory only for the RVV versions of the FFT.

Other versions can still initialize directly the data structure using variables declared in riscv_const_structs.h

Use of this function is mandatory only for the RVV versions of the FFT.

Other versions can still initialize directly the data structure using variables declared in riscv_const_structs.h

Use of this function is mandatory only for the RVV versions of the FFT.

Other versions can still initialize directly the data structure using variables declared in riscv_const_structs.h

Use of this function is mandatory only for the RVV versions of the FFT.

Other versions can still initialize directly the data structure using variables declared in riscv_const_structs.h

Use of this function is mandatory only for the RVV versions of the FFT.

Other versions can still initialize directly the data structure using variables declared in riscv_const_structs.h

Use of this function is mandatory only for the RVV versions of the FFT.

Other versions can still initialize directly the data structure using variables declared in riscv_const_structs.h

This function should be used only if you don’t know the FFT sizes that you’ll need at build time. The use of this function will prevent the linker from removing the FFT tables that are not needed and the library code size will be bigger than needed.

If you use NMSIS-DSP as a static library, and if you know the FFT sizes that you need at build time, then it is better to use the initialization functions defined for each FFT size.

Parameters:
  • S[inout] points to an instance of the floating-point CFFT structure

  • S[inout] points to an instance of the floating-point CFFT structure

  • S[inout] points to an instance of the floating-point CFFT structure

  • S[inout] points to an instance of the floating-point CFFT structure

  • S[inout] points to an instance of the floating-point CFFT structure

  • S[inout] points to an instance of the floating-point CFFT structure

  • S[inout] points to an instance of the floating-point CFFT structure

  • S[inout] points to an instance of the floating-point CFFT structure

  • S[inout] points to an instance of the floating-point CFFT structure

  • S[inout] points to an instance of the floating-point CFFT structure

  • fftLen[in] fft length (number of complex samples)

Returns:

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_ARGUMENT_ERROR : an error is detected

Returns:

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_ARGUMENT_ERROR : an error is detected

Returns:

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_ARGUMENT_ERROR : an error is detected

Returns:

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_ARGUMENT_ERROR : an error is detected

Returns:

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_ARGUMENT_ERROR : an error is detected

Returns:

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_ARGUMENT_ERROR : an error is detected

Returns:

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_ARGUMENT_ERROR : an error is detected

Returns:

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_ARGUMENT_ERROR : an error is detected

Returns:

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_ARGUMENT_ERROR : an error is detected

Returns:

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_ARGUMENT_ERROR : an error is detected

RISCV_DSP_ATTRIBUTE void riscv_cfft_q31 (const riscv_cfft_instance_q31 *S, q31_t *p1, uint8_t ifftFlag, uint8_t bitReverseFlag)

Processing function for the Q31 complex FFT.

CFFT Size

Input Format

Output Format

Number of bits to upscale

16

1.31

5.27

4

64

1.31

7.25

6

256

1.31

9.23

8

1024

1.31

11.21

10

Input and Output formats for CFFT Q31

CIFFT Size

Input Format

Output Format

Number of bits to upscale

16

1.31

5.27

0

64

1.31

7.25

0

256

1.31

9.23

0

1024

1.31

11.21

0

Input and Output formats for CIFFT Q31

      void riscv_cfft_q31(
const riscv_cfft_instance_q31 * S,
      const q31_t * src,
      q31_t * dst,
      q31_t *buffer,
      uint8_t ifftFlag
      )
RVV version

The rvv version has a different API. The input and output buffers must be different. There is a temporary buffer. The bit reverse flag is not more available in rvv version.

Size of buffers according to the target architecture and datatype:

They are described on the page transform buffers.

Parameters:
  • S[in] points to an instance of the fixed-point CFFT structure

  • p1[inout] points to the complex data buffer. Processing occurs in-place

  • ifftFlag[in] flag that selects transform direction

    • value = 0: forward transform

    • value = 1: inverse transform

  • bitReverseFlag[in] flag that enables / disables bit reversal of output

    • value = 0: disables bit reversal of output

    • value = 1: enables bit reversal of output