calculate_codeword_bits#
- sionna.phy.nr.utils.calculate_codeword_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 uncapped rate-matching codeword bit budget \(G\).
Unlike
calculate_num_coded_bits(), this helper does not apply the TS 38.214 156-RE-per-PRB cap. That cap applies only when deriving the transport block size; the actual number of coded bits available for rate matching can be larger. This matchesnum_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. Uncapped number of coded bits available for rate matching.
Examples
from sionna.phy.nr.utils import calculate_codeword_bits g = calculate_codeword_bits(4, 1, 14, 0, 1) print(g) # 672 (= 4 * 168), not capped to 156 REs