Mlib_Msu4Sat; Declaration - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

The available versions of the
Function name
MLIB_Msu4_F32ssss
frac16_t

2.26.2 Declaration

The available
MLIB_Msu4
frac32_t MLIB_Msu4_F32ssss(frac16_t
frac16_t
f16SubMult2)
2.26.3 Function use
The use of the
MLIB_Msu4
#include "mlib.h"
static
frac32_t
f32Result;
static
frac16_t
f16MinMult1, f16MinMult2, f16SubMult1, f16SubMult2;
void main(void)
{
f16MinMult1 = FRAC16(0.2);
f16MinMult2 = FRAC16(-0.7);
f16SubMult1 = FRAC16(0.3);
f16SubMult2 = FRAC16(-0.25);
/* f32Result = f16MinMult1 * f16MinMult2 - f16SubMult1 * f16SubMult2 */
f32Result = MLIB_Msu4_F32ssss(f16MinMult1, f16MinMult2, f16SubMult1, f16SubMult2);
}

2.27 MLIB_Msu4Sat

The
MLIB_Msu4Sat
multiplicands. The function saturates the output. See the following equation:
Freescale Semiconductor, Inc.
MLIB_Msu4
Table 2-26. Function versions
Input type
Minuend product
Subtrahend product
Mult. 1
Mult. 2
Mult. 1
frac16_t
frac16_t
functions have the following declarations:
f16MinMult1,
function is shown in the following example:
/* f16MinMult1 = 0.2 */
/* f16MinMult2 = -0.7 */
/* f16SubMult1 = 0.3 */
/* f16SubMult2 = -0.25 */
functions return the subtraction of the products of two
MLIB User's Guide, Rev. 2, 10/2015
function are shown in the following table.
Result
type
Mult. 2
frac16_t
frac32_t
frac16_t
f16MinMult2,
Chapter 2 Algorithms in detail
Description
Subtraction of two 32-bit
fractional products (of two 16-bit
fractional multiplicands). The
output is within the range <-1 ;
1).
frac16_t
f16SubMult1,
59

Advertisement

Table of Contents
loading

Table of Contents