diff options
-rw-r--r-- | src/rtl/fpga_mkm.v | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/rtl/fpga_mkm.v b/src/rtl/fpga_mkm.v index e0dc14a..89825ed 100644 --- a/src/rtl/fpga_mkm.v +++ b/src/rtl/fpga_mkm.v @@ -68,13 +68,21 @@ module fpga_mkm( localparam CTRL_DONE = 3; - localparam MEM_WORDS = 16; + localparam MEM_BYTES = 32; + + localparam CMD_WRITE_BYTES = 8'h37; + localparam CMD_READ_BYTES = 8'h93; + localparam CMD_GET_STATUS = 8'hca; + + localparam STAT_KEY_NOT_LOADED = 8'hdb; + localparam STAT_KEY_LOADED = 8'hbd; + localparam STAT_TAMPER_DETECTED = 8'ha5; //---------------------------------------------------------------- // Registers including update variables and write enable. //---------------------------------------------------------------- - reg [31 : 0] key_mem [0 : (MEM_WORDS - 1)]; + reg [7 : 0] key_mem [0 : (MEM_BYTES - 1)]; reg [21 : 0] alarm_counter_reg = 22'h0; |