[Cryptech-Commits] [core/hash/sha256] 02/03: Adding a task to dump the H state.

git at cryptech.is git at cryptech.is
Thu Jul 16 22:11:34 UTC 2015


This is an automated email from the git hooks/post-receive script.

joachim at secworks.se pushed a commit to branch state_access
in repository core/hash/sha256.

commit e2902eec1ecb50a1344e63f06183d6fac46e9485
Author: Joachim Strömbergson <joachim at secworks.se>
Date:   Thu Jul 16 20:23:50 2015 +0200

    Adding a task to dump the H state.
---
 src/tb/tb_sha256_core.v | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

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;



More information about the Commits mailing list