diff options
author | Joachim StroĢmbergson <joachim@secworks.se> | 2018-09-14 15:01:59 +0200 |
---|---|---|
committer | Joachim StroĢmbergson <joachim@secworks.se> | 2018-09-14 15:01:59 +0200 |
commit | fa3ebe9f36310af061aba162713676b548555017 (patch) | |
tree | 9f0061951f9c0b8f3aface68c5129d432c647828 /src/tb/tb_keywrap_core.v | |
parent | 6cfcc1ec5bc0e2c944ec66bd62d58740d2b8823d (diff) |
Adding support for automatic A-value and RLEN calculation. Adding support for checking that unwrapped data is valid.auto_magic
Diffstat (limited to 'src/tb/tb_keywrap_core.v')
-rw-r--r-- | src/tb/tb_keywrap_core.v | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tb/tb_keywrap_core.v b/src/tb/tb_keywrap_core.v index 17c8f30..2b88b8c 100644 --- a/src/tb/tb_keywrap_core.v +++ b/src/tb/tb_keywrap_core.v @@ -48,7 +48,7 @@ module tb_keywrap_core(); parameter CLK_PERIOD = 2 * CLK_HALF_PERIOD; parameter API_ADDR_BITS = 8; - parameter RLEN_BITS = API_ADDR_BITS - 1; + parameter LEN_BITS = API_ADDR_BITS + 2; parameter CORE_ADDR_BITS = API_ADDR_BITS - 1; parameter API_ADDR_MAX = (2 ** API_ADDR_BITS) - 1; parameter CORE_ADDR_MAX = (2 ** CORE_ADDR_BITS) - 1; @@ -67,7 +67,7 @@ module tb_keywrap_core(); reg tb_encdec; wire tb_ready; wire tb_valid; - reg [(RLEN_BITS - 1) : 0] tb_rlen; + reg [(LEN_BITS - 1) : 0] tb_length; reg [255 : 0] tb_key; reg tb_keylen; reg [63 : 0] tb_a_init; @@ -93,7 +93,7 @@ module tb_keywrap_core(); .ready(tb_ready), .valid(tb_valid), - .rlen(tb_rlen), + .length(tb_length), .key(tb_key), .keylen(tb_keylen), @@ -150,7 +150,7 @@ module tb_keywrap_core(); tb_init = 0; tb_next = 0; tb_encdec = 0; - tb_rlen = 13'h0; + tb_length = {LEN_BITS{1'h0}}; tb_key = 256'h0; tb_keylen = 0; tb_a_init = 64'h0; |