aboutsummaryrefslogtreecommitdiff
path: root/src/tb
diff options
context:
space:
mode:
authorJoachim StroĢˆmbergson <joachim@secworks.se>2018-11-23 10:34:14 +0100
committerJoachim StroĢˆmbergson <joachim@secworks.se>2018-11-23 10:34:14 +0100
commit88d1cb6b6cc58050b406bb0d5134d727d4eca684 (patch)
tree8b1d1b166114b399545bd3a80ae2199253299ba4 /src/tb
parente3ce9cd91fe4da7917dd72920f0a9d0540831c37 (diff)
Adding task to dump parts of the contents of the serial memory.
Diffstat (limited to 'src/tb')
-rw-r--r--src/tb/tb_keywrap_mkmif.v22
1 files changed, 22 insertions, 0 deletions
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
@@ -168,6 +168,26 @@ module tb_keywrap_mkmif();
//----------------------------------------------------------------
+ // 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()
//
// Initialize all counters and testbed functionality as well
@@ -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. ***");