[Cryptech-Commits] [user/js/keywrap] 02/02: Adding task to dump parts of the contents of the serial memory.

git at cryptech.is git at cryptech.is
Fri Nov 23 09:34:49 UTC 2018


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

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

commit 88d1cb6b6cc58050b406bb0d5134d727d4eca684
Author: Joachim StroĢˆmbergson <joachim at secworks.se>
AuthorDate: Fri Nov 23 10:34:14 2018 +0100

    Adding task to dump parts of the contents of the serial memory.
---
 src/tb/tb_keywrap_mkmif.v | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/src/tb/tb_keywrap_mkmif.v b/src/tb/tb_keywrap_mkmif.v
index 06e3356..55305ff 100644
--- a/src/tb/tb_keywrap_mkmif.v
+++ b/src/tb/tb_keywrap_mkmif.v
@@ -167,6 +167,26 @@ module tb_keywrap_mkmif();
     end
 
 
+  //----------------------------------------------------------------
+  // dump_mem
+  //
+  // Dump the contents of the memory model.
+  //----------------------------------------------------------------
+  task dump_mem;
+    begin : dump_mem
+      integer i;
+
+      $display("Contents of the first 256 bytes in the serial memory:");
+      for (i = 0 ; i < 256 ; i = i + 8)
+        $display("0x%01x 0x%01x 0x%01x 0x%01x 0x%01x 0x%01x 0x%01x 0x%01x",
+                 mem.MemoryBlock[i],     mem.MemoryBlock[i + 1],
+                 mem.MemoryBlock[i + 2], mem.MemoryBlock[i + 3],
+                 mem.MemoryBlock[i + 4], mem.MemoryBlock[i + 5],
+                 mem.MemoryBlock[i + 6], mem.MemoryBlock[i + 7]);
+    end
+  endtask // dump_mem
+
+
   //----------------------------------------------------------------
   // init_sim()
   //
@@ -301,8 +321,10 @@ module tb_keywrap_mkmif();
 
       init_sim();
       reset_dut();
+      dump_mem();
       test_init_mem();
       test_write_status();
+      dump_mem();
 
       $display("");
       $display("*** Keywrap mkmif integration testbench done. ***");



More information about the Commits mailing list