NR LDPC Encoder

Perform low-density parity-check (LDPC) encoding according to 5G NR standard

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

Description

The NR LPDC Encoder block implements a low-density parity-check (LDPC) encoder with hardware-friendly control signals. The block accepts data bits, a ctrl bus, a base graph number, and lifting sizes. The block outputs encoded bits, a ctrl bus, lifting sizes, and a nextFrame output port. Because, the latency of the block varies, the block provides the nextFrame output port, which indicates when the block is ready to accept new inputs.

The block functionality matches that of the 5G Toolbox™ nrLDPCEncode function.

The block provides an architecture suitable for HDL code generation and hardware deployment. 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].

Ports

Input

expand all

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

For more information on how to specify the input data, see Specifying Input Data.

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

Data Types: bus

Base graph number, specified as a Boolean 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, 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, TS 38.212 [1].

Data Types: uint16

Output

expand all

Encoded output data bits, returned as a column vector of size 64.

The block outputs data bits in a similar format as the input data bits. Extract these encoded output data bits in the same 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

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 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

Introduced in R2020a