diff options
author | Joachim StroĢmbergson <joachim@secworks.se> | 2018-04-24 18:23:59 +0200 |
---|---|---|
committer | Joachim StroĢmbergson <joachim@secworks.se> | 2018-04-24 18:23:59 +0200 |
commit | 259db74b04fbc1489dbbe5fcb0dc4ac289a162cd (patch) | |
tree | 3c0ac098f84efd4deeeec58686f24236e811883c | |
parent | 535625ac0d0cbf7b2d8831e023e2614ebee90ef0 (diff) |
Removed redundant code by fusing expression.
-rw-r--r-- | src/rtl/sha512_core.v | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/rtl/sha512_core.v b/src/rtl/sha512_core.v index 43ece2b..e855f76 100644 --- a/src/rtl/sha512_core.v +++ b/src/rtl/sha512_core.v @@ -656,24 +656,13 @@ module sha512_core( CTRL_DONE: begin - if (work_factor) + if ((work_factor) && (!work_factor_ctr_done)) begin - if (!work_factor_ctr_done) - begin - w_init = 1; - state_init = 1; - round_ctr_rst = 1; - sha512_ctrl_new = CTRL_T1_T2; - sha512_ctrl_we = 1; - end - else - begin - digest_update = 1; - digest_valid_new = 1; - digest_valid_we = 1; - sha512_ctrl_new = CTRL_IDLE; - sha512_ctrl_we = 1; - end + w_init = 1; + state_init = 1; + round_ctr_rst = 1; + sha512_ctrl_new = CTRL_T1_T2; + sha512_ctrl_we = 1; end else begin |