calculate_num_coded_bits#
- sionna.phy.nr.utils.calculate_num_coded_bits(modulation_order: int, num_prbs: int, num_ofdm_symbols: int, num_dmrs_per_prb: int, num_layers: int = 1, num_ov: int = 0, tb_scaling: float = 1.0) int[source]#
Computes the coded-bit budget used as the TBS intermediate in TS 38.214 Sec. 5.1.3.2 / 6.1.4.2.
Resource elements per PRB are capped at 156, as required for transport- block size derivation. For the uncapped rate-matching codeword budget \(G\), use
calculate_codeword_bits()instead (see alsonum_coded_bits).- Parameters:
modulation_order (int) – Modulation order, i.e., number of bits per QAM symbol.
num_prbs (int) – Total number of allocated PRBs per OFDM symbol, where 1 PRB equals 12 subcarriers. Must not exceed 275.
num_ofdm_symbols (int) – Number of OFDM symbols allocated for transmission. Cannot be larger than 14.
num_dmrs_per_prb (int) – Number of DMRS (i.e., pilot) symbols per PRB that are not used for data transmission, across all
num_ofdm_symbolsOFDM symbols.num_layers (int) – Number of MIMO layers.
num_ov (int) – Number of unused resource elements due to additional overhead as specified by higher layer.
tb_scaling (float) – TB scaling factor for PDSCH as defined in TS 38.214 Tab. 5.1.3.2-2. Must contain values in {0.25, 0.5, 1.0}.
- Outputs:
num_coded_bits – int. Capped coded-bit budget used when deriving the transport block size.
Examples
from sionna.phy.nr.utils import calculate_num_coded_bits num_bits = calculate_num_coded_bits(4, 50, 14, 12, 2) print(num_bits)