Other Parts Discussed in Thread: FFTLIB
Tool/software:
Hello TI team,
I am working with both FFTLIB and DSPLIB kernels on C7x and I noticed a difference in how the parameter blocks (`pBlock`) are handled:
* In DSPLIB FIR kernels (e.g. `DSPLIB_fir_ci.cpp`), the `InitArgs` struct contains the `pBlock`, and memory for it is allocated dynamically (via `getSize()` + `malloc`). This works fine and the kernel executes without issues.
* In FFTLIB, however, the examples always declare the `pBlock` in the `.pinit` section, e.g.:
```c
#pragma DATA_SECTION(FFTLIB_fft1d_i32f_c32fc_o32fc_pBlock, ".pinit")
uint8_t FFTLIB_fft1d_i32f_c32fc_o32fc_pBlock[FFTLIB_FFT1D_I32F_C32FC_O32FC_PBLOCK_SIZE];
```
If I try to allocate the `pBlock` dynamically using `malloc` (with 128B alignment, same L2SRAM region), the kernel either freezes or crashes. Only the `.pinit` placement works.
---
My questions:
1. Why does FFTLIB require the `pBlock` to be placed in `.pinit` specifically?
2. Is this due to a hardware Streaming Engine (SE/SA) requirement, or a convention enforced by the FFTLIB kernel implementation?
3. Is there any safe way to manage multiple FFT instances (each with its own pBlock) using malloc-allocated buffers, or is `.pinit` mandatory?
Understanding this difference will help us design our memory allocation strategy (we plan to manage multiple FFT/IFFT channels, potentially by copying local pBlocks into a shared global `.pinit` block before execution).
Regards,
Hendry Newman