Document toolboxDocument toolbox

(8.D.2.7) MultiplierV2Fract32

Overview

Multi-purpose multiplier

Discussion

Multi-purpose multiplier module. For single channel inputs, all of the inputs will be multiplied together. For multichannel inputs, the ONECHANNELOUTPUT argument determines whether all of the channels in each input will be multiplied together (ONECHANNELOUTPUT=1), or whether a given channel in one input will be multiplied by the corresponding channel in another input (ONECHANNELOUTPUT=0). If oneChannelOutput is false and there are only 2 input pins and first input has only 1 channel, then all other channels are multiplied by the first input channel.

Type Definition

typedef struct _ModuleMultiplierV2Fract32 { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 multMode; // multMode=0 is a multi-input multiplier, multMode=1 is an AGC multiplier INT32 oneChannelOutput; // Boolean value that determines whether all channels are multiplied to form a single output. INT32 postShift; // Number of bits to shift } ModuleMultiplierV2Fract32Class;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

multMode

int

derived

0

1

Unrestricted

 

oneChannelOutput

int

const

0

0

Unrestricted

 

postShift

int

parameter

0

7

0:31

 

Pins

Input Pins

Name: in1

Description: Audio input

Data type: fract32

Channel range: Unrestricted

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real

 

Name: in2

Description: Audio input

Data type: fract32

Channel range: Unrestricted

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: Audio output

Data type: fract32

MATLAB Usage

File Name: multiplier_v2_fract32_module.m

M=multiplier_v2_fract32_module(NAME, NUMINPINS, ONECHANNELOUTPUT) Creates a multi-purpose multiplier module for use in the Audio Weaver Environment. Can also function as a multi-input multiplier or an AGC multiplier. Mode of operation is determined by the number of input pins/channels. Arguments: NAME - name of the module. NUMINPINS - number of input pins. ONECHANNELOUTPUT - Boolean value which determines if multi-channel input signals are collapsed to a single output channel.

Â