From fd6c91994c051744265730d8e88fb0855c5770fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Fri, 29 Jun 2018 10:00:05 +0200 Subject: 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 -- cgit v1.2.3