diff options
author | Joachim StroĢmbergson <joachim@secworks.se> | 2018-04-25 18:13:04 +0200 |
---|---|---|
committer | Joachim StroĢmbergson <joachim@secworks.se> | 2018-04-25 18:13:04 +0200 |
commit | 4a5429f8005ee820a8fa37f6ad09262a3201a129 (patch) | |
tree | d462a2a3894a28b44619694330af81440eb5b4b5 /src/rtl/sha512_core.v | |
parent | 259db74b04fbc1489dbbe5fcb0dc4ac289a162cd (diff) |
Added pipeline cycle for t1 and t2 calculations. Updated and cleaned up the W message block scheduler to work with pipeline stage. And be less complex.
Diffstat (limited to 'src/rtl/sha512_core.v')
-rw-r--r-- | src/rtl/sha512_core.v | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rtl/sha512_core.v b/src/rtl/sha512_core.v index e855f76..407f84c 100644 --- a/src/rtl/sha512_core.v +++ b/src/rtl/sha512_core.v @@ -498,11 +498,11 @@ module sha512_core( if (state_update) begin - a_new = t1_new + t2_new; + a_new = t1_reg + t2_reg; b_new = a_reg; c_new = b_reg; d_new = c_reg; - e_new = d_reg + t1_new; + e_new = d_reg + t1_reg; f_new = e_reg; g_new = f_reg; h_new = g_reg; @@ -652,8 +652,14 @@ module sha512_core( sha512_ctrl_new = CTRL_DONE; sha512_ctrl_we = 1; end + else + begin + sha512_ctrl_new = CTRL_T1_T2; + sha512_ctrl_we = 1; + end end + CTRL_DONE: begin if ((work_factor) && (!work_factor_ctr_done)) |