Sergio Lopez Posted April 8 Share Posted April 8 Hello, i'm doing some modifications to theĀ Audio DMA Project, i'm using the Zybo Z7-20 with Vitis and Vivado 2023.2 version. In the last topic i had a problem while reading the audio data from the memory which i have solved using pointers with the correct memory direction and the byte lenght of each data. Now, i want to process this data using the FFT algorithm. //FFT Algorithm void fft(Complex data[], int n) { if (n <= 1) return; // Separate even and odd elements Complex even[n/2], odd[n/2]; for (int i = 0; i < n/2; ++i) { even[i] = data[2*i]; odd[i] = data[2*i + 1]; } // Recursive FFT for even and odd parts fft(even, n/2); fft(odd, n/2); // Combine results of even and odd parts for (int k = 0; k < n/2; ++k) { float theta = -2 * PI * k / n; Complex t = {cosf(theta), sinf(theta)}; t.i1 *= odd[k].i1; t.i2 *= odd[k].i2; data[k].i1 = even[k].i1 + t.i1; data[k].i2 = even[k].i2 + t.i2; data[k + n/2].i1 = even[k].i1 - t.i1; data[k + n/2].i2 = even[k].i2 - t.i2; } } The problem i have is that i only can realize the FFT to 1024 samples which i believe it's a low number of samples considering the performance of the board. When i try to put more than this quantity i get nule values in the exit like the memory capacity runs out. I believe that the problem is not the memory capacity if not the data storage in the memory because this board has a 1GB RAM enough for the audio and FFT data. How can i increase the number of samples of the FFT? Link to comment Share on other sites More sharing options...
artvvb Posted April 8 Share Posted April 8 Hi @Sergio Lopez 8 hours ago, Sergio Lopez said: In the last topic i had a problem while reading the audio data from the memory which i have solved using pointers with the correct memory direction and the byte lenght of each data. How are you allocating buffers? If using something like malloc, you can increase the amount of memory available to the stack and heap in the linker script (lscript.ld). If you're using the predefined memory base address the demo uses, could you describe the errors you're running into? Thanks, Arthur Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now