aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoachim StroĢˆmbergson <joachim@secworks.se>2018-06-29 10:00:05 +0200
committerJoachim StroĢˆmbergson <joachim@secworks.se>2018-06-29 10:00:05 +0200
commitfd6c91994c051744265730d8e88fb0855c5770fa (patch)
tree4f9db50289325f1b2a53c42083969a047152ff3d /src
parentc74cf5f6120d344da8646814d14766a2a49d3fcd (diff)
Changed name in API for A words to clarify their meaning. Corrected case order in API logic.
Diffstat (limited to 'src')
-rw-r--r--src/rtl/keywrap.v22
1 files 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