nearlink_sdr.common.polar¶
Polar 编码器与 SC(逐次消去)解码器 -- TXS-10002-2025 标准 6.9.1.4 节。
Module Contents¶
Classes¶
Successive Cancellation (SC) decoder in LLR domain。 |
|
使用 GF(2) 上蝶形(递归)算法的 Polar 编码器。 |
Functions¶
从速率匹配表中查询给定码率和码长对应的信息位数 K。 |
|
获取 PolarDecoder 实例, 相同 (N, K) 复用已创建的对象。 |
Data¶
API¶
- nearlink_sdr.common.polar.RATE_TABLE¶
None
- nearlink_sdr.common.polar.RELIABILITY_SEQ_1024¶
[0, 1, 2, 4, 8, 16, 32, 3, 5, 64, 9, 6, 17, 10, 18, 128, 12, 33, 65, 20, 256, 34, 24, 36, 7, 129, 66...
- nearlink_sdr.common.polar.VALID_CODE_LENGTHS¶
None
- class nearlink_sdr.common.polar.PolarDecoder(N: int, K: int)[源代码]¶
Successive Cancellation (SC) decoder in LLR domain。
使用预分配的二维数组存储中间 LLR 和 partial sums, 避免递归中频繁分配内存。
Initialization
- decode(llr: numpy.ndarray) numpy.ndarray[源代码]¶
使用 SC 算法将 N 个信道 LLR 解码为 K 个信息位。
约定:正 LLR 表示比特 0 的可能性更高。
- class nearlink_sdr.common.polar.PolarEncoder(N: int, K: int)[源代码]¶
使用 GF(2) 上蝶形(递归)算法的 Polar 编码器。
Initialization
- encode(info_bits: numpy.ndarray) numpy.ndarray[源代码]¶
将 K 个信息位编码为 N 个编码位。
- 参数:
info_bits -- 长度为 K 的比特数组(取值 0 或 1)。
- 返回:
长度为 N 的码字(取值 0 或 1)。
- nearlink_sdr.common.polar.get_info_bit_count(rate_str: str, N: int) int[源代码]¶
从速率匹配表中查询给定码率和码长对应的信息位数 K。
- nearlink_sdr.common.polar.get_polar_decoder(n: int, k: int) nearlink_sdr.common.polar.PolarDecoder[源代码]¶
获取 PolarDecoder 实例, 相同 (N, K) 复用已创建的对象。