From b26c895262006d482c5371b35d1b16c5e164e2be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Tue, 3 Jul 2018 18:53:15 +0200 Subject: 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(-) (limited to 'src/tb') 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. -- cgit v1.2.3