Versions Compared

Key

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

Overview

FIR filter

Discussion

The FIR Module implements a direct convolution N-order Finite Impulse Response filter. The module operates on multiple channels with all channels sharing the same set of filter coefficients. The filter coefficients are stored in the array, coeffs, in normal order. The size of the array is numTaps x 1. The state variable array is of size numTaps*numChannels.

...

On the processors of 2159x where 2 FIR accelerators are available with dual SHARC+ cores, two FIR accelerators are used which further reduces the processing load of multiple channels. Here the max FIRA channels = min(numChannels, 32*2). Please note that this module is not multi-core safe i.e. same module can not be used in Sharc1 and Sharc2 at the same time.

Type Definition

Code Block
typedef struct _ModuleFIR
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 numTaps;                                // Length of the filter.
    INT32 stateIndex;                             // Index of the oldest state variable in the array of state variables.
    FLOAT32* coeffs;                              // Filter coefficient array in normal order.
    FLOAT32* state;                               // State variable array. The size of the array equals stateLen * numChannels.
    void * hardware_specific_struct_pointer;      // This is the internal TCB array used for ADI FIR accelerator
} ModuleFIRClass;
Variables

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

numTaps

int

const

0

31

1:1:5000

samples

stateIndex

int

state

1

0

Unrestricted

coeffs

float*

parameter

0

[31 x 1]

Unrestricted

state

float*

state

1

[66 x 1]

Unrestricted

hardware_specific_struct_pointer

void *

state

1

Unrestricted

Pins

Input Pins

Name: in

Description: audio input

...

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: audio output

Data type: float

MATLAB Usage

File Name: fir_module.m

Code Block
 M=fir_module(NAME, L)
 Creates an FIR filter object for use in the Audio Weaver environment.
 The module has a single multichannel input pin.
 
 Arguments:
    NAME - name of the module.
    L - length of the filter (number of taps).

...