NMSIS-DSP  Version 1.2.0
NMSIS DSP Software Library
Real FFT Q15 Functions

Macros

#define RFFTINIT_Q15(LEN, CFFTLEN, TWIDMOD)
 

Functions

 RFFTINIT_Q15 (8192, 4096, 1)
 Initialization function for the 8192 pt Q15 real FFT. More...
 
 RFFTINIT_Q15 (4096, 2048, 2)
 Initialization function for the 4096 pt Q15 real FFT. More...
 
 RFFTINIT_Q15 (2048, 1024, 4)
 Initialization function for the 2048 pt Q15 real FFT. More...
 
 RFFTINIT_Q15 (1024, 512, 8)
 Initialization function for the 1024 pt Q15 real FFT. More...
 
 RFFTINIT_Q15 (512, 256, 16)
 Initialization function for the 512 pt Q15 real FFT. More...
 
 RFFTINIT_Q15 (256, 128, 32)
 Initialization function for the 256 pt Q15 real FFT. More...
 
 RFFTINIT_Q15 (128, 64, 64)
 Initialization function for the 128 pt Q15 real FFT. More...
 
 RFFTINIT_Q15 (64, 32, 128)
 Initialization function for the 64 pt Q15 real FFT. More...
 
 RFFTINIT_Q15 (32, 16, 256)
 Initialization function for the 32 pt Q15 real FFT. More...
 
riscv_status riscv_rfft_init_q15 (riscv_rfft_instance_q15 *S, uint32_t fftLenReal, uint32_t ifftFlagR, uint32_t bitReverseFlag)
 Generic initialization function for the Q15 RFFT/RIFFT. More...
 

Detailed Description

Macro Definition Documentation

◆ RFFTINIT_Q15

#define RFFTINIT_Q15 (   LEN,
  CFFTLEN,
  TWIDMOD 
)

Function Documentation

◆ RFFTINIT_Q15() [1/9]

RFFTINIT_Q15 ( 1024  ,
512  ,
 
)

Initialization function for the 1024 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
  • RISCV_MATH_SUCCESS : Operation successful
  • RISCV_MATH_ARGUMENT_ERROR : fftLenReal is not a supported length
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ RFFTINIT_Q15() [2/9]

RFFTINIT_Q15 ( 128  ,
64  ,
64   
)

Initialization function for the 128 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
  • RISCV_MATH_SUCCESS : Operation successful
  • RISCV_MATH_ARGUMENT_ERROR : fftLenReal is not a supported length
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ RFFTINIT_Q15() [3/9]

RFFTINIT_Q15 ( 2048  ,
1024  ,
 
)

Initialization function for the 2048 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
  • RISCV_MATH_SUCCESS : Operation successful
  • RISCV_MATH_ARGUMENT_ERROR : fftLenReal is not a supported length
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ RFFTINIT_Q15() [4/9]

RFFTINIT_Q15 ( 256  ,
128  ,
32   
)

Initialization function for the 256 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
  • RISCV_MATH_SUCCESS : Operation successful
  • RISCV_MATH_ARGUMENT_ERROR : fftLenReal is not a supported length
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ RFFTINIT_Q15() [5/9]

RFFTINIT_Q15 ( 32  ,
16  ,
256   
)

Initialization function for the 32 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
  • RISCV_MATH_SUCCESS : Operation successful
  • RISCV_MATH_ARGUMENT_ERROR : fftLenReal is not a supported length
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ RFFTINIT_Q15() [6/9]

RFFTINIT_Q15 ( 4096  ,
2048  ,
 
)

Initialization function for the 4096 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
  • RISCV_MATH_SUCCESS : Operation successful
  • RISCV_MATH_ARGUMENT_ERROR : fftLenReal is not a supported length
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ RFFTINIT_Q15() [7/9]

RFFTINIT_Q15 ( 512  ,
256  ,
16   
)

Initialization function for the 512 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
  • RISCV_MATH_SUCCESS : Operation successful
  • RISCV_MATH_ARGUMENT_ERROR : fftLenReal is not a supported length
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ RFFTINIT_Q15() [8/9]

RFFTINIT_Q15 ( 64  ,
32  ,
128   
)

Initialization function for the 64 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
  • RISCV_MATH_SUCCESS : Operation successful
  • RISCV_MATH_ARGUMENT_ERROR : fftLenReal is not a supported length
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ RFFTINIT_Q15() [9/9]

RFFTINIT_Q15 ( 8192  ,
4096  ,
 
)

Initialization function for the 8192 pt Q15 real FFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
  • RISCV_MATH_SUCCESS : Operation successful
  • RISCV_MATH_ARGUMENT_ERROR : fftLenReal is not a supported length
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.

◆ riscv_rfft_init_q15()

riscv_status riscv_rfft_init_q15 ( riscv_rfft_instance_q15 S,
uint32_t  fftLenReal,
uint32_t  ifftFlagR,
uint32_t  bitReverseFlag 
)

Generic initialization function for the Q15 RFFT/RIFFT.

Parameters
[in,out]Spoints to an instance of the Q15 RFFT/RIFFT structure
[in]fftLenReallength of the FFT
[in]ifftFlagRflag that selects transform direction
  • value = 0: forward transform
  • value = 1: inverse transform
[in]bitReverseFlagflag that enables / disables bit reversal of output
  • value = 0: disables bit reversal of output
  • value = 1: enables bit reversal of output
Returns
execution status
  • RISCV_MATH_SUCCESS : Operation successful
  • RISCV_MATH_ARGUMENT_ERROR : fftLenReal is not a supported length
Details
The parameter fftLenReal specifies length of RFFT/RIFFT Process. Supported FFT Lengths are 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192.
The parameter ifftFlagR controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated.
The parameter bitReverseFlag controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order.
This function also initializes Twiddle factor table.
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.