diff options
Diffstat (limited to 'src/rtl/keywrap_mkmif.v')
-rw-r--r-- | src/rtl/keywrap_mkmif.v | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rtl/keywrap_mkmif.v b/src/rtl/keywrap_mkmif.v index 082173b..ad2121e 100644 --- a/src/rtl/keywrap_mkmif.v +++ b/src/rtl/keywrap_mkmif.v @@ -171,11 +171,11 @@ module keywrap_mkmif ( if (!reset_n) begin for (i = 0 ; i < 8 ; i = i + 1) - key[i] <= 32'h0; + key_reg[i] <= 32'h0; ready_reg <= 1'h1; status_reg <= 32'h0; - mkm_address_reg <= 16'h0; + mkm_addr_reg <= 16'h0; mkm_write_data_reg <= 32'h0; key_word_ctr_reg <= 3'h0; keywrap_mkmif_ctrl_reg <= CTRL_IDLE; @@ -217,8 +217,8 @@ module keywrap_mkmif ( if (key_word_ctr_rst) begin - iteration_ctr_new = 3'h0; - iteration_ctr_we = 1'h1; + key_word_ctr_new = 3'h0; + key_word_ctr_we = 1'h1; end if (key_word_ctr_inc) @@ -244,7 +244,6 @@ module keywrap_mkmif ( mkm_init_op = 1'h0; mkm_read_op = 1'h0; mkm_write_op = 1'h0; - mkm_sclk_div = DEFAULT_SCLK_DIV; mkm_addr_new = 16'h0; mkm_addr_we = 1'h0; mkm_write_data_new = 32'h0; @@ -328,6 +327,7 @@ module keywrap_mkmif ( end CTRL_READ_KEY: + begin if (key_word_ctr_reg < 8) begin mkm_read_op = 1'h1; @@ -363,7 +363,7 @@ module keywrap_mkmif ( mkm_write_op = 1'h1; mkm_addr_new = MKM_STATUS_WORD + {key_word_ctr_reg, 2'h0}; mkm_addr_we = 1'h1; - mkm_write_data_new = key[key_word_ctr_reg * 32 +: 32]; + mkm_write_data_new = wr_key[key_word_ctr_reg * 32 +: 32]; mkm_write_data_we = 1'h1; keywrap_mkmif_ctrl_new = CTRL_WRITE_KEY_WAIT; keywrap_mkmif_ctrl_we = 1'h1; |