diff options
Diffstat (limited to 'rtl/core/decode/decode.sv')
| -rw-r--r-- | rtl/core/decode/decode.sv | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/rtl/core/decode/decode.sv b/rtl/core/decode/decode.sv index 9367e6d..2740b70 100644 --- a/rtl/core/decode/decode.sv +++ b/rtl/core/decode/decode.sv @@ -3,22 +3,25 @@ module core_decode ( - input word insn, - input psr_flags flags, - - output logic execute, - conditional, - undefined, - writeback, - update_flags, - uses_rn, - branch, - output ptr branch_offset, - output snd_decode snd_ctrl, - output data_decode data_ctrl, - output ldst_decode ldst_ctrl + input word insn, + input psr_flags flags, + + output datapath_decode ctrl, + output branch_decode branch_ctrl, + output snd_decode snd_ctrl, + output data_decode data_ctrl, + output ldst_decode ldst_ctrl ); + logic execute, undefined, conditional, writeback, update_flags, branch; + + assign ctrl.execute = execute; + assign ctrl.undefined = undefined; + assign ctrl.conditional = conditional; + assign ctrl.writeback = writeback; + assign ctrl.update_flags = update_flags; + assign branch_ctrl.branch = branch; + //TODO logic restore_spsr; @@ -50,13 +53,13 @@ module core_decode core_decode_branch group_branch ( .link(branch_link), - .offset(branch_offset), + .offset(branch_ctrl.offset), .* ); data_decode data; logic data_writeback, data_update_flags, data_restore_spsr, - data_is_imm, data_shift_by_reg_if_reg, data_uses_rn; + data_is_imm, data_shift_by_reg_if_reg; core_decode_data group_data ( @@ -66,7 +69,6 @@ module core_decode .restore_spsr(data_restore_spsr), .snd_is_imm(data_is_imm), .snd_shift_by_reg_if_reg(data_shift_by_reg_if_reg), - .uses_rn(data_uses_rn), .* ); @@ -117,11 +119,11 @@ module core_decode branch = 0; writeback = 0; update_flags = 0; - uses_rn = 1; execute = cond_execute; undefined = cond_undefined; data_ctrl = {($bits(data_ctrl)){1'bx}}; + data_ctrl.uses_rn = 1; snd_ctrl = {$bits(snd_ctrl){1'bx}}; snd_ctrl.shr = 0; @@ -152,7 +154,6 @@ module core_decode end `GROUP_ALU: begin - uses_rn = data_uses_rn; snd_is_imm = data_is_imm; snd_ror_if_imm = 1; snd_shift_by_reg_if_reg = data_shift_by_reg_if_reg; @@ -227,7 +228,6 @@ module core_decode execute = 0; branch = 1'bx; - uses_rn = 1'bx; writeback = 1'bx; conditional = 1'bx; update_flags = 1'bx; |
