[Cryptech-Commits] [core/util/keywrap] 24/95: Changed name in API for A words to clarify their meaning. Corrected case order in API logic.
git at cryptech.is
git at cryptech.is
Wed Mar 25 17:18:23 UTC 2020
This is an automated email from the git hooks/post-receive script.
paul at psgd.org pushed a commit to branch master
in repository core/util/keywrap.
commit fd6c91994c051744265730d8e88fb0855c5770fa
Author: Joachim Strömbergson <joachim at secworks.se>
AuthorDate: Fri Jun 29 10:00:05 2018 +0200
Changed name in API for A words to clarify their meaning. Corrected case order in API logic.
---
src/rtl/keywrap.v | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/rtl/keywrap.v b/src/rtl/keywrap.v
index 41f3bd5..3c3ddc1 100644
--- a/src/rtl/keywrap.v
+++ b/src/rtl/keywrap.v
@@ -74,8 +74,8 @@ module keywrap(
localparam CTRL_KEYLEN_BIT = 1;
localparam ADDR_RLEN = 8'h0c;
- localparam ADDR_A0 = 8'h0e;
- localparam ADDR_A1 = 8'h0f;
+ localparam ADDR_A_LSB = 8'h0e;
+ localparam ADDR_A_MSB = 8'h0f;
localparam ADDR_KEY0 = 8'h10;
localparam ADDR_KEY7 = 8'h17;
@@ -265,15 +265,15 @@ module keywrap(
if (address == ADDR_RLEN)
config_we = 1'h1;
- if ((address >= ADDR_KEY0) && (address <= ADDR_KEY7))
- key_we = 1'h1;
-
- if (ADDR_A0)
+ if (ADDR_A_LSB)
a0_we = 1'h1;
- if (ADDR_A1)
+ if (ADDR_A_MSB)
a1_we = 1'h1;
+ if ((address >= ADDR_KEY0) && (address <= ADDR_KEY7))
+ key_we = 1'h1;
+
if (address == ADDR_WRITE_DATA)
begin
api_cs_new = 1'h1;
@@ -295,16 +295,16 @@ module keywrap(
end
endcase // case (address)
- if (ADDR_A0)
+ if (ADDR_A_LSB)
tmp_read_data = core_a_result[31 : 0];
- if (ADDR_A1)
+ if (ADDR_A_MSB)
tmp_read_data = core_a_result[63 : 32];
if (address == ADDR_READ_DATA)
begin
- api_cs_new = 1'h1;
- tmp_read_data = core_api_rd_data;
+ api_cs_new = 1'h1;
+ tmp_read_data = core_api_rd_data;
end
end
end
More information about the Commits
mailing list