From e2902eec1ecb50a1344e63f06183d6fac46e9485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Thu, 16 Jul 2015 20:23:50 +0200 Subject: Adding a task to dump the H state. --- src/tb/tb_sha256_core.v | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/tb') 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 @@ -195,6 +195,22 @@ module tb_sha256_core(); endtask // dump_dut_state + //---------------------------------------------------------------- + // 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() // @@ -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; -- cgit v1.2.3