km_kpv_regfile
Store KPV key data in a single-write, single-read register file.
Stores NUM_SLOTS x WORDS_PER_SLOT entries of DATA_WIDTH bits.
- Write port: KM; in km_kpv it carries CPU writes and, while an erase runs, the eraser's writes.
- Read port: KM only (combinational, zero-latency).
Key data storage has no reset: the power-up value is undefined for security. The wipe input provides a synchronous bulk-clear of all entries and takes priority over a write in the same cycle.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
NUM_SLOTS | int unsigned | 64 | Number of key slots. |
WORDS_PER_SLOT | int unsigned | 16 | Key-data words in each slot; the file holds NUM_SLOTS * WORDS_PER_SLOT entries. |
DATA_WIDTH | int unsigned | 32 | Data width in bits. |
Ports
| Name | Direction | Type | Description |
|---|---|---|---|
clk_i | input | logic | System clock. |
wipe_i | input | logic | Bulk wipe: zeroes ALL entries on the next clock edge, overriding any write. |
wr_a_en_i | input | logic | KM write port enable. |
wr_a_addr_i | input | logic [$clog2(NUM_SLOTS*WORDS_PER_SLOT)-1:0] | KM write port flat address. |
wr_a_data_i | input | logic [DATA_WIDTH-1:0] | KM write port data. |
rd_addr_i | input | logic [$clog2(NUM_SLOTS*WORDS_PER_SLOT)-1:0] | KM-only read port flat address. |
rd_data_o | output | logic [DATA_WIDTH-1:0] | KM-only read data (combinational). |