CCSDS RS Decoder

Decode and recover message from RS codeword according to CCSDS standard

• Library:
• Wireless HDL Toolbox / Error Detection and Correction

Description

The CCSDS RS Decoder block decodes and recovers a message from a Reed-Solomon (RS) codeword according to the Consultative Committee for Space Data Systems (CCSDS) standard [1]. The block accepts codeword data and a `samplecontrol` bus and outputs a decoded message data, a `samplecontrol` bus, control signals that indicate whether the decoded data is corrupted and whether the block is ready to accept data, and an optional signal to provide the number of corrected errors. The block provides an architecture suitable for HDL code generation and hardware deployment.

Because the latency of the block varies, the block provides the output port nextFrame that indicates when the block is ready to accept new input codeword data. For more details about the latency of the block, see the Algorithm section.

The block also supports shortened message lengths. You can use this block in a CCSDS receiver for satellite communication.

Ports

Input

expand all

Input codeword data, specified as an integer in the range from 0 to 255. This integer represents a symbol.

The block accepts a maximum value of 255 x I and a minimum value of (255 – k + 1) x I for the number of input codeword symbols per frame. k is the message length specified by the Message length (k) parameter. I is the interleaving depth specified by the Interleaving depth (I) parameter. The number of input codeword symbols must be an integral multiple of I.

The block supports back-to-back input frames for:

• Full-length codes when you set Message length (k) to `223` and Interleaving depth (I) to `3`, `4`, `5`, or `8`

• Full-length codes when you set Message length (k) to `239` and Interleaving depth (I) to `1`, `2`, `3`, `4`, `5`, or `8`

The block does not support back-to-back input frames for:

• Shortened codes for any of the Message length (k) and Interleaving depth (I) values

• Full-length codes when you set Message length (k) to `223` and Interleaving depth (I) to `1` or `2`

`double` and `single` data types are allowed for simulation, but not for HDL code generation. For HDL code generation, specify this value in `fixdt(0,8,0)` or `uint8` format.

Data Types: `double` | `single` | `uint8` | `fixdt(0,8,0)`

Control signals accompanying the sample stream, specified as a `samplecontrol` bus. The bus includes the `start`, `end`, and `valid` control signals, which indicate the boundaries of the frame and the validity of the samples.

• `start` — Indicates the start of the input frame

• `end` — Indicates the end of the input frame

• `valid` — Indicates that the data on the input data port is valid

For more details, see Sample Control Bus.

Data Types: `bus`

Output

expand all

Decoded message data, returned as an integer in the range from 0 to 255. The output data type is the same as the input data type.

The block outputs N – (255 – k) x I number of decoded message symbols for N number of input codeword symbols. k is the message length specified by the Message length (k) parameter and I is the interleaving depth specified by the Interleaving depth (I) parameter.

Data Types: `double` | `single` | `uint8` | `fixdt(0,8,0)`

Control signals accompanying the sample stream, returned as a `samplecontrol` bus. The bus includes the `start`, `end`, and `valid` control signals, which indicate the boundaries of the frame and the validity of the samples.

• `start` — Indicates the start of the output frame

• `end` — Indicates the end of the output frame

• `valid` — Indicates that the data on the output data port is valid

For more details, see Sample Control Bus.

Data Types: `bus`

Indication of corruption in the output data, returned as a Boolean scalar.

When this value is `1`, the output contains errors. When this value is `0`, the output contains zero errors.

If the number of symbol errors in the input codeword data is greater than (255 - k) x I / 2, the block outputs data without correcting the errors and sets the err port to `1` to indicate that errors that cannot be corrected exist in the input codeword data. k is the message length specified by Message length (k) parameter.

Data Types: `Boolean`

Block ready indicator, returned as a Boolean scalar.

The block sets this signal to `1` (`true`) when the block is ready to accept the start of the next frame. If the block receives an input ctrl.start signal while nextFrame is `0` (`false`), the block discards the frame in progress and begins processing the new data.

Data Types: `Boolean`

Number of corrected errors, returned as a nonnegative scalar.

The maximum number of errors that the block can correct is equal to (255 – k) x I / 2. If the number of errors in the input codeword data is greater than (255 – k) x I / 2, the block outputs data without correcting the errors and sets the numCorrErr port to `0` to indicate that none of those errors can be corrected.

The block sets the numCorrErr port to `0` when the err port is `1`.

Dependencies

To enable this port, select the Output number of corrected symbol errors parameter.

Data Types: `uint8`

Parameters

expand all

Select the message length.

Select the interleaving depth.

Select this parameter to enable the numCorrErr output port. This port outputs the number of corrected errors.

Algorithms

expand all

This block diagram shows the high-level overview of the CCSDS RS Decoder block and its operation when you set the Interleaving depth (I) parameter to `4`. This operation is a parallel implementation and contains logic that is equivalent to four independent RS decoders because the specified interleaving depth is 4.

The D2C block converts the input dual basis codeword symbols to conventional basis codeword symbols and sends them for decoding. Simultaneously, the D2C block sends the conventional basis codeword symbols to the RAM block. The RAM block stores these symbols for correction. The switch (S1) interleaves the conventional basis symbols and sends them to the respective RS Decoding Logic blocks. Each RS Decoding Logic block calculates syndrome values, determines the error location polynomial using the Berlekamp-Massey algorithm, and finds error locations and magnitudes using Chien search [4] and Forney [5] algorithms, respectively. For information about the Berlekamp-Massey algorithm, see Algorithms for BCH and RS Errors-only Decoding.

The error magnitudes from these RS Decoding Logic blocks are XORed with their respective input codeword symbols that are stored in the RAM block by using the switch (S2) and the calculated error locations to obtain the corrected message symbols. The C2D block converts the corrected conventional basis symbols back to dual basis symbols.

References

[1] TM Synchronization and Channel Coding. Recommendation for Space Data System Standards. CCSDS 131.0-B-3. Blue Book. Issue 3. Washington, D.C.: CCSDS, September 2017.

[2] TM Synchronization and Channel Coding. Summary of Concept and Rationale CCSDS 130.1-G-3. Green Book. Issue 3, June 2020.

[3] Stephen B. Wicker. Error Control Systems for Digital Communication and Storage. Prentice Hall 1995.

[4] Chien, R. “Cyclic Decoding Procedures for Bose- Chaudhuri-Hocquenghem Codes.” IEEE Transactions on Information Theory 10, no. 4 (October 1964): 357–63. https://doi.org/10.1109/TIT.1964.1053699.

[5] Forney, G. “On Decoding BCH Codes.” IEEE Transactions on Information Theory 11, no. 4 (October 1965): 549–57. https://doi.org/10.1109/TIT.1965.1053825.

Version History

Introduced in R2021b