Reply by Brian C. Lane April 26, 20052005-04-26
Juliano Yuji Sugawara wrote:

> Hello Everyone!
>
> I'm working on DSP, TMS320C5402 specifically, and I'm newbie on this
> subject...
>
> I need to implement a realtime IIR filter on DSP... can I use DSPLib
> to realtime process the samples?
>
> If so, why does the input (x[nx]) variable is an array? Once it uses
> the Direct Form 2, it does not need past inputs. The same for output
> variable (r[nx])... Can I just set nx to '1'???
>
> Another thing... on documentation SPRU518D, it calls sample-by-sample
> filtering = (nx = 1)... does that mean realtime processing? then
> block-by-block is when you process the samples stored in a pc file
> for instance?
>

Generally speaking there are 2 schools of though on processing samples.
There's the 'sample-by-sample' method where you process them as they
come in. The other is the block method where you receive a block (eg.
from a CODEC DMA transfer) and then run the filter on the block.

The second method ends up being much more efficient since you have less
overhead per-sample when calling processing routines.

I don't use DSPlib, so I'm not much help there, but I would expect that
setting the length to 1 would work in your case (assuming processing
things one sample at a time).

Brian

--
-----------------
Brian C. Lane (W7BCL) Programmer
www.shinemicro.com RF, DSP & Microcontroller Design


Reply by Juliano Yuji Sugawara April 26, 20052005-04-26
Hello Everyone!
 
I'm working on DSP, TMS320C5402 specifically, and I'm newbie on this subject...
 
I need to implement a realtime IIR filter on DSP... can I use DSPLib to realtime process the samples?
 
If so, why does the input (x[nx]) variable is an array? Once it uses the Direct Form 2, it does not need past inputs. The same for output variable (r[nx])... Can I just set nx to '1'???
 
Another thing... on documentation SPRU518D, it calls sample-by-sample filtering = (nx = 1)... does that mean realtime processing? then block-by-block is when you process the samples stored in a pc file for instance?
 
If someone has an example of working IIR realtime filtering code, could please send to me??? :) I'd appreciate a LOT!!!
 
Thanks for everyone and have a nice day!!!
 
Juliano