AnsweredAssumed Answered

Delaying a signal in SHARC 21369

Question asked by Monsen on Oct 3, 2012
Latest reply on Oct 9, 2012 by Harshit.Gaharwar

Hi there,


I am using a SHARC 21369 Ez-Kit to realize a set of filters, as a part of my final thesis in electrical engineering. Unfortunately, I am still a novice to DSP programming. I have messed around with a Blackfin, but the SHARC is new to me.


The filters is for a digital 2-way crossover for a woofer and speakers. The input and output signals to the SHARC will eventually be in the i2s format, to some custom hardware. The crossover frequency should be around 50 Hz, so the low pass filter will be quite narrow. The sample-rate of the system is 48 kHz.

The requirement for the filters are quite harsh. +-0.1 dB ripple in the passband, minimum -60 dB in the stopband and a linear phase. These requirements make it almost impossible to implement the filter with a standard FIR, as the length of the filter would be enormous.

So, to implement this i figured i should use multi-rate sampling, so i wouldn't end up with a very long FIR filter, as IIR is out of the question due to the phase requirement. So, i should decimate the full band signal to a fraction of the original Fs, filter the full band signal with a FIR filter which meets the above requirements and, the interpolate the low pass filtered signal to the original Fs. This process will delay the signal with, lets say 'n' samples.

So, I would then like to take the original full band signal and delay it 'n' times, so that the low pass filtered signal and the full band signal is 'time' synchronized. If i then subtract the low pass filtered signal from the full band signal , sample by sample, I would get the remaining high pass filtered signal - and i would have my full crossover filter.

The above could be shown as the block diagram below (Made in simulink):


Billede indsat i tekst 3


The filter processing is done block wise in blocks of 1024 samples using DMA.

I am using the 'Block Based TalkThru (C)' from the examples folder.


The filtering and decimation/interpolation can be done in a relatively standard way with methods from the runtime library.

So my question is, which opportunities are there to implement the delay of the full band signal?

I am thinking circular buffer in the external SDRAM, but I am not sure the read/writes will be fast enough for the real time computations?


The delay of the filters with decimation/interpolation is given by: delay = (N_dec-1)/2 + ((N_fir-1)/2)*M + (N_int-1)/2, if M=L is the decimation-/interpolationfaktors. The delay will be quite long if N_fir is large. Which it will be. So I don't think i could place the delay buffer in the internal memory.


If I could get any thoughts on this, I would be grateful.


Best regards,