Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Scroll Documents: Update page title prefix

Overview

Arithmetic shift of integer or fractional data

Discussion

Computes the arithmetic shift of a multichannel signal. The module supports fractional, and integer signals. numBits specifies the number of bit(between -31 and +31) positions to be shifted. If numBits is positive, left shift will be performed. If numBits is negative, right shift will be performed. Values outside of the allowable range are clipped. Negative values are sign extended when shifted left.

Type Definition

Code Block
typedef struct _ModuleShiftFract32
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 numBits;                                // Integer value that specifies the number of bits to shift the input.
} ModuleShiftFract32Class;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

numBits

int

parameter

0

0

-31:31

Pins

Input Pins

Name: in

Description: Input signal

...

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: Output signal

Data type: fract32

MATLAB Usage

File Name: shift_fract32_module.m

...