/***************************************************************** * fir_fixpt_dsplib.c - C program for FIR filtering using DSPLIB * in Section 6.6.7 ****************************************************************** * System configuration: * * * in(n) |----------------| out(n) * ---->| Bandpass filter|-----> * |----------------| * ****************************************************************** * System simulation configuration: * * in_buffer is used to store the input data * out_buffer is used to store the output filtered data * *****************************************************************/ #include "math.h" #include "tms320.h" #include "dsplib.h" #include "input.h" // input signal file #include "coeff_ccs_16int_lib.h" short i; DATA *dbptr = &db[0]; ushort oflag; #pragma DATA_SECTION(NUM,".coeffs") void main(void) { asm(" STM #0, SWWSR"); /* clear */ for (i=0; i= 4) { fir(x,NUM,r,&dbptr,NL,NX/4); fir(&x[NX/4],NUM,&r[NX/4],&dbptr,NL,NX/4); fir(&x[NX/2],NUM,&r[NX/2],&dbptr,NL,NX/4); fir(&x[(3*NX)/4],NUM,&r[(3*NX)/4],&dbptr,NL,NX/4); } */ /* (iii) sample mode */ /*for (i=0; i