Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).
Post a new Thread
64x dsplib Fir - apap...@optonline.net - Dec 9 15:19:00 2005
Without seeing your code I cannot know for sure, but I had a similar issue and after
looking through teir code realized that the 64x dsplib Fir function uses the input vector for
new samples AND previous samples, delay buffer, so YOU must manage the delay buffer after each
call to the FIR function.
This is different from the 54x dsplib fir functions that had an additional input argument
specifically for a delay buffer and it handled the moving of samples.
I'll give you an example of what I ended up doing for a 64 tap FIR using DSP_fir_gen, even with
the two memcpy's it's far more efficient than doing an FIR in C with -o3 on the 6412:
//pSampbuf = pointer to 16 new input samples
#define NUM_SAMPLES 16
#define FIRTAPS 64
// Fir input AND delay buffer
short fir_indb[NUM_SAMPLES+FIRTAPS-1];
// Fir coefficients
short fir_coeff[FIRTAPS]; // Coeffs set at runtime
// New samples must be last in buffer
memcpy( &fir_indb[FIRTAPS-1], pSampbuf, NUM_SAMPLES*sizeof(short) );
// Perform FIR
DSP_fir_gen(fir_indb, fir_coeff, pSampbuf, FIRTAPS, NUM_SAMPLES);
// pSampbuf now contains 16 FIR new output samples
// Shift Delay buffer Samples from bottom to top
memcpy( &fir_indb[0], &fir_indb[NUM_SAMPLES], (FIRTAPS-1)*sizeof(short) );
Hope this helps,
Ten

(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )