diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-10-15 23:33:34 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-10-15 23:33:34 -0600 |
| commit | d7747d9e030f965bd358bca5badb849f656147a8 (patch) | |
| tree | fa1ae553ea9d6b7f073d4386136ab676edcf50c5 /rtl/core/decode/conds.sv | |
| parent | 5b0872c995ddd7f581730ff9c7e145b5228e211d (diff) | |
Fix flags and writeback hazards
Diffstat (limited to '')
| -rw-r--r-- | rtl/core/decode/conds.sv | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/rtl/core/decode/conds.sv b/rtl/core/decode/conds.sv index 652760d..564ed27 100644 --- a/rtl/core/decode/conds.sv +++ b/rtl/core/decode/conds.sv @@ -5,12 +5,15 @@ module core_decode_conds ( input logic[3:0] cond, input psr_flags flags, + output logic execute, + conditional, undefined ); always_comb begin undefined = 0; + conditional = 1; unique case(cond) `COND_EQ: execute = flags.z; @@ -27,10 +30,15 @@ module core_decode_conds `COND_LT: execute = flags.n ^ flags.v; `COND_GT: execute = ~flags.z & (flags.n ~^ flags.v); `COND_LE: execute = flags.z | (flags.n ^ flags.v); - `COND_AL: execute = 1; + + `COND_AL: begin + execute = 1; + conditional = 0; + end `COND_UD: begin execute = 1'bx; + conditional = 1'bx; undefined = 1; end endcase |
