diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/rtl/sha1_core.v | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/rtl/sha1_core.v b/src/rtl/sha1_core.v index 6c026da..22f8cc2 100644 --- a/src/rtl/sha1_core.v +++ b/src/rtl/sha1_core.v @@ -65,7 +65,8 @@ module sha1_core( parameter CTRL_IDLE = 0; parameter CTRL_ROUNDS = 1; - parameter CTRL_DONE = 2; + parameter CTRL_DIGEST = 2; + parameter CTRL_DONE = 3; //---------------------------------------------------------------- @@ -413,15 +414,19 @@ module sha1_core( if (round_ctr_reg == SHA1_ROUNDS) begin - sha1_ctrl_new = CTRL_DONE; + sha1_ctrl_new = CTRL_DIGEST; sha1_ctrl_we = 1; end end + CTRL_DIGEST: + begin + digest_update = 1; + sha1_ctrl_new = CTRL_DONE; + sha1_ctrl_we = 1; CTRL_DONE: begin - digest_update = 1; digest_valid_new = 1; digest_valid_we = 1; sha1_ctrl_new = CTRL_IDLE; |