Contenido principal

Binary Cyclic Decoder

Decode systematic cyclic code to recover binary vector data

  • Binary Cyclic Decoder block

Libraries:
Communications Toolbox / Error Detection and Correction / Block

Description

The Binary Cyclic Decoder block recovers a message vector from the codeword vector of a binary systematic cyclic code. For more information, see Binary Cyclic Coding.

For proper decoding, the parameter values in this block must match those in the corresponding Binary Cyclic Encoder block.

Examples

expand all

This example shows how to model a simple encoder and decoder using appropriate vector lengths for the code and message.

The cm_binary_cyclic model includes these blocks:

  • Bernoulli Binary Generator block with Samples per frame set to 4 to match the binary cyclic encoder message length

  • Binary Cyclic Encoder block with default parameter values

  • Binary Cyclic Decoder block with default parameter values

  • Error Rate Calculation block with Output data set to Port

  • Display block connected to the output port of the Error Rate Calculation block

To display the vector length of signals in the model, go to Debug > Diagnostics > Information Overlays > Signals and select Signal Dimensions. The connector lines show the signal attributes. To compile the model, press Ctrl+D. Run the model to display the error rate statistics.

Ports

Input

expand all

Encoded message, specified as a binary column vector signal containing N elements. The Codeword length N parameter determines N. This port is unnamed on the block mask.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean

Output

expand all

Decoded message, returned as a column vector signal containing K elements and having the same data type as the input port, In. The Message length K, or generator polynomial parameter determines K. This port is unnamed on the block mask.

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Codeword length, specified as a positive integer. For more information, see Binary Cyclic Coding. The codeword length is also the input vector length.

Message length of the systematic cyclic code or an (NK)-degree generator polynomial, where N is the Codeword length N parameter value.

  • When this parameter is an integer, the block uses the output of cyclpoly(N,K,'min') as the generator polynomial for the code.

  • When this parameter is a vector, the vector must represent an (NK)-degree generator polynomial.

For more information, see Binary Cyclic Coding.

Block Characteristics

Data Types

Boolean | double | fixed point | integer | single

Multidimensional Signals

no

Variable-Size Signals

no

More About

expand all

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced before R2006a