aboutsummaryrefslogtreecommitdiff
path: root/src/rtl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtl')
-rw-r--r--src/rtl/keywrap_core.v46
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