(8.D.2.7) LogicCompare
Overview
General logical comparison module
Discussion
This module implements a general purpose logical comparison module that is capable of realizing many different comparison functions. The behavior of the logic compare is controlled by the compareType parameter. compareType is an integer in the range from 0 to 5 inclusive.
The following list discusses the various compare operations types,.
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 _ModuleLogicCompare
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 compareType; // Selects the type of comparison that is implemented by the module: EQUAL=0, NOTEQUAL=1, LESSTHAN=2, LESSOREQUAL=3, GREATERTHAN=4, GREATEROREQUAL=5
} ModuleLogicCompareClass;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
compareType | int | parameter | 0 | 0 | 0:5 | Â |
Pins
Input Pins
Name: in1
Description: Audio input 1
Data type: float
Channel range: Unrestricted
Block size range: Unrestricted
Sample rate range: Unrestricted
Complex support: Real
Â
Name: in2
Description: Audio input 2
Data type: float
Channel range: Unrestricted
Block size range: Unrestricted
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: Logical output
Data type: int
MATLAB Usage
File Name: logic_compare_module.m
M=logic_compare_module(NAME)
Creates a general purpose comparison module that implements a number
of standard logical operations. The module has two input pins, each
with an arbitrary number of interleaved channels. The module performs
the comparison on a sample-by-sample basis.
Arguments:
NAME - name of the module.
Â