km_kpv
Store Key Manager key material in the Key and Policy Vault (KPV) behind a PeakRDL CSR block.
Key data lives in a dedicated register file (km_kpv_regfile) with one write port (KM CPU, or the slot eraser while it runs) and one read port (KM only). A PeakRDL-generated CSR block exposes per-slot external req/ack interfaces (no internal flops for key data), which this module bridges to the register file through an optional 1024x32 scrambler.
Per-slot CTRL registers implement:
- lock_write / lock_use / seal sticky W1S bits. A slot with seal set is sealed: hardware holds lock_write set alongside it, so the data is readable but not writable.
- Erase is never blocked, but the seal changes its outcome. An unsealed slot's CTRL is cleared, freeing the slot for reuse. A sealed slot is retired instead: lock_write stays set and lock_use is set, so the destroyed contents cannot be read and the slot cannot be refilled until warm reset.
Scrambler key/ctrl lock: the stored scrambler key is held in a local flop; when locked the CSR returns zero to software but hardware scramblers continue using the provisioned value.
Wipe: wipe_pulse_i zeroes key data, CTRL sticky bits (via hwclr), and scrambler key/ctrl. It releases a sealed or retired slot, which is sound only because no KM CPU execution follows a wipe before warm reset: in key_manager a wipe comes from a CPU trap, which halts the CPU, or from the wipe_state_i tamper input.
Cold reset clears the entire KPV except key data and the scrambler key CSR, which have no reset; warm reset clears the KM-port CPUIF, the SLVERR tracking and every slot's CTRL register.
Ports
| Name | Direction | Type | Description |
|---|---|---|---|
clk_i | input | logic | System clock. |
cold_rst_ni | input | logic | Cold reset: AASD; resets the entire KPV. |
warm_rst_ni | input | logic | Warm reset: synchronous; resets the KM-port CPUIF, the SLVERR tracking and every slot's CTRL register. |
km_axil_req_i | input | axil_req_t | KM port request from the crossbar (base 0x0001_2000); only address bits [12:0] are decoded. |
km_axil_resp_o | output | axil_resp_t | KM port response to the crossbar; SLVERR on a key-data write to a write-locked or sealed slot and on a key-data read of a use-locked slot. |
wipe_pulse_i | input | logic | Wipe: pulse high for one cycle to zero the entire KPV on the next cycle. |