Communications Blockset    
General CRC Syndrome Detector

Detect errors in the input data frames according to the generator polynomial

Library

CRC sublibrary of Error Correction and Detection

Description

The General CRC Syndrome Detector block receives a message word and removes the checksum. The block then calculates a new checksum and compares the received checksum with the new checksum. The block has two outputs. The first output is the message word with the checksum removed. The second output is a Boolean error flag, which is 0 if the received checksum agrees with the new checksum, and 1 otherwise. For a more detailed description of the CRC algorithm, see the section "Cyclic Redundancy Check Coding."

The block's parameter settings should agree with those in the General CRC Generator block.

You specify the generator polynomial for the CRC algorithm by the Generator polynomial parameter in the block's mask. You represent the polynomial in either of two ways:

You specify the initial state of the internal shift register by the Initial states parameter in the block's mask. The Initial states parameter is either a scalar or a binary row vector of length equal to the degree of the generator polynomial. A scalar value is expanded to a row vector of length equal to the degree of the generator polynomial. For example, the default initial state of [0] is expanded to a row vector of all zeros.

You specify the number of checksums the block calculates for each frame by the Checksums per frame parameter. The parameter equals the size of the second output. If the Checksums per frame value is k, the size of the input frame is n, and the degree of the generator polynomial is r, then k must divide n - k*r, which is the size of the message word.

As an example, suppose the received codeword has size 16, the generator polynomial has degree 3, Initial states is set to [0], and Checksums per frame is set to 2. The block removes the two checksums of size 3, one from the end of the first half of the received codeword, and the other from the end of the second half of the received codeword, as shown in the following figure. The initial states are not shown in this example, because an initial state of [0] does not affect the output of the CRC algorithm. The block then concatenates the two truncated halves as a single vector of size 10 and outputs this vector through the first output port. The block outputs a 2x1 Boolean frame vector, whose entries are 0 or 1, depending on whether the corresponding received and new checksums agree. The following figure shows an example in which the first checksums disagree and the second checksums agree. This indicates that an error occurred in transmitting the first half of the codeword.

Signal Attributes

The General CRC Syndrome Detector block has one input port and two output ports. All ports allow frame-based binary column vectors only.

Dialog Box

Generator polynomial
A binary or integer row vector specifying the generator polynomial, in descending order of powers.
Initial states
A binary scalar or a binary row vector of length equal to the degree of the generator polynomial, specifying the initial state of the internal shift register.
Checksums per frame
A positive integer specifying the number of checksums the block calculates for each input frame.

Pair Block

General CRC Generator

See Also

CRC-N Generator, CRC-N Syndrome Detector


  General CRC Generator General Multiplexed Deinterleaver