Logic Compare N Int32
Overview
General logical comparison module (multichan)
Discussion
This module computes logical comparison operations using two input values. If the result of the evaluation is true, a one (1) will be written at the corresponding output wire, otherwise a zero (0).
The module is controlled via the compareConfig array. The array size is "numComps" x 3 and there is a single row devoted to each operation.
Column 1 contains the channel index of the first input argument (zero-based). Column 2 contains the channel index of the second input argument (zero-based). Column 3 specifies which compare operation should be performed (compare type) as an integer in the range from 0 to 7.
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 (>=).
compareType = 6, constant output = 1.
compareType = 7, constant output = 0.
This module supports only control data of block size = 1.
Module Pack
awe-mod-dspc-snd
ClassID
classID = 41823
Type Definition
typedef struct _ModuleLogicCompareNInt32
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 numComps; // Number of operations to be computed
INT32* compareConfig; // Column 1 and 2: Channel index, Column 3: EQUAL=0, NOTEQUAL=1, LESSTHAN=2, LESSOREQUAL=3, GREATERTHAN=4, GREATEROREQUAL=5, CONST 1=6, CONST 0=7. Selects the type of comparison that is implemented by the module (one per row).
} ModuleLogicCompareNInt32Class;
Variables
Properties
| Name | Type | Usage | isHidden | Default Value | Range | Units |
|---|---|---|---|---|---|---|
| numComps | int | const | 0 | 1 | Unrestricted | |
| compareConfig | int* | parameter | 0 | [1 x 3] | Unrestricted |
Pins
Input Pins
| Name | in |
| Description | Control input |
| Data type | int |
| Channel range | Unrestricted |
| Block size range | 1 |
| Sample rate range | Unrestricted |
| Complex support | Real |
Output Pins
| Name | out |
| Description | Control output |
| Data Type | int |
Matlab Usage
File Name: logic_comparen_int_module.m
Creates a module that implements a number of standard logical comparison
operations on a block-by-block basis. The second argument specifies how
many operations are performed. The module has one input pin with an arbitrary
number of interleaved channels and one output pin with a number of channels
equaling the number of compare operations.
Arguments:
NAME - name of the module.
NUMCMPS - number of operations to compute. By default 5.
Copyright 2022 DSP Concepts, Inc. All Rights Reserved.
AudioWeaverModule [This tag makes it appear under awe_help]
Copyright (c) 2026 DSP Concepts, Inc.