Main Content

lteCodeBlockDesegment

Code block desegmentation and CRC decoding

Description

[blk,err] = lteCodeBlockDesegment(cbs,blklen) concatenates the input code block vectors contained in cbs into an output vector, blk, of length blklen. blklen is also used to validate the dimensions of the data in cbs and to calculate the amount of filler to be removed. If cbs is a cell array containing more than one vector, each vector is assumed to have a type-24B CRC attached. This CRC is decoded and stripped from each code block before output concatenation and the CRC error result is placed in the associated element of vector err. The length of err is the number of code blocks. If cbs is a single vector or a cell array containing a single vector, no CRC decoding or stripping is performed and err is empty. In all cases, the number of filler bits stripped from the beginning of the (first) code block is calculated from blklen. lteCodeBlockDesegment performs the inverse of the code block segmentation and CRC appending (see lteCodeBlockSegment).

[blk,err] = lteCodeBlockDesegment(cbs) no leading filler bits are stripped from the output.

example

Examples

collapse all

Perform code block desegmentation and discover when segmentation occurs.

Code block segmentation occurs if the input length is greater than 6144. The input vector of length 6145 is segmented by lteCodeBlockSegment into two vectors of length 3072 and 3136.

cbs = lteCodeBlockSegment(ones(6145,1));

Next, perform desegmentation and CRC removal.

[blk,err] = lteCodeBlockDesegment(cbs);
size(blk)
ans = 1×2

        6160           1

err
err = 1x2 int8 row vector

   0   0

The first output, blk, is a column vector of length 6160. The second output, err, is a column vector of zero values.

Input Arguments

collapse all

Code block segments, specified as a column vector or cell array of column vectors. If cbs is a cell array containing more than one vector, each vector is assumed to have a type-24B CRC attached. This CRC is decoded and stripped from each code block before output concatenation and the CRC error result is placed in the associated element of vector err. The length of err is the number of code blocks. If cbs is a single vector or a cell array containing a single vector, no CRC decoding or stripping is performed and err is empty. In all cases, the number of filler bits stripped from the beginning of the (first) code block is calculated from blklen.

Block length, specified as a nonnegative integer.

Output Arguments

collapse all

Output data block, returned as a column vector. The input code blocks are segmented into a single output data block, blk, removing any filler and type-24B CRC bits.

Data Types: int8

Code block CRC decoding errors, returned as a nonnegative integer. The length of err is equal to the number of code blocks. If cbs is a cell array containing multiple vector elements, lteCodeBlockDesegment assumes that each vector has a type-24B CRC attached. The CRC is decoded and stripped from each code block before output concatenation and the CRC error result is placed in the associated element of err. If cbs is a single vector or a cell array containing a single vector, no CRC decoding or stripping is performed and err is empty.

Data Types: int8

Version History

Introduced in R2014a