[Cryptech-Commits] [core/util/keywrap] 41/95: Adding more dump outputs. wrap does not yet work, but one can see when things go bad and where the isssues are.

git at cryptech.is git at cryptech.is
Wed Mar 25 17:18:40 UTC 2020


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

paul at psgd.org pushed a commit to branch master
in repository core/util/keywrap.

commit b26c895262006d482c5371b35d1b16c5e164e2be
Author: Joachim Strömbergson <joachim at secworks.se>
AuthorDate: Tue Jul 3 18:53:15 2018 +0200

    Adding more dump outputs. wrap does not yet work, but one can see when things go bad and where the isssues are.
---
 src/tb/tb_keywrap.v | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/tb/tb_keywrap.v b/src/tb/tb_keywrap.v
index aac3656..32526db 100644
--- a/src/tb/tb_keywrap.v
+++ b/src/tb/tb_keywrap.v
@@ -260,7 +260,19 @@ module tb_keywrap();
           $display("rlen   = 0x%0x", dut.core.rlen);
           $display("key    = 0x%0x", dut.core.key);
           $display("a_init = 0x%0x  a_result = 0x%0x", dut.core.a_init, dut.core.a_result);
-          $display("a_reg  = 0x%0x", dut.core.a_reg);
+          $display("");
+
+          $display("update_state = 0x%0x", dut.core.update_state);
+          $display("a_reg  = 0x%0x  a_new = 0x%0x  a_we = 0x%0x",
+                   dut.core.a_reg, dut.core.a_new, dut.core.a_we);
+          $display("aes_block = 0x%0x  aes_result = 0x%0x",
+                   dut.core.aes_block, dut.core.aes_result);
+          $display("core_we = 0x%0x  core_addr = 0x%0x",
+                   dut.core.core_we, dut.core.block_ctr_reg);
+          $display("core_rd_data = 0x%0x  core_wr_data = 0x%0x ",
+                   dut.core.core_rd_data, dut.core.core_wr_data);
+          $display("");
+
           $display("block_ctr_reg = 0x%0x  iteration_ctr_reg = 0x%0x",
                    dut.core.block_ctr_reg, dut.core.iteration_ctr_reg);
           $display("keywrap_core_ctrl_reg = 0x%0x", dut.core.keywrap_core_ctrl_reg);
@@ -366,17 +378,17 @@ module tb_keywrap();
 
 
       // Write the R blocks to be processed.
-      write_word(ADDR_WRITE_DATA, 32'hcdda4200);
       write_word(ADDR_WRITE_DATA, 32'h46f87f58);
+      write_word(ADDR_WRITE_DATA, 32'hcdda4200);
 
-      write_word(ADDR_WRITE_DATA, 32'h2e49bdb7);
       write_word(ADDR_WRITE_DATA, 32'hf53d99ce);
+      write_word(ADDR_WRITE_DATA, 32'h2e49bdb7);
 
-      write_word(ADDR_WRITE_DATA, 32'he0cd4d0b);
       write_word(ADDR_WRITE_DATA, 32'h6212511f);
+      write_word(ADDR_WRITE_DATA, 32'he0cd4d0b);
 
-      write_word(ADDR_WRITE_DATA, 32'h45a28800);
       write_word(ADDR_WRITE_DATA, 32'h5f37a27d);
+      write_word(ADDR_WRITE_DATA, 32'h45a28800);
 
       // Write magic words to the A state regs.
       // Also set the rlen.



More information about the Commits mailing list