C62x Symmetric Real FIR - Filter real input signal using FIR filter

Library

C62x DSP Library — Filtering

Description

The Symmetric Real FIR block filters a real input signal using a symmetric real FIR filter. This filter is implemented using a direct form structure.

The number of input samples per channel must be even. The filter coefficients are specified by a real vector H, which must be symmetric about its middle element. The number of coefficients must be of the form 16k + 1, where k is a positive integer. This block wraps overflows that occur. The input, coefficients, and output are 16-bit signed fixed-point data types.

Intermediate multiplies and accumulates performed by this filter result in a 32-bit accumulator value. However, the Symmetric Real FIR block only outputs 16 bits. You can choose to output 16 bits of the accumulator value in one of the following ways.

Match input x

Output 16 bits of the accumulator value such that the output has the same number of fractional bits as the input

Match coefficients h

Output 16 bits of the accumulator value such that the output has the same number of fractional bits as the coefficients

Match high 16 bits of acc.

Output bits 31 - 16 of the accumulator value

Match high 16 bits of prod.

Output bits 30 - 15 of the accumulator value

User-defined

Output 16 bits of the accumulator value such that the output has the number of fractional bits specified in the Number of fractional bits in output parameter

The Symmetric Real FIR block supports discrete sample times and only little-endian code generation.

Dialog Box

Coefficient source

Specify the source of the filter coefficients:

Coefficients

Enter the coefficients in vector format. This parameter is visible only when Specify via dialog is specified for the Coefficient source parameter. This parameter is tunable in simulation.

Set fractional bits in coefficients to

Specify the number of fractional bits in the filter coefficients:

This parameter is visible only when Specify via dialog is specified for the Coefficient source parameter.

Number of fractional bits in coefficients

Specify the number of bits to the right of the binary point in the filter coefficients. This parameter is visible only when Specify via dialog is specified for the Coefficient source parameter, and is only enabled if User-defined is specified for the Set fractional bits in coefficients to parameter.

Set fractional bits in output to

Only 16 bits of the 32 accumulator bits are output from the block. Select which 16 bits to output:

See Matrix Multiply Examples for demonstrations of these selections.

Number of fractional bits in output

Specify the number of bits to the right of the binary point in the output. This parameter is only enabled if User-defined is selected for the Set fractional bits in output to parameter.

Initial conditions

If the initial conditions are

Algorithm

In simulation, the Symmetric Real FIR block is equivalent to the TMS320C62x DSP Library assembly code function DSP_fir_sym. During code generation, this block calls the DSP_fir_sym routine to produce optimized code.

See Also

C62xComplex FIR, C62xGeneral Real FIR, C62xRadix-4 Real FIR, C62xRadix-8 Real FIR

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS