diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-11-15 21:37:16 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-11-15 21:37:20 -0600 |
| commit | 84e9a917a31f39eaf333d1fc69b30d13e7640c7a (patch) | |
| tree | 93b8015a9295f426af9ff1f34d0e2312b0584bd8 /rtl/core | |
| parent | 2b457b34b842e0e2fa6236b304860ad3ba474b16 (diff) | |
Fix shr carry bug
Diffstat (limited to 'rtl/core')
| -rw-r--r-- | rtl/core/shifter.sv | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rtl/core/shifter.sv b/rtl/core/shifter.sv index 2b5739d..96b8866 100644 --- a/rtl/core/shifter.sv +++ b/rtl/core/shifter.sv @@ -35,7 +35,7 @@ module core_shifter if(ctrl.ror) {c, q} = {c_ror, q_ror}; else if(ctrl.shr) - {c, q} = {c_shr, q_shr[W - 1] | (ctrl.put_carry & c_in), q_shr[W - 2:0]}; + {c, q} = {c_shr, q_shr[W - 1] | (ctrl.put_carry && c_in && shift != 0), q_shr[W - 2:0]}; else {c, q} = {c_shl, q_shl}; |
