Encode downlink control information (DCI)
encodes the input DCI bits, as defined in TS 38.212 Section 7.3.2, 7.3.3, and 7.3.4 , and returns the
rate-matched DCI codeword of length
mcrc] = nrDCIEncode(
E. The processing includes cyclic
redundancy check (CRC) attachment, polar encoding, and rate matching. The last 16 bits of
the 24 appended CRC bits are masked with
rnti, the radio network
temporary identifier (RNTI) of the user equipment (UE). The function also returns the
RNTI-masked CRC bits,
Encode DCI Message Bits
Create a random sequence of binary values corresponding to a DCI message of 32 bits.
dcibits = randi([0 1],32,1);
Encode the message for the specified RNTI and rate-matched output length.
rnti = 100; E = 240; dcicw = nrDCIEncode(dcibits,rnti,E)
dcicw = 240×1 0 1 0 1 0 0 0 0 0 0 ⋮
dcibits — DCI message bits
column vector of binary values
DCI message bits, specified as a column vector of binary values.
dcibits is the input to the DCI processing to be transmitted on a
single physical downlink control channel (PDCCH).
rnti — RNTI of UE
integer from 0 to 65,535
RNTI of the UE, specified as an integer from 0 to 65,535.
E — Length of rate-matched DCI codeword in bits
Length of rate-matched DCI codeword in bits, specified as a positive integer.
E must be in the range K + 24 <
E ≤ 8192, where K is the length of
mcrc — RNTI-masked CRC bits
RNTI-masked CRC bits of the form p0, p1, …, p23, returned as a nonnegative integer equal to p0×223 + p1×222 + .... + p23×20.
 3GPP TS 38.212. “NR; Multiplexing and channel coding.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version HistoryIntroduced in R2018b
R2023a: RNTI-masked CRC bits
The function also returns the RNTI-masked CRC bits of the DCI encoding process.