Main Content

info

DL-SCH or UL-SCH decoding status information

Since R2025a

Description

The info function returns downlink shared channel (DL-SCH) or uplink shared channel (UL-SCH) decoding status information associated with the last call of the nrDLSCHDecoder or nrULSCHDecoder System object™, respectively.

decoderInfo = info(decoder) returns decoding status information associated with the last call of the decoder input.

example

Examples

collapse all

Generate a random sequence of binary values corresponding to one transport block of length 5120.

trBlkLen = 5120;
trBlk = randi([0 1],trBlkLen,1,'int8');

Create and configure a DL-SCH encoder System object with the specified target code rate.

targetCodeRate = 567/1024;
encDL = nrDLSCH;
encDL.TargetCodeRate = targetCodeRate;

Load the transport block into the DL-SCH encoder.

setTransportBlock(encDL,trBlk);

Call the encoder with 64-QAM modulation scheme, 1 transmission layer, an output length of 10,240 bits, and redundancy version 0. The encoder applies the DL-SCH processing chain to the transport block loaded into the object.

mod = '64QAM';
nLayers = 1;
outlen = 10240;
rv = 0;
codedTrBlock = encDL(mod,nLayers,outlen,rv);

Create and configure a DL-SCH decoder System object.

decDL = nrDLSCHDecoder;
decDL.TargetCodeRate = targetCodeRate;
decDL.TransportBlockLength = trBlkLen;

Call the DL-SCH decoder on the soft bits representing the encoded transport block. Use the configuration parameters specified for the encoder. The error flag in the output indicates that the block decoding does not have errors.

rxSoftBits = 1.0 - 2.0*double(codedTrBlock);
[decbits,blkerr] = decDL(rxSoftBits,mod,nLayers,rv)
decbits = 5120×1 int8 column vector

   1
   1
   0
   1
   1
   0
   0
   1
   1
   1
   0
   1
   1
   0
   1
      ⋮

blkerr = logical
   0

Obtain decoding status information.

decoderInfo = info(decDL)
decoderInfo = struct with fields:
                 HARQID: 0
    TransportBlockError: 0
         CodeBlockError: {[0]}
      SoftBufferFlushed: 1

Verify that the transmitted and received message bits are identical.

isequal(decbits,trBlk)
ans = logical
   1

Input Arguments

collapse all

DL-SCH or UL-SCH decoder, specified as an nrDLSCHDecoder or nrULSCHDecoder System object, respectively.

Output Arguments

collapse all

Decoder status information, associated with the last call of the DL-SCH or UL-SCH decoder input, decoder, returned as a structure with the fields listed in this table. If you call info(decoder) before calling the decoder object, the structure is returned with empty fields ([]).

Field NameValueDescription
HARQID Integer from 0 to 31 or []

HARQ process number in the last call.

TransportBlockError

Logical scalar, 1-by-2 logical array, or []

CRC error flag per transport block. Array values 1 and 0 indicate whether the transport block in the last call has failed or passed the CRC check, respectively.

CodeBlockGroupError

Cell array of 1 or 2 row vectors or []

CRC error flag per code block group (CBG). The number of row vectors returned in the cell array depends on the number of codewords processed in the last call. Array values 1 and 0 indicate whether the corresponding CBG in the corresponding transport block has failed or passed the CRC check, respectively.

Dependency: This field is returned only when decoder.CBGTransmission is set to true.

CodeBlockError

Cell array of 1 or 2 row vectors or []

CRC error flag per code block (CB). The number of row vectors returned in the cell array depends on the number of codewords processed in the last call. Array values 1 and 0 indicate whether the code block has failed or passed the CRC check, respectively.

SoftBufferFlushed

Logical scalar, 1-by-2 logical array, or []

Logical flag indicating whether the soft buffer in the last call has been flushed. The number of returned values depends on the number of codewords processed in the last call.

Data Types: struct

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2025a