Main Content


Downlink shared channel



[cwout,chinfo] = lteDLSCH(enb,chs,outlen,trblkin) applies the complete DL-SCH transport channel coding chain to the input data, trblkin, and returns the codewords in cwout. The encoding process includes type-24A CRC calculation, code block segmentation and type-24B CRC attachment, if any, turbo encoding, rate matching with RV, and code block concatenation. Additional information about the encoding process is returned in the fields of structure chinfo. For the case of spatial multiplexing schemes transmitting two codewords, lteDLSCH processes a single transport block or pairs of blocks, contained in a cell array. The data type for cwout matches the input, trblkin. Thus, if trblkin is a cell array containing one or two transport blocks, cwout is a cell array of one or two codewords. If trblkin is a vector of information bits, cwout is a vector also. Define pairs of modulation schemes and RV indicators in the appropriate parameter fields to encode a pair of transport blocks.


collapse all

Generate the DL-SCH codeword as defined by TS36.101 RMC R.7 for FDD duplexing mode

Initialize the rmc structure and generate transport block data. Generate the DL-SCH codewords and view the first ten.

rmc = lteRMCDL('R.7');
data = randi([0,1],rmc.PDSCH.TrBlkSizes(1),1);
codeWord = lteDLSCH(rmc,rmc.PDSCH,rmc.PDSCH.CodedTrBlkSizes(1),data);
ans = 10x1 int8 column vector


Input Arguments

collapse all

eNodeB cell-wide settings, specified as a structure containing these parameter fields.

Parameter FieldRequired or OptionalValuesDescription

If chs.NSoftBits is defined include:


'FDD' (default), 'TDD'

Duplexing mode, specified as either:

  • 'FDD' for Frequency Division Duplex

  • 'TDD' for Time Division Duplex

When DuplexMode is set to 'TDD' include:


0, 1 (default), 2, 3, 4, 5, 6

Uplink–downlink configuration

When chs.TxScheme is set to 'TxDiversity' include:


1, 2, 4

Number of cell-specific reference signal (CRS) antenna ports

Channel configuration, specified as a structure. It defines aspects of the PDSCH onto which the codewords are mapped. It also defines the DL-SCH soft buffer size and redundancy versions of the generated codewords.

chs can contain the following fields.

Parameter FieldRequired or OptionalValuesDescription
ModulationRequired'QPSK', '16QAM', '64QAM', '256QAM', '1024QAM'

Modulation type, specified as a character vector, cell array of character vectors, or string array. If blocks, each cell is associated with a transport block.


Integer from 1 to 8

Total number of transmission layers associated with the transport block or blocks.


'Port0' (default), 'TxDiversity', 'CDD', 'SpatialMux', 'MultiUser', 'Port5', 'Port7-8', 'Port8', 'Port7-14'.

PDSCH transmission scheme, specified as one of the following options.

Transmission schemeDescription
'Port0'Single antenna port, port 0
'TxDiversity'Transmit diversity
'CDD'Large delay cyclic delay diversity scheme
'SpatialMux'Closed loop spatial multiplexing
'MultiUser'Multi-user MIMO
'Port5'Single-antenna port, port 5
'Port7-8'Single-antenna port, port 7, when NLayers = 1. Dual layer transmission, ports 7 and 8, when NLayers = 2.
'Port8'Single-antenna port, port 8
'Port7-14'Up to eight layer transmission, ports 7–14


Integer vector (0,1,2,3). A one or two column matrix (for one or two codewords).

Specifies the redundancy version for one or two codewords used in the initial subframe number, NSubframe. This parameter field is only for informational purposes and is read-only.


Nonnegative scalar integer (default 0)

Total number of soft buffer bits. The default setting of 0 signifies that there is no buffer limit.

Codeword length, specified as a numeric vector of one or two elements. This vector defines the codeword lengths to which the input transport blocks should be rate matched. It represents the PDSCH capacity for the associated codeword. Therefore, it also represents the lengths of the vectors in cwout.

Transport block information bits to be encoded, specified as a numeric vector or a cell array of numeric vectors. trblkin is an input parameter containing the transport block information bits to be encoded. If it is a cell array, all rate matching calculations assume that the pair is transmitting on a single PDSCH, distributed across the total number of layers defined in chs, as per TS 36.211 [2]. The lowest order information bit of trblkin maps to the most significant bit of the transport block, as defined in TS 36.321 [3], Section 6.1.1 .

Output Arguments

collapse all

DL-SCH encoded codewords, returned as a numeric column vector or a cell array of one or two numeric column vectors. It reflects the data type and size of the input data, trblkin.

Data Types: int8 | cell

Additional information about encoding process, returned as a structure array. It contains parameter fields related to code block segmentation and rate matching. If two transport blocks are encoded, chinfo is a structure array of two elements, with one element for each block. The code block segmentation fields in this structure can also be created independently using the lteDLSCHInfo function.

chinfo contains the following fields.

Parameter FieldDescriptionValues

Total number of code blocks

Nonnegative scalar integer


Lower code block size (K–)

Nonnegative scalar integer


Number of code blocks of size Km (C–)

Nonnegative scalar integer


Upper code block size (K+)

Nonnegative scalar integer


Number of code blocks of size Kp (C+)

Nonnegative scalar integer


Number of filler bits in first block

Nonnegative scalar integer


Number of segment cyclic redundancy check (CRC) bits

Nonnegative scalar integer


Total number of bits in all segments

Nonnegative scalar integer


Number of transmission layers.

Nonnegative scalar integer


Number of layers used in rate matching calculation

Nonnegative scalar integer


Bits per symbol variable used in rate matching calculation

Nonnegative scalar integer


Number of soft bits associated with transport block. Soft buffer size for entire input transport block

Nonnegative scalar integer


RV value associated with one codeword

Included if RV is present at the input.

Nonnegative scalar integer


[1] 3GPP TS 36.101. “Evolved Universal Terrestrial Radio Access (E-UTRA); User Equipment (UE) Radio Transmission and Reception.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. URL:

[2] 3GPP TS 36.211. “Evolved Universal Terrestrial Radio Access (E-UTRA); Physical Channels and Modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. URL:

[3] 3GPP TS 36.321. “Evolved Universal Terrestrial Radio Access (E-UTRA); Medium Access Control (MAC) protocol specification.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. URL:

Version History

Introduced in R2014a