Commit Graph

4 Commits

Author SHA1 Message Date
cah
74baf3cd05 feat: add test vector generation for RTL verification
Improve generate_test_vectors() to use mixed SNR levels (high SNR for
first half, nominal for second half) ensuring a mix of converged and
non-converged test cases. Add gen_firmware_vectors.py converter that
reads test_vectors.json and produces packed LLR data matching the
RTL wishbone interface format (5 LLRs per 32-bit word, 6-bit two's
complement).

Generated 20 vectors: 11 converged, 9 non-converged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:36:26 -07:00
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
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