From e97d445908f39a3a1a215a824f52b283147e6195 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Sun, 2 Oct 2022 09:49:48 -0600 Subject: Major shifter-ALU redesign The shifter unit now works in parallel with the ALU and is no longer part of it. Instructions that use the shifter as input to the ALU will now take an additional cycle, unless the control unit can detect a "trivial shift" situation where the shifter's output will be the same as its input. This change improves Fmax substantially. --- rtl/core/decode/data.sv | 12 ++++++------ rtl/core/decode/decode.sv | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'rtl/core/decode') diff --git a/rtl/core/decode/data.sv b/rtl/core/decode/data.sv index 4dc51a4..a649440 100644 --- a/rtl/core/decode/data.sv +++ b/rtl/core/decode/data.sv @@ -3,13 +3,13 @@ module core_decode_data ( - input word insn, + input word insn, - output alu_decode decode, - output logic writeback, - update_flags, - restore_spsr, - undefined + output data_decode decode, + output logic writeback, + update_flags, + restore_spsr, + undefined ); alu_op op; diff --git a/rtl/core/decode/decode.sv b/rtl/core/decode/decode.sv index af80135..f7d7be8 100644 --- a/rtl/core/decode/decode.sv +++ b/rtl/core/decode/decode.sv @@ -6,13 +6,13 @@ module core_decode input word insn, input psr_flags flags, - output logic execute, - undefined, - writeback, - update_flags, - branch, - output ptr branch_offset, - output alu_decode alu + output logic execute, + undefined, + writeback, + update_flags, + branch, + output ptr branch_offset, + output data_decode data_ctrl ); logic cond_undefined; @@ -38,11 +38,11 @@ module core_decode logic restore_spsr; logic data_writeback, data_update_flags, data_undefined; - alu_decode data_alu; + data_decode data; core_decode_data group_data ( - .decode(data_alu), + .decode(data), .writeback(data_writeback), .update_flags(data_update_flags), .undefined(data_undefined), @@ -55,20 +55,20 @@ module core_decode branch = 0; writeback = 0; update_flags = 0; - alu = {($bits(alu)){1'bx}}; + data_ctrl = {($bits(data_ctrl)){1'bx}}; priority casez(insn `FIELD_OP) `GROUP_B: begin branch = 1; if(branch_link) begin - alu.rd = `R14; + data_ctrl.rd = `R14; writeback = 1; //TODO: Valor de LR end end `GROUP_ALU: begin - alu = data_alu; + data_ctrl = data; writeback = data_writeback; update_flags = data_update_flags; undefined = undefined | data_undefined; -- cgit v1.2.3