From f94d7733365e0bdcdac4276e979ffc7bbfc4925f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Tue, 22 May 2018 11:18:35 +0200 Subject: Combined all AES round operations into a single operation for a round. --- src/tb/tb_aes.v | 1 + src/tb/tb_aes_decipher_block.v | 5 ++--- src/tb/tb_aes_encipher_block.v | 9 +++------ 3 files changed, 6 insertions(+), 9 deletions(-) (limited to 'src/tb') diff --git a/src/tb/tb_aes.v b/src/tb/tb_aes.v index bd51ec8..35fc1d9 100644 --- a/src/tb/tb_aes.v +++ b/src/tb/tb_aes.v @@ -305,6 +305,7 @@ module tb_aes(); end endtask // read_word + //---------------------------------------------------------------- // wait_ready // diff --git a/src/tb/tb_aes_decipher_block.v b/src/tb/tb_aes_decipher_block.v index 0475cf5..13b9949 100644 --- a/src/tb/tb_aes_decipher_block.v +++ b/src/tb/tb_aes_decipher_block.v @@ -158,10 +158,9 @@ module tb_aes_decipher_block(); $display("Internal data values"); $display("round_key = 0x%016x", dut.round_key); - $display("block_w0_reg = 0x%08x, block_w1_reg = 0x%08x, block_w2_reg = 0x%08x, block_w3_reg = 0x%08x", - dut.block_w0_reg, dut.block_w1_reg, dut.block_w2_reg, dut.block_w3_reg); + $display("block_reg = 0x%016x", dut.block_reg); $display(""); - $display("old_block = 0x%08x", dut.round_logic.old_block); + $display("subbytes_block = 0x%08x", dut.round_logic.subbytes_block); $display("inv_shiftrows_block = 0x%08x", dut.round_logic.inv_shiftrows_block); $display("inv_mixcolumns_block = 0x%08x", dut.round_logic.inv_mixcolumns_block); $display("addkey_block = 0x%08x", dut.round_logic.addkey_block); diff --git a/src/tb/tb_aes_encipher_block.v b/src/tb/tb_aes_encipher_block.v index 87bab2c..0606d95 100644 --- a/src/tb/tb_aes_encipher_block.v +++ b/src/tb/tb_aes_encipher_block.v @@ -159,18 +159,15 @@ module tb_aes_encipher_block(); $display("Internal data values"); $display("round_key = 0x%016x", dut.round_key); - $display("block_w0_reg = 0x%08x, block_w1_reg = 0x%08x, block_w2_reg = 0x%08x, block_w3_reg = 0x%08x", - dut.block_w0_reg, dut.block_w1_reg, dut.block_w2_reg, dut.block_w3_reg); + $display("block_reg = 0x%016x", dut.block_reg); $display(""); - $display("old_block = 0x%08x", dut.round_logic.old_block); + $display("subbytes_block = 0x%08x", dut.round_logic.subbytes_block); $display("shiftrows_block = 0x%08x", dut.round_logic.shiftrows_block); $display("mixcolumns_block = 0x%08x", dut.round_logic.mixcolumns_block); $display("addkey_init_block = 0x%08x", dut.round_logic.addkey_init_block); $display("addkey_main_block = 0x%08x", dut.round_logic.addkey_main_block); $display("addkey_final_block = 0x%08x", dut.round_logic.addkey_final_block); - $display("block_w0_new = 0x%08x, block_w1_new = 0x%08x, block_w2_new = 0x%08x, block_w3_new = 0x%08x", - dut.block_new[127 : 096], dut.block_new[095 : 064], - dut.block_new[063 : 032], dut.block_new[031 : 000]); + $display("block_new = 0x%08x", dut.block_new); $display(""); end endtask // dump_dut_state -- cgit v1.2.3