Skip to content

Extract extend module from instruction decoder - #272

Draft
briann-bui wants to merge 3 commits into
UTOSS:mainfrom
briann-bui:refactor/extract-extend
Draft

Extract extend module from instruction decoder#272
briann-bui wants to merge 3 commits into
UTOSS:mainfrom
briann-bui:refactor/extract-extend

Conversation

@briann-bui

Copy link
Copy Markdown

What changed

  • extracted immediate-generation logic into a standalone extend module
  • kept the Instruction_Decode interface and behavior unchanged
  • added a dedicated testbench for I, S, B, J, and U-type immediates

Why

This keeps immediate generation separate from instruction decoding and brings the implementation closer to the canonical processor structure described in the project issue.

Impact

This is a structural refactor. Existing decoder consumers continue to receive the same imm_ext output.

Validation

  • all 10 SystemVerilog testbenches pass with Verilator
  • the new extend_tb covers positive and negative immediates, alignment bits, U-type immediates, and the default case
  • RV32I and RV32IB Verilator lint/elaboration pass for the changed design (excluding a pre-existing UNUSEDLOOP warning in zbb.sv)

Closes #186

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.

Extract the extend module from the instruction decoder

1 participant