aboutsummaryrefslogtreecommitdiff
path: root/src/tb
diff options
context:
space:
mode:
Diffstat (limited to 'src/tb')
-rw-r--r--src/tb/tb_keywrap.v17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tb/tb_keywrap.v b/src/tb/tb_keywrap.v
index 9c6fb56..04efa44 100644
--- a/src/tb/tb_keywrap.v
+++ b/src/tb/tb_keywrap.v
@@ -141,6 +141,21 @@ module tb_keywrap();
//----------------------------------------------------------------
+ // dump_mem()
+ //
+ // Dump the n first memory positions in the dut internal memory.
+ //----------------------------------------------------------------
+ task dump_mem(integer n);
+ begin : dump_mem
+ integer i;
+ for (i = 0 ; i < n ; i = i + 2)
+ $display("mem0[0x%06x] = 0x%08x mem1[0x%06x] = 0x%08x",
+ i, dut.core.mem.mem0[i], i, dut.core.mem.mem1[i]);
+ end
+ endtask // dump_mem
+
+
+ //----------------------------------------------------------------
// read_word()
//
// Read a data word from the given address in the DUT.
@@ -332,6 +347,8 @@ module tb_keywrap();
write_word(ADDR_WRITE_DATA, 32'h45a28800);
write_word(ADDR_WRITE_DATA, 32'h5f37a27d);
+ dump_mem(6);
+
// Start wrapping and wait for wrap to complete.
write_word(ADDR_CTRL, 32'h00000002);