This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Decode downlink control information (DCI)


dcibits = nrDCIDecode(softbits,K,L)
[dcibits,mask] = nrDCIDecode(softbits,K,L)


dcibits = nrDCIDecode(softbits,K,L) decodes the input softbits and returns the decoded DCI bits of length K. The function implements the inverse of the features specified in TS 38.212 Sections 7.3.4, 7.3.3, and 7.3.2 [1], such as rate recovery, polar decoding, and cyclic redundancy check (CRC) decoding. L specifies the list length used for polar decoding.


[dcibits,mask] = nrDCIDecode(softbits,K,L) also looks for a cyclic redundancy check (CRC) error in the DCI decoding. If mask is not equal to 0, either an error has occurred or the input CRC has been masked. When there are no CRC errors, mask is the actual value used for masking the CRC bits.


collapse all

Create a random sequence of binary values corresponding to a DCI message of 32 bits. Encode the message based on the specified RNTI and rate-matched DCI codeword length. The RNTI masks the CRC parity bits.

K = 32; 
rnti = 100; 
E = 240; 
dciBits = randi([0 1],K,1);
dcicw = nrDCIEncode(dciBits,rnti,E);

Decode the soft bits representing the DCI codeword dcicw. Set the length of the polar decoding list to 8.

L = 8;
[recBits,mask] = nrDCIDecode(1-2*dcicw,K,L)
recBits = 32x1 int8 column vector


mask = uint32

Verify that the transmitted and received message bits are identical.

ans = logical

The recovered mask value is the RNTI value used for CRC masking.

mask = uint32

Input Arguments

collapse all

Coded block of soft bits, specified as a column vector of real numbers.

Data Types: double | single

Length of decoded output in bits, specified as an integer from 12 to 140.

Data Types: double

Length of polar decoding list, specified as a power of two.

Data Types: double

Output Arguments

collapse all

Decoded DCI message bits, returned as a K-by-1 column vector of binary values. The message bits were transmitted on a single physical downlink control channel (PDCCH).

Data Types: int8

Result of CRC decoding, returned as a nonnegative integer less than 216–1. If mask is not equal to 0, either an error has occurred or the CRC has been masked. When there are no errors, mask is the actual value used for masking the CRC bits.

Data Types: uint32


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

Extended Capabilities

See Also


Introduced in R2018b