Digital Communications

Code Block Segmentation

/kohd blok seg-men-tay-shun/
Code block segmentation divides large 5G NR transport blocks into smaller code blocks for independent LDPC encoding per 3GPP TS 38.212. Max code block sizes: 8,448 bits (BG1, high rate) and 3,840 bits (BG2, low rate). Each code block gets its own 24-bit CRC (CRC24B), enabling parallel decoding, reduced latency, and code block group (CBG) HARQ retransmission that reduces overhead 75 to 87% vs full transport block retransmission.
Category: Digital Communications
Max CB (BG1): 8,448 bits
Standard: 3GPP TS 38.212

Understanding Code Block Segmentation

5G NR achieves peak data rates exceeding 20 Gbps by transmitting very large transport blocks that can contain over 1 million information bits in a single slot. However, the LDPC channel coder has a fixed maximum block size determined by the parity-check matrix dimensions (8,448 bits for base graph 1). Code block segmentation bridges this gap: it splits the transport block into smaller pieces, each small enough for the LDPC encoder, adds per-block error detection (CRC24B), and enables the decoder to process blocks in parallel for low latency.

The segmentation procedure is straightforward. First, a 24-bit CRC (CRC24A) is appended to the transport block for whole-block error detection. If the resulting size B+24 exceeds the maximum code block size Kcb, the block is divided into C = ceil((B+24)/(Kcb-24)) code blocks. The 24 bits subtracted from Kcb in the denominator account for the per-block CRC24B that will be added to each code block. Filler bits (zero padding) are prepended to the first code block if needed to equalize block sizes. Each code block then proceeds through LDPC encoding, rate matching, and code block concatenation before modulation and mapping to OFDM resource elements.

Segmentation Formulas

Number of Code Blocks:
C = ⌈(B + 24) / (Kcb - 24)⌉

Code Block Size (including CRC):
K = ⌈(B + 24 + C×24) / C⌉   rounded to valid LDPC lifting size

CBG HARQ Overhead Savings:
Savings = 1 - (1/NCBG)   per single-CBG failure

Where B = transport block size (bits), Kcb = max code block size (8,448 for BG1, 3,840 for BG2). Example: B = 100,000 bits. C = ceil(100,024/8,424) = 12 code blocks. With 8 CBGs: retransmit 1/8 instead of full block (87.5% saving).

Segmentation Examples

Transport BlockBase GraphKcbCode Blocks (C)CB Size (K)
5,000 bitsBG18,44815,024 bits
50,000 bitsBG18,4486~8,400 bits
500,000 bitsBG18,44860~8,400 bits
1,300,000 bitsBG18,448155~8,400 bits
2,000 bitsBG23,84012,024 bits
Common Questions

Frequently Asked Questions

Why is segmentation necessary?

LDPC max info block: 8,448 bits (BG1) or 3,840 bits (BG2). 5G transport blocks up to ~1.3 Mbit. Without segmentation, encoder matrix would be impossibly large. Segmentation enables parallel decoding (arrays of LDPC cores), per-block CRC for early termination, and CBG-level HARQ for efficient retransmission.

How does segmentation interact with HARQ?

Code blocks grouped into 2/4/6/8 CBGs (RRC-configured). Each CBG gets own HARQ feedback bit. Failed CBG retransmitted, not entire TB. 150 code blocks in 8 CBGs: single-block error retransmits 1/8 of data (87.5% overhead reduction). Critical for high-SNR scenarios with rare, isolated errors.

How does it affect decoding latency?

First code block decoded while later blocks still demodulating. Pipelined architecture: demod + deinterleave + LDPC decode on different blocks simultaneously. Single-block decode: 1 to 5 μs (10 to 20 iterations). 150 blocks on 8 to 16 parallel cores: ~10 to 100 μs total vs ms without parallelism.

5G NR Components

Request a Quote

Need 5G NR baseband chipsets, LDPC encoder/decoder IPs, or channel coding test solutions? Contact our team.

Get in Touch