Downlink shared channel decoding
the information bits,
trblkout, decoded from
the input soft LLR codeword data,
cwin. The DL-SCH
decoder includes rate recovery, turbo decoding, block concatenation,
and CRC calculations. The function also returns the type-24A transport
block CRC decoding result in
blkcrc and the HARQ
process decoding state in
stateout. The initial
HARQ process state can be provided as the optional
The function is capable of processing both a single codeword or pairs
of codewords, contained in a cell array, for the case of spatial multiplexing
schemes transmitting two codewords. The type of the return variable,
is the same as the input,
a cell array containing one or two codewords,
a cell array of one or two transport blocks. If
a vector of soft data,
trblkout is a vector also.
If you are decoding a pair of codewords, you must provide pairs of
modulation schemes and RV indicators in the appropriate parameter
enb is an input parameter structure that
may include optional fields defining the duplex mode. Since the duplex
mode defaults to
'FDD', if the
enb can be an empty structure.
chs is an input parameter structure defining
aspects of the PDSCH onto which the codewords are mapped and the DL-SCH
soft buffer size and redundancy versions of the received codewords.
trblklen is an input vector, one or two
elements in length, defining the transport block lengths to which
the input code blocks are rate recovered and decoded.
cwin is an input parameter containing the
floating point soft LLR data of the codewords to be decoded. It is
either a single vector or a cell array containing one or two vectors.
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 .
statein is an optional input structure
array, empty or one or two elements, which can input the current decoder
buffer state for each transport block in an active HARQ process. If
not an empty array and it contains a non-empty field,
this field should contain a cell array of vectors representing the
LLR soft buffer states for the set of code blocks at the input to
the turbo decoder, after explicit rate recovery. The updated buffer
states after decoding are returned in the
in the output parameter,
would normally be generated and recycled from the
previous calls to
part of a sequence of HARQ transmissions.
trblkout is the output parameter containing
the decoded information bits. It is either a single vector or a cell
array containing one or two vectors, depending on the class and dimensionality
blkcrc is an output array, one or two elements,
containing the result of the type-24A transport block CRC decoding
for the transport blocks.
stateout, the final output parameter, is
a one- or two-element structure array containing the internal state
of each transport block decoder. The
is normally reapplied via the
calls as part of a sequence of HARQ retransmissions.
This example generates and decodes 2 transmissions, one with RV set to 0 and one with RV set to 1, as part of a single codeword HARQ process for RMC R.7.
Set subframe number. Get the definition of RMC R.7. Generate transport block data. Apply DL-SCH transport channel coding chain to
trBlkData. Create a codeword with RV = 0. Turn logical bits into 'LLR' data
nsf = 1; rmc = lteRMCDL('R.7'); trBlkSize = rmc.PDSCH.TrBlkSizes(nsf); codedTrBlkSize = rmc.PDSCH.CodedTrBlkSizes(nsf); trBlkData = randi([0,1],trBlkSize,1); rmc.PDSCH.RV = 0; cw = lteDLSCH(rmc,rmc.PDSCH,codedTrBlkSize,trBlkData); cw(cw == 0) = -1;
Initialize the decoder states for the first HARQ transmission. The returned
decState contains the decoder buffer state for each transport block for an active HARQ process with RV = 1
decState = ; [rxTrBlk,~,decState] = lteDLSCHDecode(rmc,rmc.PDSCH,trBlkSize,cw,decState);
Create a second retransmitted codeword. Turn logical bits into 'LLR' data. Use the previous transmission decoder buffer state,
decState, as part of the sequence of active HARQ transmissions
rmc.PDSCH.RV = 1; cw = lteDLSCH(rmc,rmc.PDSCH,codedTrBlkSize,trBlkData); cw(cw == 0) = -1; rxTrBlk = lteDLSCHDecode(rmc,rmc.PDSCH,trBlkSize,cw,decState); size(rxTrBlk)
ans = 1×2 28336 1
ans = 10x1 int8 column vector 1 1 0 1 1 0 0 1 1 1
enb— Cell-wide settings
Cell-wide settings, specified as a structure with the following fields.
|Parameter Field||Required or Optional||Values||Description|
Duplexing mode, specified as:
the duplex mode defaults to
0, 1 (default), 2, 3, 4, 5, 6
chs— Channel configuration
Channel configuration, specified as a structure having the following fields.
|Parameter Field||Required or Optional||Values||Description|
Modulation type associated with each transport block, specified as a character vector, cell array of character vectors for 2 blocks, or string array.
1, 2, 3, 4
Total number of transmission layers associated with the transport block or blocks.
PDSCH transmission scheme, specified as one of the following options.
0, 1, 2, 3
2-element numeric vector
Redundancy version indicator, specified as a numeric vector of 1 or 2 values. Possible values are 0, 1, 2, or 3.
Nonnegative scalar integer (default 0)
Total number of soft buffer bits. The default setting of 0 signifies that there is no buffer limit.
Integer from 1 to 30
Number of turbo decoder iteration cycles
trblklen— Transport block lengths
Transport block lengths, specified as a one- or two-element numeric vector. It defines the transport block lengths to which the input code blocks should be rate-recovered and decoded.
cwin— Soft LLR codeword data
Soft LLR data of the codewords to be decoded, specified as either a numeric vector or a cell array containing one or two vectors.
statein— Initial HARQ process state
Initial HARQ process state, specified as a structure array. Optional. This structure array, which can be empty or contain one or two elements, can input the current decoder buffer state for each transport block in an active HARQ process.
trblkout— Decoded information bits
Decoded information bits, returned as a numeric vector or a
cell array of one or two numeric vectors.
the data type and size of
blkcrc— Type-24A transport block CRC decoding result
Type-24A transport block CRC decoding result, returned as a logical vector of one or two elements.
stateout— HARQ process decoding state
HARQ process decoding state, returned as a structure array of one or two elements. It contains the internal state of each transport block in the following fields.
Cell array of vectors
Cell array of vectors representing the LLR soft buffer states for the set of code blocks associated with a single transport block. The buffers are positioned at the input to the turbo decoder, after explicit rate recovery.
Array of type-24B code block set CRC decoding results
Type-24A transport block CRC decoding error
 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: https://www.3gpp.org.