diff options
author | Joachim StroĢmbergson <joachim@assured.se> | 2019-01-17 12:26:41 +0100 |
---|---|---|
committer | Joachim StroĢmbergson <joachim@assured.se> | 2019-01-17 12:26:41 +0100 |
commit | 5827799dd22a582c304142e5fa63add4ca92b065 (patch) | |
tree | 9ce7916ac35078c755118346e18d6864b2254787 /src/rtl | |
parent | 4b8d7ab1c473653d79c2d6e5d6409a502df15fb6 (diff) |
Debugging keywrap after auto_zeroise. Now the core starts processing as expected.
Diffstat (limited to 'src/rtl')
-rw-r--r-- | src/rtl/keywrap_core.v | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/src/rtl/keywrap_core.v b/src/rtl/keywrap_core.v index 5a6f953..b084363 100644 --- a/src/rtl/keywrap_core.v +++ b/src/rtl/keywrap_core.v @@ -460,32 +460,30 @@ module keywrap_core #(parameter MEM_BITS = 11) key_timeout_ctr_dec = 1'h1; end end - else + + if (init) begin - if (init) - begin - aes_init = 1'h1; - ready_new = 1'h0; - ready_we = 1'h1; - valid_new = 1'h0; - valid_we = 1'h1; - keywrap_core_ctrl_new = CTRL_INIT_WAIT; - keywrap_core_ctrl_we = 1'h1; - end + aes_init = 1'h1; + ready_new = 1'h0; + ready_we = 1'h1; + valid_new = 1'h0; + valid_we = 1'h1; + keywrap_core_ctrl_new = CTRL_INIT_WAIT; + keywrap_core_ctrl_we = 1'h1; + end - if (next) - begin - ready_new = 1'h0; - ready_we = 1'h1; - valid_new = 1'h0; - valid_we = 1'h1; - init_a = 1'h1; - if (encdec) - keywrap_core_ctrl_new = CTRL_NEXT_WSTART; - else - keywrap_core_ctrl_new = CTRL_NEXT_USTART; - keywrap_core_ctrl_we = 1'h1; - end + if (next) + begin + ready_new = 1'h0; + ready_we = 1'h1; + valid_new = 1'h0; + valid_we = 1'h1; + init_a = 1'h1; + if (encdec) + keywrap_core_ctrl_new = CTRL_NEXT_WSTART; + else + keywrap_core_ctrl_new = CTRL_NEXT_USTART; + keywrap_core_ctrl_we = 1'h1; end end |