Commit Graph

12 Commits

Author SHA1 Message Date
cah
b04813fa7c feat: add normalized min-sum CN update mode
Add cn_mode ('offset'/'normalized') and alpha parameters to
min_sum_cn_update() in ldpc_sim.py and generic_decode() in
ldpc_analysis.py. Normalized mode scales magnitudes by alpha
(default 0.75) instead of subtracting a fixed offset, which
is better suited for low-rate codes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:35:28 -07:00
cah
ca651f4f30 feat: add FER validation and CLI for density evolution
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 06:03:19 -07:00
cah
f30f972dab feat: add PEG base matrix constructor with shift optimization
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 06:01:57 -07:00
cah
a09c5f20e1 feat: add degree distribution optimizer with exhaustive search
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 05:53:23 -07:00
cah
f5b3e318c4 feat: add threshold computation via binary search
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 05:27:33 -07:00
cah
d0453e0583 feat: add Monte Carlo density evolution engine
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 05:17:06 -07:00
cah
1967ae90e4 Fix matrix rank issues and run all code analyses
- Fixed improved staircase: below-diagonal connections preserve full
  parity rank (col7->row0 s3, col1->row4 s15)
- Fixed PEG matrix: staircase backbone with cross-connections,
  all parity cols dv>=2, VN degrees [7,3,3,3,2,2,2,2]
- Clean up VN degree display (remove np.int64 wrapper)
- Ran all four analyses with 200 frames per point

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 04:56:37 -07:00
cah
ad7cb5098c feat: add code analysis tool with rate, matrix, quantization, and Shannon analyses
Implements four LDPC code analyses for photon-starved optical channels:
- Rate sweep: compare FER across 1/2, 1/3, 1/4, 1/6, 1/8 IRA staircase codes
- Matrix comparison: original staircase vs improved staircase vs PEG ring
- Quantization sweep: 4-16 bit and float precision impact on FER
- Shannon gap: binary-input Poisson channel capacity limits via binary search

Core infrastructure includes generic IRA staircase builder, GF(2) Gaussian
elimination encoder for non-triangular matrices, parameterized layered
min-sum decoder with variable check degree, and BFS girth computation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 04:46:39 -07:00
cah
c427dfdd3d feat: add frame synchronization prototype with tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 04:40:07 -07:00
cah
af6055242e test: add validation tests for existing LDPC model
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 04:32:16 -07:00
cah
b7b76da46e Fix encoder and decoder - working LDPC simulation
- Fixed cyclic shift convention (QC-LDPC P_s is left shift, not right)
- Fixed encoder to solve rows sequentially (row 0 first for p1, then 1-6)
- Fixed decoder to only gather connected columns per CN (staircase has dc=2-3)
- Fixed LLR sign convention: positive = bit 0 more likely
- Decoder validates at lam_s >= 4 photons/slot (~90% frame success)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 21:56:15 -07:00
cah
b93a6f5769 Initial LDPC optical decoder project scaffold
Rate-1/8 QC-LDPC decoder for photon-starved optical communication.
Target: Efabless chipIgnite (SkyWater 130nm, Caravel harness).

- RTL: decoder top, core (layered min-sum), Wishbone interface
- Python behavioral model with Poisson channel simulation
- 7x8 base matrix, Z=32, n=256, k=32

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 21:47:40 -07:00