Code Block Size
Understanding Code Block Size
The code block size is a fundamental parameter of the 5G NR LDPC channel coding chain, directly affecting error correction performance, decoding latency, and hardware complexity. Unlike turbo codes in LTE (which could handle arbitrary block sizes through internal interleaver design), LDPC codes in 5G NR use a structured parity-check matrix whose dimensions are determined by the lifting size Z. This means the code block size is constrained to specific values K = kb × Z, where kb is the number of systematic columns in the base graph and Z is one of 51 valid lifting sizes.
The lifting mechanism provides an elegant way to scale the LDPC code across a wide range of block sizes (44 to 8,448 bits for BG1) using a single base graph design. The base graph defines the code's error correction properties (threshold, error floor, decoding convergence), while the lifting size Z scales the matrix dimensions without changing these properties. This means the same LDPC decoder architecture can handle all code block sizes by simply changing Z, which corresponds to changing the shift values in the sub-matrices from Z×Z identity matrices. Hardware implementations use barrel shifters that can accommodate any valid Z value, enabling a single decoder IP to cover the full range of 5G NR code block sizes.
Code Block Size Formulas
K = kb × Z (kb = 22 for BG1, 10 for BG2)
Total Codeword Length:
N = nb × Z (nb = 68 for BG1, 52 for BG2)
Mother Code Rate:
Rmother = kb/nb = 22/68 ≈ 1/3 (BG1) or 10/52 ≈ 1/5 (BG2)
Lifting sizes Z ∈ {2,3,4,5,...,384} from 8 sets: {2×2j}, {3×2j}, {5×2j}, {7×2j}, {9×2j}, {11×2j}, {13×2j}, {15×2j}. Select smallest Z giving K ≥ payload+CRC.
Code Block Size Examples
| Base Graph | Z | K (info bits) | N (codeword) | Use Case |
|---|---|---|---|---|
| BG1 | 384 | 8,448 | 26,112 | Max throughput eMBB |
| BG1 | 256 | 5,632 | 17,408 | Large TBs, moderate BW |
| BG1 | 128 | 2,816 | 8,704 | Medium TBs |
| BG2 | 384 | 3,840 | 19,968 | Low rate, cell edge |
| BG2 | 16 | 160 | 832 | URLLC small payload |
Frequently Asked Questions
How is lifting size Z selected?
Find smallest Z where kb×Z ≥ payload+CRC. Z from 51 valid values in 8 sets (base × 2j, bases: 2,3,5,7,9,11,13,15). Implementation selects set minimizing padding (filler bits). Fillers are known zeros treated as infinite LLR at decoder, giving 0.05 to 0.1 dB free gain. Single decoder handles all Z via configurable barrel shifters.
How does base graph selection affect size?
BG1: kb=22, max K=8,448, Rmother=1/3. Selected for large TBs (>3,824 bits) and code rate >1/4. Best for eMBB. BG2: kb=10, max K=3,840, Rmother=1/5. For small TBs, rate <1/4, URLLC, and control channels. BG2 provides better performance at very low rates and short blocks.
How does size affect decoding performance?
Larger blocks: 0.3 to 0.5 dB better at R=1/2 (random impairments average out). But more latency and memory. For URLLC (<1 ms), smaller BG2 blocks preferred despite slight performance penalty. K=8,448 vs K=1,000: ~0.4 dB improvement at BLER 1%, but 8x more decode time.