Document toolboxDocument toolbox

(8.D.2.7) LogicCompareConstFract32

Overview

Compares fract32 values against a constant parameter value

Discussion

This module implements a general purpose logical compare module that is capable of realizing many different logic operations. The behavior of the logic compare is controlled by the compareType parameter. filterType is an integer in the range from 0 to 5 inclusive. The following list discusses the various compare oprations types and which variables are active in each case. compareType = 0, performs logic equal operation.

compareType = 1, performs logic not equal operation.

compareType = 2, performs logic lessthan operation.

compareType = 3, performs logic lessthan equal operation.

compareType = 4, performs logic greaterthan operation.

compareType = 5, performs logic greaterthan equal operation.

Type Definition

typedef struct _ModuleLogicCompareConstFract32 { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 compareType; // Selects the type of compare that is implemented by the module: Equal=0 NotEqual=1 lessThan=2 LessOrEqual=3 greaterThan=4 GreaterOrEqual=5 fract32 const_value; // Selects value against to perform compare operations } ModuleLogicCompareConstFract32Class;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

compareType

int

parameter

0

0

0:5

 

const_value

fract32

parameter

0

0

Unrestricted

 

Pins

Input Pins

Name: in

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: int

MATLAB Usage

File Name: logic_compare_const_fract32_module.m

M=logic_compare_const_fract32_module(NAME) Creates a general purpose compare module that implements a number of standard logical operations. The module operates on multiple interleaved channels, with all channels being processed. Arguments: NAME - name of the module. The module has the following variables that control the design: compareType - integer specifying the type of the design (details below). The argument compareType determines what design routine is run, and not all input arguments are used in all cases: 0 = performs logical equal operation 1 = performs logical not equal operation 2 = performs logical less than operation 3 = performs logical less than equal operation 4 = performs logical greater operation 5 = performs logical greater than equal operation

Â