From 156237ce5cd113bb3bb97abb02d6c3d962033d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Tue, 3 Jul 2018 14:28:30 +0200 Subject: Good news: The core peformcs all AES operations and stops after correct number of operations. Bad news: All values are wrong. --- src/rtl/keywrap.v | 2 +- src/rtl/keywrap_core.v | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/rtl') diff --git a/src/rtl/keywrap.v b/src/rtl/keywrap.v index edfd8c3..02a426c 100644 --- a/src/rtl/keywrap.v +++ b/src/rtl/keywrap.v @@ -266,7 +266,7 @@ module keywrap( config_we = 1'h1; if (address == ADDR_RLEN) - config_we = 1'h1; + rlen_we = 1'h1; if (address == ADDR_A0) a0_we = 1'h1; diff --git a/src/rtl/keywrap_core.v b/src/rtl/keywrap_core.v index d476152..59dbacb 100644 --- a/src/rtl/keywrap_core.v +++ b/src/rtl/keywrap_core.v @@ -82,8 +82,8 @@ module keywrap_core ( localparam CTRL_NEXT_WAIT0 = 4'h6; localparam CTRL_NEXT_WAIT = 4'h7; localparam CTRL_NEXT_UPDATE = 4'h9; - localparam CTRL_NEXT_CHECK = 4'h9; - localparam CTRL_NEXT_FINALIZE = 4'ha; + localparam CTRL_NEXT_CHECK = 4'ha; + localparam CTRL_NEXT_FINALIZE = 4'hb; //---------------------------------------------------------------- @@ -489,6 +489,7 @@ module keywrap_core ( ready_we = 1'h1; valid_new = 1'h1; valid_we = 1'h1; + api_addr_ctr_rst = 1'h1; keywrap_core_ctrl_new = CTRL_IDLE; keywrap_core_ctrl_we = 1'h1; end -- cgit v1.2.3