Fix SHIFT chip deviations from spec#430
Conversation
Codex Code Review
Security findings: No direct security vulnerability identified in this diff. Assumptions / gaps
|
|
Review: Fix SHIFT chip deviations from spec No security vulnerabilities, bugs, or significant performance issues found. The implementation is correct and clean. Verified:
|
* Merge HWSL and HWSLC into a single paired bus interaction * change hwsl in types * make limb_shift[3] virtual * fix comments with hwslc references * Fix TryFrom<u64> for BusId
Fix SHIFT chip deviations from spec
Description
PR #400 updated the SHIFT spec, so here we update the code to match. This PR fixes two deviations:
DEV-1 — Merge HWSL and HWSLC into a single paired bus interaction:
HWSL now returns
[(x << y) mod 2^16, x >> (16 - y)]as a pair per spec. The separate HWSLC bus, multiplicity column, andBitwiseOperationTypevariant are removed.DEV-2 — Make
limb_shift[3]virtual:Only
limb_shift_raw[0..2]are stored as auxiliary columns.limb_shift[3]is derived as1 - limb_shift_raw[0] - limb_shift_raw[1] - limb_shift_raw[2]wherever needed, reducing the column count from 27 to 26.