[Cryptech-Commits] [user/js/keywrap] branch master updated: Add support to dump contents of memory to check that data has been written correctly.

git at cryptech.is git at cryptech.is
Tue Jul 3 09:18:20 UTC 2018


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

joachim at secworks.se pushed a commit to branch master
in repository user/js/keywrap.

The following commit(s) were added to refs/heads/master by this push:
     new c874d87  Add support to dump contents of memory to check that data has been written correctly.
c874d87 is described below

commit c874d87b9a4c78a8dd42f4fe860d10a4461bb8b7
Author: Joachim Strömbergson <joachim at secworks.se>
AuthorDate: Tue Jul 3 11:13:54 2018 +0200

    Add support to dump contents of memory to check that data has been written correctly.
---
 src/tb/tb_keywrap.v | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

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
@@ -140,6 +140,21 @@ module tb_keywrap();
     end
 
 
+  //----------------------------------------------------------------
+  // 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()
   //
@@ -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);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Commits mailing list