Declaration - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

2.30.2 Declaration

The available
MLIB_Mul
frac16_t MLIB_Mul_F16(frac16_t
frac16_t MLIB_Mul_F16as(acc32_t
frac32_t MLIB_Mul_F32ss(frac16_t
frac32_t MLIB_Mul_F32(frac32_t
acc32_t MLIB_Mul_A32(acc32_t
2.30.3 Function use
The use of the
MLIB_Mul
#include "mlib.h"
static
frac32_t
f32Result;
static
frac16_t
f32Mult1, f16Mult2;
void main(void)
{
f16Mult1 = FRAC16(0.4);
f16Mult2 = FRAC16(-0.2);
/* f32Result = f16Mult1 * f16Mult2 */
f32Result = MLIB_Mul_F32ss(f16Mult1, f16Mult2);
}
2.31 MLIB_MulSat
The
MLIB_MulSat
functions return the product of two multiplicands. The function
saturates the output. See the following equation:
2.31.1 Available versions
This function is available in the following versions:
Freescale Semiconductor, Inc.
functions have the following declarations:
f16Mult1,
frac16_t
a32Accum,
frac16_t
f16Mult1,
frac16_t
f32Mult1,
frac32_t
a32Mult1,
acc32_t
a32Mult1)
function is shown in the following example:
/* f16Mult1 = 0.4 */
/* f16Mult2 = -0.2 */
Equation 29. Algorithm formula
MLIB User's Guide, Rev. 2, 10/2015
Chapter 2 Algorithms in detail
f16Mult2)
f16Mult)
f16Mult2)
f32Mult2)
65

Advertisement

Table of Contents
loading

Table of Contents