Update MEMW and MEMW_A to match spec#472
Conversation
Codex Code Review
No other significant security/bug/performance issues stood out in the PR diff. |
|
/bench |
Benchmark — fib_iterative_8M (median of 3)Table parallelism: 32 (auto = cores / 3)
Commit: 0ceaeef · Baseline: cached · Runner: self-hosted bench |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
Review: Update MEMW and MEMW_A to match specSecurity Fix (High) — IS_BIT constraints on
|
* Add MEMW_A aligned-memory fast path table * fix deviation from spec: is_half and is_byte assumptions * add comment * Add a prove_elf test * add prove_elf test using both MEMW and MEMW_A chips * fix comment: bus numbering * Use Multiplicity::Sum3 for w2 in MEMW_A to avoid heap allocation on hot path * change max_rows per chunk to 2^19 insted of 2^20 * Update MEMW and MEMW_A tables to match spec after PRs #434 and #459 * fix u16 overflow * Update comment * fix numbering in comments --------- Co-authored-by: Mauro Toscano <12560266+MauroToscano@users.noreply.github.com>
Description:
Implements the spec changes from PRs #434 and #459:
MEMW:
add_limb_overflow→carry.IS_BIT[μ_read]andIS_BIT[μ_write]constraints.MEMW_A:
base_address_high/mid/low(4 cols) intobase_address[3]: DWordWHH(3 cols). 29 cols total, down from 30.AND_BYTEalignment check withIS_HALF[base_address[0] + mask].IS_BIT[μ_read]andIS_BIT[μ_write]constraints.collect_bitwise_from_memw_alignedintroduced by the IS_HALF change.