21.07.2015 Views

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

hilb16dbuffer[nh + 2] Pointer to delay buffer of length nh = nh + 2In the case of multiple-buffering schemes, thisarray should be initialized to 0 for the first filterblock only. Between consecutive blocks, the delaybuffer preserves the previous r output elementsneeded.The first element in this array is special in that itcontains the array index-1 of the oldest input entryin the delay buffer. This is needed for multiplebufferingschemes, and should be initialized tozero (like all the other array entries) for the firstblock only.nxnhoflagNumber of real elements in vector x (input samples)The number of coefficients of the filter. For exampleif the filter coefficients are {h0, h1, h2, h3, h4, h5},then nh = 6. Must be a minimum value of 6. Forsmaller filters, zero pad the coefficients to meet theminimum value.Overflow error flag (returned value) If oflag = 1, a 32-bit data overflow occurred in anintermediate or final result.If oflag = 0, a 32-bit overflow has not occurred.DescriptionComputes a real FIR filter (direct-form) using the coefficients stored in vectorh. The real input data is stored in vector x. The filter output result is stored invector r. This function maintains the array dbuffer containing the previousdelayed input values to allow consecutive processing of input data blocks. Thisfunction can be used for both block-by-block (nx >= 2) and sample-by-samplefiltering (nx = 1). In place computation (r = x) is allowed.Algorithmnh1r[j] h[k]x[j k]k00 j nxOverflow Handling MethodologyNo scaling implemented for overflow prevention.Special RequirementsEvery odd valued filter coefficient has to be 0. This is a requirement for theHilbert transformer. For example, a 6 tap filter may look like this: H = [0.8670 –0.324 0 –0.002 0]Always pad 0 to make nh as a even number. For example, a 5 tap filter witha zero pad may look like this: H = [0.867 0 –0.324 0 –0.002 0]Function Descriptions4-51

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!