generate_rm_code#

sionna.phy.fec.polar.utils.generate_rm_code(r: int, m: int) Tuple[numpy.ndarray, numpy.ndarray, int, int, int][source]#

Generate frozen positions of the (r, m) Reed Muller (RM) code.

Parameters:
  • r (int) – The order of the RM code.

  • m (int) – log2 of the desired codeword length.

Outputs:
  • frozen_pos – Array of ints of shape [n-k] containing the frozen position indices.

  • info_pos – Array of ints of shape [k] containing the information position indices.

  • n – The resulting codeword length.

  • k – The number of information bits.

  • d_min – The minimum distance of the code.

Raises:

Examples

from sionna.phy.fec.polar.utils import generate_rm_code

frozen_pos, info_pos, n, k, d_min = generate_rm_code(r=1, m=4)
print(f"n={n}, k={k}, d_min={d_min}")
# n=16, k=5, d_min=8