Mlib_Msu; Available Versions; Function Use - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

MLIB_Msu

2.21.3 Function use

The use of the
MLIB_Mac4RndSat
#include "mlib.h"
static
frac32_t
f32Result, f32Add1Mult1, f32Add1Mult2, f32Add2Mult1, f32Add2Mult2;
void main(void)
{
f32Add1Mult1 = FRAC32(-1.0);
f32Add1Mult2 = FRAC32(-0.9);
f32Add2Mult1 = FRAC32(0.8);
f32Add2Mult2 = FRAC32(0.7);
/* f32Result = sat(round(f32Add1Mult1 * f32Add1Mult2 + f32Add2Mult1 * f32Add2Mult2))*/
f32Result = MLIB_Mac4RndSat_F32(f32Add1Mult1, f32Add1Mult2, f32Add2Mult1, f32Add2Mult2);
}
2.22 MLIB_Msu
The
MLIB_Msu
functions return the fractional product of two multiplicands subtracted
from the input accumulator. The function does not saturate the output. See the following
equation:

2.22.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.
52
function is shown in the following example:
/* f32Add1Mult1 = -1.0 */
/* f32Add1Mult2 = -0.9 */
/* f32Add2Mult1 = 0.8 */
/* f32Add2Mult2 = 0.7 */
Equation 20. Algorithm formula
MLIB User's Guide, Rev. 2, 10/2015
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents