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.

firdecr[nx/D]dbuffer[nh+1]nxnhDoflagPointer to real input vector of nx/D real elements.In-place computation (r = x) is allowedDelay buffer In the case of multiple-buffering schemes, this arrayshould be initialized to 0 for the first block only. Betweenconsecutive blocks, the delay buffer preservesprevious delayed input samples. It also preserves aptr to the next new entry into the dbuffer. This ptr ispreserved across function calls in dbuffer[0].Memory alignment: this is a circular buffer and muststart in a k-bit boundary(that is, the k LSBs of the startingaddress must be zeros) where k = log2 (nh).Number of real elements in vector xNumber of coefficientsDecimation factor. For example a D = 2 means you dropevery other sample. Ideally, nx should be a multiple ofD. If not, the trailing samples will be lost in the process.Overflow error flag If oflag = 1, a 32-bit data overflow occurred in an intermediateor final result.If oflag = 0, a 32-bit overflow has not occurred.DescriptionComputes a decimating real FIR filter (direct-form) using coefficient stored invector h. The real data input is stored in vector x. The filter output result isstored in vector r. This function retains the address of the delay filter memoryd containing the previous delayed values to allow consecutive processing ofblocks. This function can be used for both block-by-block and sample-bysamplefiltering (nx = 1).Algorithmr[j] nhk0h[k]x[j * D k]0 j nxOverflow Handling MethodologyNo scaling implemented for overflow prevention.Special Requirements noneImplementation Notes noneExampleSee examples/decim subdirectoryFunction Descriptions4-41

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

Saved successfully!

Ooh no, something went wrong!