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 number of coded bits that fit in a slot for the given resource grid structure.

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_symbols OFDM 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_bitsint. Number of coded bits that can be fit into a given slot for the given configuration.

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)