diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-10-02 13:23:22 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-10-02 13:23:22 -0600 |
| commit | 63ec42cc245b2da9ab97cc4eef6bbd21e08cde07 (patch) | |
| tree | 1b9fd482a6e3cee3eb2245a9d331669cf5e44b8c /rtl/core/cycles.sv | |
| parent | 97bc74277d0e9672a55552ed1cded66ecb7d317e (diff) | |
Split decoding of flexible second operand out of data instructions
Diffstat (limited to '')
| -rw-r--r-- | rtl/core/cycles.sv | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/rtl/core/cycles.sv b/rtl/core/cycles.sv index c32bff0..7cb65a3 100644 --- a/rtl/core/cycles.sv +++ b/rtl/core/cycles.sv @@ -8,6 +8,7 @@ module core_cycles dec_writeback, dec_update_flags, input ptr dec_branch_offset, + input snd_decode dec_snd, input data_decode dec_data, input ptr fetch_insn_pc, input psr_flags next_flags, @@ -109,27 +110,28 @@ module core_cycles if(dec_execute & ~bubble) begin bubble <= (dec_update_flags & update_flags) - | (final_writeback & ((rd == dec_data.rn) | (rd == dec_data.r_snd))); + | (final_writeback & ((rd == dec_data.rn) | (rd == dec_snd.r))); branch <= dec_branch; update_flags <= dec_update_flags; branch_target <= pc_visible + dec_branch_offset; - data_snd_is_imm <= dec_data.snd_is_imm; - data_snd_shift_by_reg <= dec_data.snd_shift_by_reg; - data_imm <= dec_data.imm; - data_shift_imm <= dec_data.shift_imm; - alu <= dec_data.op; - shifter.shl <= dec_data.shl; - shifter.shr <= dec_data.shr; - shifter.ror <= dec_data.ror; - shifter.put_carry <= dec_data.put_carry; - shifter.sign_extend <= dec_data.sign_extend; - ra <= dec_data.rn; - rb <= dec_data.r_snd; - r_shift <= dec_data.r_shift; + + data_snd_is_imm <= dec_snd.is_imm; + data_snd_shift_by_reg <= dec_snd.shift_by_reg; + data_imm <= dec_snd.imm; + data_shift_imm <= dec_snd.shift_imm; + + shifter.shl <= dec_snd.shl; + shifter.shr <= dec_snd.shr; + shifter.ror <= dec_snd.ror; + shifter.put_carry <= dec_snd.put_carry; + shifter.sign_extend <= dec_snd.sign_extend; + + rb <= dec_snd.r; + r_shift <= dec_snd.r_shift; c_in <= next_flags.c; final_rd <= dec_data.rd; |
