showing data memory full after calling fir filter function for 4k samples
I am using adsp-21368 platform with vdsp++5.0 envirinment , after calling fir function for 4k data , msg diplaying full memory !!
my simple fir example ........
fir
#include <filter.h>
#define TAPS 60
float x[4000], y[4000];
float pm coeffs[TAPS]; /* coeffs array must be */
/* initialized and in PM memory */
float state[TAPS+1];
int i;
for (i = 0; i < TAPS+1; i++)
state[i] = 0; /* initialize state array */
fir
fir (x, y, coeffs, state, 4000, TAPS);
/* y holds the filtered output */
Here two array x[4000] and y[4000] , is it possible to make single array whose input replace with output ?
so i can make filtering of 4000 samples !!
Ashok Majee
Audio Signal Processors
adsp-21368
SHARC Audio Processors/SoCs
Hi,
I took the example code you have provided above - which I assume is based on the example in the SHARC Run-Time Libraries manual, and added a main function so it would run as a standalone project as follows:
#include<filter.h>
#define TAPS 60
float x[4000], y[4000];
float pmcoeffs[TAPS]; /* coeffs array must be */
/* initialized and in PM memory */
int main( void )
{
float state[TAPS+1];
inti;
for(i = 0; i < TAPS+1; i++)
state[i] = 0; /* initialize state array */
fir (x, y, coeffs, state, 4000, TAPS);
/* y holds the filtered output */
return 0;
}
I did not see any out of memory errors, or unexpected behaviour, so could you clarify exactly what problems you are seeing. For example, is the message you see a linker error (possibly li1040), or is the error issued during run time, etc. Also specify which update of VisualDSP++ 5.0 you are using (e.g. Update 6). Note that the 21368 LDF specifies 16K words of memory in seg_dmda, so these two large buffers fit comfortably within this section based on this small example, however as part of a larger example you may find it necessary to make use of external memory, if possible.
Please log in to reply.