Function Use - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

frac16_t MLIB_MsuSat_F16(frac16_t
frac32_t MLIB_MsuSat_F32lss(frac32_t
frac32_t MLIB_MsuSat_F32(frac32_t

2.23.3 Function use

The use of the
MLIB_MsuSat
#include "mlib.h"
static
frac32_t
f32Accum, f32Mult1, f32Mult2, f32Result;
void main(void)
{
f32Accum = FRAC32(0.9);
f32Mult1 = FRAC32(-1.0);
f32Mult2 = FRAC32(0.2);
/* f32Result = sat(f32Accum - f32Mult1 * f32Mult2) */
f32Result = MLIB_MsuSat_F32(f32Accum, f32Mult1, f32Mult2);
}
2.24 MLIB_MsuRnd
The
MLIB_MsuRnd
subtracted from the input accumulator. The round method is the round to nearest. The
function does not saturate the output. See the following equation:
2.24.1 Available versions
This function is available in the following versions:
• Fractional output - the output is the fractional portion of the result; the result is
within the range <-1 ; 1). The result may overflow.
• Accumulator output with mixed inputs - the output is the accumulator type, where
the result can be out of the range <-1 ; 1). The accumulator is the accumulator type,
the multiplicands are the fractional types. The result may overflow.
Freescale Semiconductor, Inc.
f16Accum,
f32Accum,
f32Accum,
function is shown in the following example:
/* f32Accum = 0.9 */
/* f32Mult1 = -1.0 */
/* f32Mult2 = 0.2 */
functions return the rounded fractional product of two multiplicands
Equation 22. Algorithm formula
MLIB User's Guide, Rev. 2, 10/2015
frac16_t
f16Mult1,
frac16_t
frac16_t
f16Mult1,
frac32_t
f32Mult1,
frac32_t
Chapter 2 Algorithms in detail
f16Mult2)
frac16_t
f16Mult2)
f32Mult2)
55

Advertisement

Table of Contents
loading

Table of Contents