diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-11-08 13:00:40 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-11-08 13:29:23 -0600 |
| commit | f6929f9a4703e3eee9d7bd9752de055729cdd498 (patch) | |
| tree | 770acb4f96fd16e0f12bec2c5ed5cfdfa5a4c315 /rtl/core/decode | |
| parent | 89a8edd4bb96787c69118dd5f549345015b2d480 (diff) | |
Register decode output in a new porch stage
Diffstat (limited to '')
| -rw-r--r-- | rtl/core/decode/decode.sv | 12 | ||||
| -rw-r--r-- | rtl/core/decode/mux.sv | 16 | ||||
| -rw-r--r-- | rtl/core/porch/conds.sv (renamed from rtl/core/decode/conds.sv) | 6 |
3 files changed, 9 insertions, 25 deletions
diff --git a/rtl/core/decode/decode.sv b/rtl/core/decode/decode.sv index ab8d2b9..6c5b802 100644 --- a/rtl/core/decode/decode.sv +++ b/rtl/core/decode/decode.sv @@ -4,7 +4,6 @@ module core_decode ( input word insn, - input psr_flags flags, output insn_decode dec ); @@ -51,17 +50,6 @@ module core_decode //TODO logic restore_spsr; - logic cond_undefined, cond_execute, explicit_cond; - - core_decode_conds conds - ( - .cond(insn `FIELD_COND), - .execute(cond_execute), - .undefined(cond_undefined), - .conditional(explicit_cond), - .* - ); - logic snd_is_imm, snd_ror_if_imm, snd_shift_by_reg_if_reg, snd_undefined; snd_decode snd; diff --git a/rtl/core/decode/mux.sv b/rtl/core/decode/mux.sv index 643c942..ebcc098 100644 --- a/rtl/core/decode/mux.sv +++ b/rtl/core/decode/mux.sv @@ -5,10 +5,6 @@ module core_decode_mux ( input word insn, - input logic cond_undefined, - cond_execute, - explicit_cond, - input logic branch_link, input snd_decode snd, @@ -74,10 +70,10 @@ module core_decode_mux ldst = 0; branch = 0; coproc = 0; - execute = cond_execute; - undefined = cond_undefined; + execute = 1; + undefined = 0; writeback = 0; - conditional = explicit_cond; + conditional = 0; restore_spsr = 0; spsr = 0; @@ -139,8 +135,8 @@ module core_decode_mux update_flags = data_update_flags; restore_spsr = data_restore_spsr; - undefined = undefined | snd_undefined; - conditional = conditional | data_conditional; + undefined = snd_undefined; + conditional = data_conditional; end `GROUP_LDST_SINGLE_IMM, `GROUP_LDST_SINGLE_REG: begin @@ -152,7 +148,7 @@ module core_decode_mux dec_ldst = ldst_single; ldst_addr = ldst_single; - undefined = undefined | snd_undefined; + undefined = snd_undefined; end `GROUP_LDST_MISC_IMM, `GROUP_LDST_MISC_REG: diff --git a/rtl/core/decode/conds.sv b/rtl/core/porch/conds.sv index 60922a0..b8db1e7 100644 --- a/rtl/core/decode/conds.sv +++ b/rtl/core/porch/conds.sv @@ -1,9 +1,9 @@ `include "core/decode/isa.sv" `include "core/uarch.sv" -module core_decode_conds +module core_porch_conds ( - input logic[3:0] cond, + input word insn, input psr_flags flags, output logic execute, @@ -15,7 +15,7 @@ module core_decode_conds undefined = 0; conditional = 1; - unique case(cond) + unique case(insn `FIELD_COND) `COND_EQ: execute = flags.z; `COND_NE: execute = ~flags.z; `COND_HS: execute = flags.c; |
