diff options
-rw-r--r-- | src/rtl/keywrap.v | 22 |
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 |