Mlib_Msu4; Available Versions; Declaration; Function Use - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

MLIB_Msu4

2.25.2 Declaration

The available
MLIB_MsuRndSat
frac16_t MLIB_MsuRndSat_F16(frac16_t
frac32_t MLIB_MsuRndSat_F32lls(frac32_t
frac32_t MLIB_MsuRndSat_F32(frac32_t

2.25.3 Function use

The use of the
MLIB_MsuRndSat
#include "mlib.h"
static
frac32_t
f32Accum, f32Mult1, f32Mult2, f32Result;
void main(void)
{
f32Accum = FRAC32(0.3);
f32Mult1 = FRAC32(0.1);
f32Mult2 = FRAC32(-0.2);
/* f32Result = sat(round(f32Accum - f32Mult1 * f32Mult2)) */
f32Result = MLIB_MsuRndSat_F32(f32Accum, f32Mult1, f32Mult2);
}
2.26 MLIB_Msu4
The
MLIB_Msu4
functions return the subtraction of the products of two multiplicands.
The function does not saturate the output. See the following equation:

2.26.1 Available versions

The 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.
58
functions have the following declarations:
f16Accum,
frac16_t
f32Accum,
frac32_t
f32Accum,
frac32_t
function is shown in the following example:
/* f32Accum = 0.3 */
/* f32Mult1 = 0.1 */
/* f32Mult2 = -0.2 */
Equation 24. Algorithm formula
MLIB User's Guide, Rev. 2, 10/2015
f16Mult1,
frac16_t
f16Mult2)
f32Mult1,
frac16_t
f32Mult1,
frac32_t
f32Mult2)
Freescale Semiconductor, Inc.
f16Mult2)

Advertisement

Table of Contents
loading

Table of Contents