CIC Decimation HDL Optimized

Decimate signal using cascaded integrator-comb filter optimized for HDL code generation

  • Library:
  • DSP System Toolbox HDL Support / Filtering

Description

The CIC Decimation HDL Optimized block decimates an input signal by using a cascaded integrator-comb (CIC) decimation filter. CIC filters are a class of linear phase FIR filters consisting of a comb part and an integrator part. The CIC decimation filter structure consists of N sections of cascaded integrators, a rate change factor of R, and N sections of cascaded comb filters. For more information about CIC Decimation filter, see Algorithms.

The block supports both fixed and variable decimation rates. It provides an architecture suitable for HDL code generation and hardware deployment.

Ports

Input

expand all

Input data, specified as a signed integer or signed fixed point with a word length less than or equal to 32.

Data Types: int8 | int16 | int32 | fixed point
Complex Number Support: Yes

Indication of valid input data, specified as a Boolean scalar.

This port is a control signal that indicates if the input data is valid. When this value is 1, the block captures the values from the data input port. When this value is 0, the block ignores the values from the data input port.

Data Types: Boolean

Use this port to dynamically specify the variable decimation rate during run time.

This value must be of data type ufix12 and in the range from 2 to the Decimation factor (R) parameter value.

Dependencies

To enable this port, select the Variable decimation parameter.

Data Types: fixdt(0,12,0)

Clear internal states, specified as a Boolean scalar.

When this value is 1, the block stops the current calculation and clears all internal states. When this value is 0 and the input valid is 1, the block starts a new filtering operation.

Dependencies

To enable this port, select the Enable reset input port parameter.

Data Types: Boolean

Output

expand all

CIC decimated output data, returned as a scalar.

You can define the output data type of the block by setting the Output data type parameter.

Data Types: int8 | int16 | int32 | fixed point
Complex Number Support: Yes

Indication of valid input data, returned as a Boolean scalar.

This port is a control signal that indicates if the data from the data output port is valid. When this value is 1, the block returns valid data on the data output port. When this value is 0, the values on the data output port are not valid.

Data Types: Boolean

Parameters

expand all

Select this parameter to operate the block with a variable decimation rate specified from the decimFactor port. Clear this parameter to operate the block with a fixed decimation rate specified from the Decimation factor (R) parameter.

Specify the decimation factor rate with which you want to decimate the input.

Set this parameter to the maximum possible value supported from the decimFactor port, when you select the Variable decimation parameter.

Specify the differential delay of the comb part of the block.

Specify the number of sections in either the comb part or the integrator part of the block.

Select the data type for the output data.

  • Full precision — The output data type has a word length equal to the input word length plus gain bits.

  • Same word length as input — The output data type has a word length equal to the input word length.

  • Minimum section word lengths — The output data type uses the word length you specify in the Output word length parameter. When you select this option, the block applies the Pruning algorithm. For more information about the Pruning algorithm, see [1]. This option is not supported when you select the Variable decimation parameter.

Specify the word length of the output.

Note

When this value is 2, 3, 4, 5, or 6 the block might overflow the output data.

Dependencies

To enable this parameter, set the Output data type parameter to Minimum section word lengths.

Select this parameter to compensate for the output gain of the block.

Depending on the type of decimation you specify and the value of this parameter, the latency of the block changes.

For fixed decimation (the Variable decimation parameter is cleared):

  • When you clear this parameter, the latency of the block is 3 + N clock cycles.

  • When you select this parameter, the latency of the block is 3 + N + 9 clock cycles.

For variable decimation (the Variable decimation parameter is selected):

  • When you clear this parameter, the latency of the block is 4 + N clock cycles.

  • When you select this parameter, the latency of the block is 4 + N + 9 clock cycles.

Select this parameter to enable the reset input port.

Algorithms

expand all

References

[1] Hogenauer, E. “An Economical Class of Digital Filters for Decimation and Interpolation.” IEEE Transactions on Acoustics, Speech and Signal Processing vol. 29, no. 2, Apr. 1981, pp. 155–162.

Extended Capabilities

Introduced in R2019b