Skip to content

feat: copy rv32 base_alu, shift, mul, divrem to base_alu_w, shift_w, mul_w, divrem_w#2483

Merged
shuklaayush merged 2 commits intodevelop-v1.8.0from
rv64-word-opcode-copy-existing-modules
Apr 17, 2026
Merged

feat: copy rv32 base_alu, shift, mul, divrem to base_alu_w, shift_w, mul_w, divrem_w#2483
shuklaayush merged 2 commits intodevelop-v1.8.0from
rv64-word-opcode-copy-existing-modules

Conversation

@876pol
Copy link
Copy Markdown
Contributor

@876pol 876pol commented Mar 4, 2026

Towards INT-6340, INT-6341, INT-6342, INT-6343.

This PR copies the RV32 base_alu, shift, mul, and divrem modules into new base_alu_w, shift_w, mul_w, and divrem_w modules. These copies will serve as the starting point for implementing the RV64 32-bit word instruction variants.

@876pol 876pol marked this pull request as ready for review April 16, 2026 18:33
Resolves INT-6340, INT-6343.

Summary:
- `base_alu_w` and `shift_w` reuse the existing generic core AIRs
(`BaseAluCoreAir<RV64_WORD_NUM_LIMBS, RV64_CELL_BITS>` and
`ShiftCoreAir<RV64_WORD_NUM_LIMBS, RV64_CELL_BITS>`) via type aliases,
eliminating the need for duplicated core code.
- A new `Rv64BaseAluWAdapter` (`alu_w.rs`) bridges 64-bit register
memory with the 4-byte core interface: it reads full 8-byte registers
but only passes the low 4 bytes to the core, and sign-extends the 4-byte
core output back to 8 bytes on write.
- The test suite is largely carried over from the original RV32 code and
primarily exercises the reused core AIR logic rather than the newly
written adapter.

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Ayush Shukla <shuklaayush@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@shuklaayush shuklaayush merged commit eedf899 into develop-v1.8.0 Apr 17, 2026
4 of 54 checks passed
@shuklaayush shuklaayush deleted the rv64-word-opcode-copy-existing-modules branch April 17, 2026 20:48
shuklaayush added a commit that referenced this pull request Apr 17, 2026
…mul_w, divrem_w (#2483)

Towards INT-6340, INT-6341, INT-6342, INT-6343.

This PR copies the RV32 `base_alu`, `shift`, `mul`, and `divrem` modules
into new `base_alu_w`, `shift_w`, `mul_w`, and `divrem_w` modules. These
copies will serve as the starting point for implementing the RV64 32-bit
word instruction variants.

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Ayush Shukla <shuklaayush@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants