From 88d1cb6b6cc58050b406bb0d5134d727d4eca684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Fri, 23 Nov 2018 10:34:14 +0100 Subject: 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. ***"); -- cgit v1.2.3