aboutsummaryrefslogtreecommitdiff
path: root/src/tb/tb_sha256_core.v
diff options
context:
space:
mode:
authorJoachim StroĢˆmbergson <joachim@secworks.se>2016-05-31 14:00:00 +0200
committerJoachim StroĢˆmbergson <joachim@secworks.se>2016-05-31 14:00:00 +0200
commitdc47fffe47a1fc49ad79e4201f219c8a697b7ae5 (patch)
tree581058cea1d58978871636e66e48787f545e38cc /src/tb/tb_sha256_core.v
parent0e90cfa1f076b8660610dfd3930ef1b37a1fb41e (diff)
Adding functionality to support both SHA224 and SHA256 digest modes. Note: This update changes the ADDR_CTRL API register since it adds a mode bit. The version major number has been bumped to reflect this API change. The top level testbench contains tests for SHA224 as well as old tests for SHA256. The core level tb still only tests SHA256.
Diffstat (limited to 'src/tb/tb_sha256_core.v')
-rw-r--r--src/tb/tb_sha256_core.v3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tb/tb_sha256_core.v b/src/tb/tb_sha256_core.v
index 07e2334..981351c 100644
--- a/src/tb/tb_sha256_core.v
+++ b/src/tb/tb_sha256_core.v
@@ -68,6 +68,7 @@ module tb_sha256_core();
reg tb_reset_n;
reg tb_init;
reg tb_next;
+ reg tb_mode;
reg [511 : 0] tb_block;
reg [31 : 0] tb_state_wr_data;
reg tb_state0_we;
@@ -92,6 +93,7 @@ module tb_sha256_core();
.init(tb_init),
.next(tb_next),
+ .mode(tb_mode),
.block(tb_block),
@@ -244,6 +246,7 @@ module tb_sha256_core();
tb_init = 0;
tb_next = 0;
+ tb_mode = 1;
tb_block = 512'h0;
tb_state_wr_data = 32'h0;
tb_state0_we = 0;