aboutsummaryrefslogtreecommitdiff
path: root/src/rtl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtl')
-rw-r--r--src/rtl/sha1.v18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/rtl/sha1.v b/src/rtl/sha1.v
index 9a112b0..c1fd8ec 100644
--- a/src/rtl/sha1.v
+++ b/src/rtl/sha1.v
@@ -195,13 +195,16 @@ module sha1(
begin
if (we)
begin
- if ((address >= ADDR_BLOCK0) && (address <= ADDR_BLOCK15))
- block_we = 1;
-
- if (address == ADDR_CTRL)
+ if (core_ready)
begin
- init_new = write_data[CTRL_INIT_BIT];
- next_new = write_data[CTRL_NEXT_BIT];
+ if ((address >= ADDR_BLOCK0) && (address <= ADDR_BLOCK15))
+ block_we = 1;
+
+ if (address == ADDR_CTRL)
+ begin
+ init_new = write_data[CTRL_INIT_BIT];
+ next_new = write_data[CTRL_NEXT_BIT];
+ end
end
end // if (write_read)
else
@@ -210,7 +213,8 @@ module sha1(
tmp_read_data = block_reg[address[3 : 0]];
if ((address >= ADDR_DIGEST0) && (address <= ADDR_DIGEST4))
- tmp_read_data = digest_reg[(4 - (address - ADDR_DIGEST0)) * 32 +: 32];
+ if (core_ready)
+ tmp_read_data = digest_reg[(4 - (address - ADDR_DIGEST0)) * 32 +: 32];
case (address)
// Read operations.