Main Content

NR LDPC Decoder

Decode LDPC code using layered belief propagation with min-sum or normalized min-sum approximation algorithm

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

  • NR LDPC Decoder block

Description

The NR LPDC Decoder block implements a low-density parity-check (LDPC) decoder with hardware-friendly control signals. The block accepts punctured log-likelihood ratio (LLR) values, a stream of control signals, a base graph number, and lifting sizes. The block outputs decoded bits, a stream of control signals, lifting sizes, and a signal that indicates when the block is ready to accept new inputs.

This block provides an option to implement layered belief propagation with either the normalized min-sum approximation algorithm or the min-sum approximation algorithm. This implementation matches that of the function nrLDPCDecode (5G Toolbox). You can use this block for channel coding of downlink and uplink shared channels and paging channel according to 5G new radio (NR) standard TS 38.212 [1].

The NR LDPC Decoder block supports scalar and 64-element column vector inputs. The block supports the early termination feature to help improve decoding performance and faster convergence speeds at high signal noise ratio (SNR) conditions. The block enables decoding of multiple code rates to help achieve high throughput efficiency with a high degree of code rate flexibility. The block provides an architecture suitable for HDL code generation and hardware deployment. For more information, see Algorithms.

Ports

Input

expand all

Input log-likelihood ratio (LLR) values, specified as a scalar or a column vector of size 64.

The data type of this input must be a signed fixed-point data type with a word length from 4 to 16 bits. For more information on how to specify vector input data, see Specifying Vector Input.

Data Types: int8 | int16 | fixed point

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 detail, see Sample Control Bus.

Data Types: bus

Base graph number, specified as a scalar. When this value is 0, the block applies bgn 1. When this value is 1, the block applies bgn 2. For more information about bgn 1 and bgn 2, see section 5.3.2, of TS 38.212 [1].

Data Types: Boolean

Input lifting size, specified as a scalar.

For an invalid liftingSize value, the block discards the current frame and waits for the new frame. For more information about the supported lifting size values, see section 5.3.2, of TS 38.212 [1].

Data Types: uint16

Number of iterations, specified as a integer in the range from 1 to 63.

If you specify iter as a value greater than 63, the block automatically sets the iter value to 8 and performs the decoding operation.

Dependencies

To enable this port, set the Source for number of iterations parameter to Input port.

Data Types: uint8

Number of rows, specified as a scalar.

When you set the bgn value to 0 the block supports the number of rows in the range from 4 to 46. When you set the bgn value to 1, the block supports the number of rows in the range from 4 to 42.

Dependencies

To enable this port, select the Enable multiple code rates parameter.

Data Types: fixdt(0,6,0)

Output

expand all

Decoded output data bits, returned as a scalar or a column vector of size 64.

The block outputs data bits in a similar format as the input LLR values. Extract these output data bits in a similar format for further processing.

Data Types: Boolean

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 detail, see Sample Control Bus.

Data Types: bus

Output lifting size, returned as a scalar.

Data Types: uint16

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

Actual number of iterations the block takes to decode the output, returned as a scalar.

Dependencies

To enable this port, set the Decoding termination criteria parameter to Early.

Data Types: uint8

Parity check status indicator, returned as a Boolean scalar. The port indicates the status of the parity check after the decoding operation.

  • 0 — Indicates that the parity check failed

  • 1 — Indicates that the parity check passed

Dependencies

To enable this port, select the Enable parity check output port parameter.

Data Types: Boolean

Parameters

expand all

Select the type of algorithm. For more information, see Algorithm (5G Toolbox).

Specify the scaling factor.

Dependencies

To enable this parameter, set the Algorithm parameter to Normalized min-sum.

Select the decoding termination criteria.

  • Max — Terminates decoding when the block reaches the number of iterations specified through the Number of iterations parameter or through the iter input port

  • Early — Terminates decoding when all of the parity checks are met or when the block reaches the maximum number of iterations specified through the Maximum number of iterations parameter or through the iter input port

Select the source for specifying the number of iterations.

You can set the number of iterations by using either an input port or a parameter.

  • Select Property to enable either the Number of iterations parameter or the Maximum number of iterations parameter.

  • Select Input port to enable the iter port.

Specify the number of iterations.

Dependencies

To enable this parameter, set the Decoding termination criteria parameter to Max and the Source for number of iterations parameter to Property.

Specify the maximum number of iterations.

Dependencies

To enable this parameter, set the Decoding termination criteria parameter to Early and the Source for number of iterations parameter to Property.

Select this parameter to enable the numRows input port to support multiple code rates. For more information about multiple code rates, see Multiple Code Rates.

Select this parameter to enable the parityCheck output port to view the status of the parity check.

More About

expand all

Algorithms

expand all

This figure shows the architecture block diagram of the NR LDPC Decoder block. The Controller block controls the layer and iteration count of the decoding process. The Variable node RAM block stores the variable node (VN) messages, and Check node RAM block stores the check node messages (CN). The Functional Unit block calculates the variable node (VN) messages and check node (CN) messages based on the layered belief propagation and either the normalized min-sum approximation algorithm or the min-sum approximation algorithm. The Termination/Parity check status block calculates the parity checks and provides the parity check status after each iteration. For more information about decoding algorithms, see Algorithm (5G Toolbox).

NR LDPC Block Architecture

The implementation of the block matches the performance of the function nrLDPCDecode (5G Toolbox).

This plot shows the performance of the block for a 4-bit LLR input when you set the Algorithm parameter to Min-sum.

LDPC Decoder BER Performance Comparison Min-sum

This plot shows the performance of the block for a 4-bit LLR input when you set the Algorithm parameter to Normalized min-sum .

LDPC Decoder BER Performance Comparison Normalized min-sum

This plot shows the average number of iterations taken to decode the data per EbNo for a 4-bit LLR input when you set the Algorithm parameter to Min-sum and the Decoding termination criteria parameter to Early.

LDPC Decoder Average Number of Iterations Performance Comparison

References

[1] 3GPP TS 38.212. “NR; Multiplexing and Channel Coding.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[2] Gallager, R. “Low-Density Parity-Check Codes.” IEEE Transactions on Information Theory 8, no. 1 (January 1962): 21–28. www.doi.org/10.1109/TIT.1962.1057683.

Extended Capabilities

See Also

Blocks

Functions

Introduced in R2020a