aboutsummaryrefslogtreecommitdiff
path: root/src/rtl/sha256_core.v
diff options
context:
space:
mode:
authorJoachim StroĢˆmbergson <joachim@secworks.se>2014-02-22 08:07:35 +0100
committerJoachim StroĢˆmbergson <joachim@secworks.se>2014-02-22 08:07:35 +0100
commitc6e33cb7819fab39cb29789914a311cda6a47068 (patch)
tree635e62c6115620b650dc7c94d3e8275a25aa3e9e /src/rtl/sha256_core.v
parent7340c6e798937b8444344131801e54cb2f27365b (diff)
Changed W-memory into sliding window. This also affected interface and integration in the core.
Diffstat (limited to 'src/rtl/sha256_core.v')
-rw-r--r--src/rtl/sha256_core.v12
1 files changed, 7 insertions, 5 deletions
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;