Use overflow detection instead of $signed comparison.
Use function assignment instead of return statements.
Yosys parser can't handle return with complex concatenation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Yosys doesn't support unpacked array ports. Changed llr_in/llr_input
from `logic signed [Q-1:0] llr[N]` to `logic [N*Q-1:0] llr` packed
vector. Also fixed blocking assignment in INIT loops (Verilator
BLKLOOPINIT requirement).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace unpacked array parameter with 8 individual ports.
Icarus Verilog (used by cocotb) doesn't support unpacked
dimensions in task/function ports.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Magnitude overflow for -32 in cn_min_sum (clamp to 31)
- Converged flag cleared prematurely in IDLE (move to INIT)
- msg_cn2vn zeroing race in first iteration (bypass old_msg read)
All 20 test vectors now pass bit-exact against Python model.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents magnitude 0 from unconnected columns dominating the
minimum computation and zeroing all CN->VN messages.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Copy ldpc_decoder_core.sv and wishbone_interface.sv from standalone RTL
- Create Caravel-adapted ldpc_decoder_top.sv with USE_POWER_PINS,
32-bit address (lower 8 bits passed through), and wb_sel_i port
- Replace user_proj_example in user_project_wrapper.v with LDPC decoder
instantiation, active-high to active-low reset inversion, and tie-offs
for unused outputs (la_data_out, io_out, io_oeb, user_irq[2:1])
- Update includes.rtl.caravel_user_project with LDPC RTL file list
- Fix invalid hex literal in VERSION_ID (0xLD -> 0x1D)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>