aboutsummaryrefslogtreecommitdiff
path: root/src/tb
diff options
context:
space:
mode:
authorJoachim StroĢˆmbergson <joachim@secworks.se>2015-07-16 20:23:50 +0200
committerJoachim StroĢˆmbergson <joachim@secworks.se>2015-07-16 20:23:50 +0200
commite2902eec1ecb50a1344e63f06183d6fac46e9485 (patch)
treeac2b21f95bd3473853600e0b8b1e0d4ee3f7be2c /src/tb
parentfcdc0b38cdfa19ccaaffd49d8c721f1428ec18ba (diff)
Adding a task to dump the H state.
Diffstat (limited to 'src/tb')
-rw-r--r--src/tb/tb_sha256_core.v17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tb/tb_sha256_core.v b/src/tb/tb_sha256_core.v
index 5fef6cf..5527bf5 100644
--- a/src/tb/tb_sha256_core.v
+++ b/src/tb/tb_sha256_core.v
@@ -196,6 +196,22 @@ module tb_sha256_core();
//----------------------------------------------------------------
+ // dump_H_state()
+ //
+ // Dump the state of the H registers when needed.
+ //----------------------------------------------------------------
+ task dump_H_state();
+ begin
+ $display("H0_reg = 0x%08x, H1_reg = 0x%08x, H2_reg = 0x%08x, H3_reg = 0x%08x",
+ dut.H0_reg, dut.H1_reg, dut.H2_reg, dut.H3_reg);
+ $display("H4_reg = 0x%08x, H5_reg = 0x%08x, H6_reg = 0x%08x, H7_reg = 0x%08x",
+ dut.H4_reg, dut.H5_reg, dut.H6_reg, dut.H7_reg);
+ $display("");
+ end
+ endtask // dump_H_state
+
+
+ //----------------------------------------------------------------
// reset_dut()
//
// Toggle reset to put the DUT into a well known state.
@@ -447,6 +463,7 @@ module tb_sha256_core();
tb_state7_we = 0;
#(CLK_PERIOD);
+ dump_H_state();
$display("*** TC %0d block started.", tc_number);
tb_block = block;