Main Content

NR LDPC Encoder

Perform LDPC encoding according to 5G NR standard

Since R2020a

  • NR LDPC Encoder block

Libraries:
Wireless HDL Toolbox / Error Detection and Correction

Description

The NR LDPC Encoder block implements a low-density parity-check (LDPC) encoder with hardware-friendly control signals. The block accepts data bits, a stream of control signals, a base graph number, and lifting sizes. The block outputs encoded bits, a stream of control signals, lifting sizes, and a signal that indicates when the block is ready to accept new inputs.

The block functionality matches that of the function nrLDPCEncode (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 block supports scalar and vector inputs. The block provides an architecture suitable for HDL code generation and hardware deployment. For more information, see Algorithms.

Examples

Ports

Input

expand all

Input data bits, specified as a scalar or a column vector of size 64.

For more information on how to specify vector input data, see Specifying Vector Input.

Data Types: Boolean

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

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

Output

expand all

Encoded 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 data bits.

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

Data Types: bus

Output lifting size, returned as a scalar.

Data Types: uint16

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

For more information, see Using the nextFrame Output Signal.

Data Types: Boolean

More About

expand all

Algorithms

expand all

This figure shows the architecture block diagram of the NR LDPC Encoder block.

The architecture consists of Controller, Check Matrix LUT, Shifter, Memory, Nonnegative Position Selector, and XOR Unit blocks. The Controller block controls the data flow to and from the Memory block and provides control signals to control the functionality of all of these blocks. The Check Matrix LUT block consists of 5G NR LDPC standard [1] parity check matrix values. Based on the bgn and liftingSize input port values, the Check Matrix LUT block provides input to the Shifter block. The Systematic Parity Generator block generates parity bits for the first four rows of the parity check matrix and uses those generated parity bits to calculate the parity bits for the remaining rows of the parity check matrix. The Nonnegative Position Selector block selects the nonnegative positions of the parity check matrix. The XOR Unit block performs the modulo operation by completing the encoding operation.

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

Version History

Introduced in R2020a

See Also

Blocks

Functions