Skip to content

Commit

Permalink
Improved doxygen documentation for FFTs.
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe0606 committed Dec 9, 2024
1 parent f91cb53 commit e49e650
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Documentation/Doxygen/src/mainpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,21 @@ All algorithms are compared with a double precision reference and the different

As consequence, the small differences that may exists between the different architecture implementations should be too small to have any practical consequences.

Also, when targetting Helium or Neon, some functions have different APIs.

### Different API for Helium
* Biquad F32 and F16 : A different init function must be used
* FIR F32, F16, Q31, Q15 and Q7 : Coefficient array must be padded with zeros

### Different API for Neon
* Biquad F32 initialization : An additional function must be used for initialization
* MFCC F32, F16, Q31 and Q15 : Additional temporary buffer required for the functions
* CFFT F32, F16, Q31 and Q15 : Additional temporary buffer required for the functions
* RFFT F32, F16, Q31 and Q15 : Additional temporary buffer required for the functions. Different arguments for the init function of Q31 and Q15 RFFT

For CFFT and RFFT, a new Neon specific initialization function is available to be able to use longer FFTs.

For CFFT, this new Neon specific initialization allows to use FFT lengths with factor of 3 and 5 in the length (but must still be a multiple of 4 length).


## License {#license}
Expand Down
4 changes: 4 additions & 0 deletions Include/dsp/transform_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ extern "C"
* On Neon, there is another possibility. You can use arm_cfft_init_dynamic_q15. This function will allocate a buffer at runtime and compute at runtime all the tables that are required for a specific FFT size. This initialization is also supported by RFFT.
* The computation to initialize all the tables can take lot of cycles
* (since several cos and sin must be computed)
*
* With this new Neon specific initialization you can use longer lengths.
* With CFFT, you can also use lengths containing radix 3 and/or 5 (but
* the length must still be a multiple of 4).
*/


Expand Down
17 changes: 17 additions & 0 deletions Ne10/CMSIS_NE10_fft_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ static ne10_fft_cpx_float32_t* ne10_fft_generate_twiddles_transposed_float32 (
* memory must be released when no more used.
* This function can be used with FFT lengths
* longer than the ones supported on Cortex-M
*
* With this function, FFT lengths can also contain
* factor 3 and 5 (but must be multiple of 4)
*
*/
arm_cfft_instance_f32 *arm_cfft_init_dynamic_f32(uint32_t fftLen)
{
Expand Down Expand Up @@ -517,6 +521,9 @@ arm_cfft_instance_f32 *arm_cfft_init_dynamic_f32(uint32_t fftLen)
* memory must be released when no more used.
* This function can be used with FFT lengths
* longer than the ones supported on Cortex-M
*
* With this function, FFT lengths can also contain
* factor 3 and 5 (but must be multiple of 4)
*/
arm_cfft_instance_q31 *arm_cfft_init_dynamic_q31(uint32_t fftLen)
{
Expand Down Expand Up @@ -613,6 +620,9 @@ arm_cfft_instance_q31 *arm_cfft_init_dynamic_q31(uint32_t fftLen)
* memory must be released when no more used.
* This function can be used with FFT lengths
* longer than the ones supported on Cortex-M
*
* With this function, FFT lengths can also contain
* factor 3 and 5 (but must be multiple of 4)
*/
arm_cfft_instance_q15 *arm_cfft_init_dynamic_q15(uint32_t fftLen)
{
Expand Down Expand Up @@ -834,6 +844,9 @@ static ne10_fft_cpx_float16_t* ne10_fft_generate_twiddles_transposed_float16 (
* memory must be released when no more used.
* This function can be used with FFT lengths
* longer than the ones supported on Cortex-M
*
* With this function, FFT lengths can also contain
* factor 3 and 5 (but must be multiple of 4)
*/
arm_cfft_instance_f16 *arm_cfft_init_dynamic_f16(uint32_t fftLen)
{
Expand Down Expand Up @@ -962,6 +975,7 @@ arm_cfft_instance_f16 *arm_cfft_init_dynamic_f16(uint32_t fftLen)
* memory must be released when no more used.
* This function can be used with RFFT lengths
* longer than the ones supported on Cortex-M
*
*/
arm_rfft_fast_instance_f16 *arm_rfft_fast_init_dynamic_f16 (uint32_t nfft)
{
Expand Down Expand Up @@ -1140,6 +1154,7 @@ arm_rfft_fast_instance_f16 *arm_rfft_fast_init_dynamic_f16 (uint32_t nfft)
* memory must be released when no more used.
* This function can be used with RFFT lengths
* longer than the ones supported on Cortex-M
*
*/
arm_rfft_fast_instance_f32 *arm_rfft_fast_init_dynamic_f32 (uint32_t nfft)
{
Expand Down Expand Up @@ -1317,6 +1332,7 @@ arm_rfft_fast_instance_f32 *arm_rfft_fast_init_dynamic_f32 (uint32_t nfft)
* memory must be released when no more used.
* This function can be used with RFFT lengths
* longer than the ones supported on Cortex-M
*
*/
arm_rfft_instance_q31 *arm_rfft_init_dynamic_q31(uint32_t nfft)
{
Expand Down Expand Up @@ -1428,6 +1444,7 @@ arm_rfft_fast_instance_f32 *arm_rfft_fast_init_dynamic_f32 (uint32_t nfft)
* memory must be released when no more used.
* This function can be used with RFFT lengths
* longer than the ones supported on Cortex-M
*
*/
arm_rfft_instance_q15 *arm_rfft_init_dynamic_q15(uint32_t nfft)
{
Expand Down

0 comments on commit e49e650

Please sign in to comment.