Hi, I'm a beginner DSP developer and I'm currently working on some basic filtering applications using the Beagleboard. I've managed to build and install dsplink, bios, codec engine, lpm. I've also verified that all the basic example programs work. I'm currently trying to use the LOOP example and instead of having the DSP loop data back to the GPP i'm trying to have receive a buffer of data from the GPP, convolve the buffer with itself and return the convolution result to the GPP. The main lines of code I've added are
#define MAX_SIZE 256
#define ARRAY_SIZE 128
Short buffLocal[MAX_SIZE]
Short buffLocal2[MAX_SIZE
memset(buffLocal, 0, sizeof(short)*MAX_SIZE)
memset(buffLocal2, 0, sizeof(short)*MAX_SIZE)
For some reason if MAX_SIZE is larger than 202 the program crashes after the GPP sends the data to the DSP and is awaiting to reclaim the data/channel from the DSP. The message i get is
"DSP MMU Error Fault! MMU_IRQSTATUS = [0x10]"
However, this error is not always logged in my serial output window so I haven't been able to write down the interrupt numberI've been doing some readings on the the dsplink/dsp memory allocation but I can't seem to wrap my head around what I need to do to make sure that I have enough memory, I'm assuming that the DSP is running out of memory. I followed the following steps for installing and setting up dsp link
http://ossie.wireless.vt.edu/trac/wiki/BeagleBoard_CodecEngine
the website indicates that by setting mem=80M that I have 48M for DSPLINK.
I know that the channel construct uses Char8, so I'm selecting the channel size as 2048 and I'm making sure that MAX_SIZE*sizeof(short) < 2048, where sizeof(short) = 2 bytes. Also MAX_SIZE is the size of the arrays and ARRAY_SIZE is the number of elements physically in the array. The convolution code is also simple enough
convolution(buffLocal2, ARRAY_SIZE, buffLocal2, ARRAY_SIZE, buffLocal);
int convolution(bufferType* in1, int length1, bufferType* in2, int length2, bufferType* out)
{
int i=0,j=0;
//#pragma MUST_ITERATE(2,2)
for (i=0; i < length1+length2-1; i++)
{
//#pragma MUST_ITERATE(2,2)
for (j=0; j<length1; j++)
{
if (i-j >= 0)
{
//if (i==0)
out[i] = out[i] + in1[j]*in2[i-j];
//out[j]=in2[j];
//printf("i=%d j=%d i=j=%d\n", i, j, i-j);
}
}
}
return 1;
}
Thanks. I would appreciate any help/insight I can get