NB-IoT downlink shared channel decoding
returns the information bits,
trblkout, decoded from the input
soft LLR codeword data,
cwin. The NB-IoT downlink shared
channel (DL-SCH) decoder includes rate recovery, Viterbi decoding, and CRC
calculations. The function also returns the type-24A transport block CRC decoding
blkcrc and the HARQ process decoding state in
This example shows how to transmit a bundle carrying the same transport block twice. The LLR soft bits from repeated subframes in a bundle are combined in structure
dstate, the LLR soft bits from two bundles are combined in structure
state. Note that
dstate is reset before the re-transmission of the bundle.
Specify the cell-wide settings and channel transmission configuration in parameter structures
enb.NNCellID = 0; enb.NBRefP = 1; enb.NFrame = 1; chs.NSF = 3; chs.NRep = 4; chs.RNTI = 0; chs.NPDSCHDataType = 'NotBCCH';
Set the transport block length to 208 and the output codeword length to 960. Initialize the decoder states for the first HARQ transmission. Generate transport block data.
trblklen = 208; outlen = 960; estate = ; dstate = ; state = ; trblkin = randi([0 1],trblklen,1);
Generate the 960 NB-Iot DL-SCH codeword bits.
cw = lteNDLSCH(outlen,trblkin);
Perform the initial transmission of a bundle containing the transport block. Verify if there are errors in the transmission.
for subframeIdx = 0:(chs.NSF*chs.NRep-1) enb.NSubframe = subframeIdx; [sym,estate] = lteNPDSCH(enb,chs,cw,estate); [rxcw, dstate] = lteNPDSCHDecode(enb,chs,sym,dstate); end [trblkout1,blkerr1,state] = lteNDLSCHDecode(trblklen,rxcw,state); blkerr1
blkerr1 = logical 0
Perform the re-transmission of the bundle containing the same transport block. The information obtained from the initial bundle transmission is saved in state and used as an input to lteNDLSCHDecode. Verify if there are errors in the re-transmission.
for subframeIdx = chs.NSF*chs.NRep:(2*chs.NSF*chs.NRep-1) enb.NSubframe = subframeIdx; [sym,estate] = lteNPDSCH(enb,chs,cw,estate); [rxcw,dstate] = lteNPDSCHDecode(enb,chs,sym,dstate); end [trblkout2,blkerr2,state] = lteNDLSCHDecode(trblklen,rxcw,state); blkerr2
blkerr2 = logical 0
trblklen— Transport block length
Transport block length, specified as a nonnegative integer.
trblklen defines the transport block lengths to
which the input code blocks should be rate-recovered and decoded.
cwin— Soft LLR codeword data
Soft LLR codeword data, specified as a numeric vector.
cwin contains the floating-point soft LLR data of
the codeword to be decoded.
statein— Initial HARQ process state
Initial HARQ process state, specified as a structure. The structure can be empty or contain this field:
Cell array of vectors
|LLR soft buffer state associated with a single transport block. The buffer is positioned at the input to the Viterbi decoder after explicit rate recovery.|
The updated buffer states after decoding are returned in the
CBSBuffers field of the
stateout output. The
array is normally generated and recycled from the
stateout of previous calls to
lteNDLSCHDecode as part of a sequence of HARQ
trblkout— Decoded information bits
Decoded information bits, returned as a numeric vector.
blkcrc— Type-24A transport block CRC decoding result
Type-24A transport block CRC decoding result, returned as a numeric or
stateout— HARQ process decoding state
HARQ process decoding state, returned as a structure containing the internal state of a transport block in these fields:
|Parameter Field||Values||Description||Data types|
Cell array of vectors
|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 Viterbi decoder after explicit rate recovery.|
|Type-24A transport block CRC decoding error|
 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: https://www.3gpp.org.