From c6e33cb7819fab39cb29789914a311cda6a47068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Sat, 22 Feb 2014 08:07:35 +0100 Subject: Changed W-memory into sliding window. This also affected interface and integration in the core. --- src/rtl/sha256_core.v | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/rtl/sha256_core.v') diff --git a/src/rtl/sha256_core.v b/src/rtl/sha256_core.v index bb7995e..5035954 100644 --- a/src/rtl/sha256_core.v +++ b/src/rtl/sha256_core.v @@ -144,7 +144,7 @@ module sha256_core( wire [31 : 0] k_data; reg w_init; - wire w_ready; + reg w_next; wire [31 : 0] w_data; @@ -161,12 +161,10 @@ module sha256_core( .clk(clk), .reset_n(reset_n), - .init(w_init), - .block(block), - .addr(t_ctr_reg), - .ready(w_ready), + .init(w_init), + .next(w_next), .w(w_data) ); @@ -408,6 +406,7 @@ module sha256_core( //---------------------------------------------------------------- // t_ctr + // // Update logic for the round counter, a monotonically // increasing counter with reset. //---------------------------------------------------------------- @@ -432,6 +431,7 @@ module sha256_core( //---------------------------------------------------------------- // sha256_ctrl_fsm + // // Logic for the state machine controlling the core behaviour. //---------------------------------------------------------------- always @* @@ -446,6 +446,7 @@ module sha256_core( ready_flag = 0; w_init = 0; + w_next = 0; t_ctr_inc = 0; t_ctr_rst = 0; @@ -490,6 +491,7 @@ module sha256_core( CTRL_ROUNDS: begin + w_next = 1; state_update = 1; t_ctr_inc = 1; -- cgit v1.2.3