NR Polar Encoder

Perform polar encoding according to 5G NR standard

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

Description

The NR Polar Encoder block implements a streaming polar encoder with hardware-friendly control signals. You can configure the block to use downlink or uplink encoding schemes as defined by the 5G NR standard. The 5G NR standard requires polar encoding for channel coding of the DCI, UCI, and BCH transmit channels.

The encoder implementation matches the 5G Toolbox™ function nrPolarEncode.

Because the latency of this operation can vary, the block provides an output signal, nextFrame, that indicates when the block is ready to accept new inputs.

Ports

Input

expand all

Input data bit, specified as a scalar.

double and single data types are supported for simulation, but not for HDL code generation.

Data Types: fixdt(0,1,0) | Boolean | double | single

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

Length of information block in bits, specified as a positive integer. For downlink messages, K must be in the range 36 to 164. For uplink messages, K must be in the range 31 to 1023.

K values from 18 to 25 are not supported because the 5G NR standard requires parity-aided codes for those sizes.

Data Types: fixdt(0,10,0)

Rate-matched output length in bits, specified as a positive integer. Specify a value for E that is greater than K and less than or equal to 8192.

Data Types: fixdt(0,14,0)

Output

expand all

Encoded data bit, returned as a scalar. The block returns a message of N sequential bits. N is a power of two determined from the values of K and E. The maximum output message size is 512 bits when the Link direction is Downlink and 1024 bits when the Link direction is Uplink.

Data Types: fixdt(0,1,0) | Boolean | double | single

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

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

Parameters

expand all

When you select Downlink, the block performs interleaving, as specified in the 5G NR standard. When you select Uplink, the block omits the interleaving logic.

Algorithms

expand all

This block implements the encoder by using log2(N) parallel encoding stages. The block stores the whole message in the buffer, and then interleaves and maps the information bits based on the pattern specified in the standard for the values of K and E. The interleaving step is included only when you set the Link direction parameter to Downlink.

This diagram shows the architecture of the polar encoder.

The Configuration stage is used when the input K and E values change. The block computes the new message length, N, and the locations of the information bits, then passes them to the buffer and the mapping stage. Because the mapping patterns are computed as needed, rather than stored in hardware, the block supports all K and E values within the supported range. The Configuration stage also computes the interleave pattern when you set the Link direction parameter to Downlink.

References

[1] 3GPP TS 38.211. "NR; Physical channels and modulation." 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. URL: https://www.3gpp.org.

[2] Arikan, Erdal. "Channel Polarization: A Method for Constructing Capacity-Achieving Codes for Symmetric Binary-Input Memoryless Channels." IEEE Transactions on Information Theory 55, no. 7 (July 2009): 3051–73. https://doi.org/10.1109/TIT.2009.2021379.

Extended Capabilities

Introduced in R2020a