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.

How <strong>DSP</strong>LIB Deals with Overflow and Scaling IssuesNo scaling implemented for overflow prevention: In this type of function,<strong>DSP</strong>LIB does not scale to prevent overflow due to the potentiallystrong effect in data output precision or in the number of cycles required.This is the case, for example, of the MAC-based operations like filtering,correlation, or convolutions. The best solution on those cases is to designyour system , for example your filter coefficients with a gain less than 1 toprevent overflow. In this case, overflow could happen unless you inputscale or you design for no overflow.Saturation implemented for overflow handling: In this type of function,<strong>DSP</strong>LIB has enabled the <strong>TMS320C55x</strong> 32-bit saturation mode (SATDbit = 1). This is the case of certain basic math functions that require thesaturation mode to be enabled.Not applicable: In this type of function, due to the nature of the functionoperations, there is no overflow.<strong>DSP</strong>LIB reporting of overflow conditions (overflow flag): Due to thesometimes unpredictible overflow risk, most <strong>DSP</strong>LIB functions have beenwritten to return an overflow flag (oflag) as an indication of a potentiallydangerous 32-bit overflow. However, because of the guard-bits, the C55xis capable of handling intermediate 32-bit overflows and still produce thecorrect final result. Therefore, the oflag parameter should be taken in thecontext of a warning but not a definitive error.As a final note, <strong>DSP</strong>LIB is provided also in source format to allow customizationof <strong>DSP</strong>LIB functions to your specific system needs.Using <strong>DSP</strong>LIB3-7

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

Saved successfully!

Ooh no, something went wrong!