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

Table 1. Parameters
NameTypeDefaultDescription
NUM_SLOTSint unsigned64Number of key slots.
WORDS_PER_SLOTint unsigned16Key-data words in each slot; the file holds NUM_SLOTS * WORDS_PER_SLOT entries.
DATA_WIDTHint unsigned32Data width in bits.

Ports

Table 2. Ports
NameDirectionTypeDescription
clk_iinputlogicSystem clock.
wipe_iinputlogicBulk wipe: zeroes ALL entries on the next clock edge, overriding any write.
wr_a_en_iinputlogicKM write port enable.
wr_a_addr_iinputlogic [$clog2(NUM_SLOTS*WORDS_PER_SLOT)-1:0]KM write port flat address.
wr_a_data_iinputlogic [DATA_WIDTH-1:0]KM write port data.
rd_addr_iinputlogic [$clog2(NUM_SLOTS*WORDS_PER_SLOT)-1:0]KM-only read port flat address.
rd_data_ooutputlogic [DATA_WIDTH-1:0]KM-only read data (combinational).