AnsweredAssumed Answered

I am not able to implement a FIR filter > 2000coeficients.

Question asked by BlackBeauty on May 21, 2013
Latest reply on Jul 15, 2013 by BlackBeauty

Hello,

 

I have moved to CCS (Crosscore/Eclipse platform) from VisualDSP (which i had the same problem), and I am still not able to implement large FIR filters with 4000 coeffients or so. (the largest one I can use is around 2000). If it helps, my trying FIR coefficients are set to be a LOWPASSFILTER@4KHZ, SAMPLERATE@48KHz. When the filter does not work (with large number of coefficients) it is like if had the cut frecuency@ 2KHz(instead of 4K) and many noise and artefacts. Also latency gets crazy (double of it should have), this is in release mode. Debug mode is even worse. I attached some pictures.

Please find attached my Crosscore proyect, where you can find a proyect similar to Thru Audio I2S example PLUS my FIR.h (coefficients) and FIR.c (routine) files. FIR routine is called from ProcessAudio file.

 

At fir.h there are various FIR coeffient arrays, 255, 1024, 2047 and 4095. Now 4095 is selected, others are commented (not used). If you want to simulate this project with the others arrays (255, 1024 or 2047coeffs that work), uncomment the one you one to select and comment the current one. Do not forget to define NTAPS regarding the coefficients array selected at the top of the file.

 

I have checked the app.ldf file and the memory block1 is defined by default from 0x000B2000  to 0x000BDFFF. I have checked the memory browser and I think that both FIR buffer and FIR coefficient arrays do not overlap each other or overflow the memory neither. From my point of view there are about 45000 32bit memory positions in this stack (from 0x000B2000  to 0x000BDFFF). So there is enough margin to work with these array sizes. (I expect later to have 8 large FIR filters for each analog output).

 

Coefficients are located globally, i used pointers in local functions to access the arrays as you can see in the code. If there is something wrong in it, I would appreciate your advices.

 

I am using now latest CCS version and a ADZS21489EZLITE board.

 

Last request: how can I choose to store any variable in any memory block in C?? For instance to store the coeffient  buffers in block 1, while FIRbuffers in block 2 or so. I have read that having large arrays in different memory locations address generators works better. Also there is a tool in VisualDSP to watch how memory blocks are used (memory and variable addresses, and which variables are stores in. There is the same in Crosscore??. using debugging i can use the memory browser, but only the addresses, not the variable name. There is an option in VisualDSP wheew i can see all the blocks, but i do not know in CCS.

 

Sorry for this long email, but i want to make sure you understand my doubts. I need to solve this in order to keep on working in my project.

 

Best regards y thanks so much in advance.

 

Carlos 

 

Outcomes