Skip to main content

Module ldpc

Module ldpc 

Source
Expand description

CCSDS LDPC (AR4JA) codes (CCSDS 131.0-B-5). CCSDS LDPC (Low-Density Parity-Check) Forward Error Correction

Implements the AR4JA LDPC codes specified in CCSDS 131.0-B-5.

§Supported TM Codes

CodeRateknCirculantM (block)
TM12804/51024128032128
TM15362/31024153664256
TM20481/210242048128512
TM51204/540965120128512
TM61442/3409661442561024
TM81921/2409681925122048

§Encoding

Systematic encoding using compact generator matrices derived from the CCSDS AR4JA parity-check matrix. The generator exploits the circulant structure: one row per circulant block is stored, and the other rows are obtained by rotation.

§Decoding

Layered min-sum belief propagation with fixed-point (i16) LLRs. The H matrix is expanded on-the-fly using the PI_K permutation function defined by theta/phi lookup tables per CCSDS 131.0-B-5.

Structs§

LdpcCode
Describes a CCSDS AR4JA LDPC code.
LdpcFecDecoder
LDPC hard-decision decoder implementing FecDecoder.
LdpcFecEncoder
LDPC encoder implementing FecEncoder.

Enums§

LdpcError
Errors from LDPC operations.

Statics§

CODE_TM1280
TM1280: Rate 4/5, k=1024, n=1280.
CODE_TM1536
TM1536: Rate 2/3, k=1024, n=1536.
CODE_TM2048
TM2048: Rate 1/2, k=1024, n=2048.
CODE_TM5120
TM5120: Rate 4/5, k=4096, n=5120.
CODE_TM6144
TM6144: Rate 2/3, k=4096, n=6144.
CODE_TM8192
TM8192: Rate 1/2, k=4096, n=8192.

Functions§

bytes_to_llr
Converts packed bytes to hard LLR values.
decode
Decodes using layered min-sum belief propagation.
decode_hard
Convenience decoder for hard-decision received data.
encode
Encodes information bits into a systematic LDPC codeword.
llr_to_bytes
Extracts hard decisions from LLR values into packed bytes.
syndrome_check
Checks if hard decisions satisfy all parity checks.