diff options
-rw-r--r-- | src/tb/tb_sha256_core.v | 17 |
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; |