From 4ebdf3e80842e38906d85badbbaf25435aa85677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Tue, 4 Dec 2018 13:20:17 +0100 Subject: Added reg on output from w_mem to split long path. Adjusted when w_next is set to update w_mem to account for delay cycle. --- src/rtl/sha512_core.v | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/rtl/sha512_core.v') diff --git a/src/rtl/sha512_core.v b/src/rtl/sha512_core.v index 407f84c..6f6f821 100644 --- a/src/rtl/sha512_core.v +++ b/src/rtl/sha512_core.v @@ -79,12 +79,11 @@ module sha512_core( //---------------------------------------------------------------- // Internal constant and parameter definitions. //---------------------------------------------------------------- - parameter SHA512_ROUNDS = 79; - - parameter CTRL_IDLE = 0; - parameter CTRL_T1_T2 = 1; - parameter CTRL_ROUNDS = 2; - parameter CTRL_DONE = 3; + localparam SHA512_ROUNDS = 79; + localparam CTRL_IDLE = 0; + localparam CTRL_T1_T2 = 1; + localparam CTRL_ROUNDS = 2; + localparam CTRL_DONE = 3; //---------------------------------------------------------------- @@ -634,7 +633,8 @@ module sha512_core( CTRL_T1_T2: begin - t1_t2_we = 1; + t1_t2_we = 1; + w_next = 1; sha512_ctrl_new = CTRL_ROUNDS; sha512_ctrl_we = 1; end @@ -642,7 +642,6 @@ module sha512_core( CTRL_ROUNDS: begin - w_next = 1; state_update = 1; round_ctr_inc = 1; -- cgit v1.2.3