DSPRelated.com
Forums

FIR on TI TMS320C6713 dsk, help

Started by Glidden Martin April 21, 2005

Hi,
I'm trying to implement a FIR filter on a TI C6713 board to filter an
input music signal but all I get is static. If I quantize the sum I can here
some music so there could be some overflow Can
somebody help?? The coefficents are in 16bit fixed point format.

Thanks
-Glidden

The input samples come in a block of 80 (size). The output sample go out a
block of 80. The filter order is 128(N).

Code looks like
/% Initilaize the variables the first time */
if(first_time) {
for(i=0; i<N; i++) {
tmp[i] = 0;
}
for(i=0; i<(N+size); i++) {
outtmp[i] = 0;
}
first_time = 0;
}

/% Quantize the input
for(i=0; i< size; i++)
intmp[i] = src[i] >> 8;

for (i = 0; i < N; i++) {
sum = tmp[i];
for(j=0; j<size; j++)
{
sum = sum + (intmp[i+j] *h[i]);
}
outtmp[i] = sum;
}

/*Backup the residual values of outtmp*/
j=0;
for(i=N; i<(N+size); i++)
{
tmp[j] = outtmp[i];
j++;
}

/* Transfer outtmp to dst */
for(i=0; i<size; i++) {
dst[i] = outtmp[i];
}