key_manager

Integrate the Key Manager CPU, memories, peripherals and crypto master ports into one hierarchical block.

Components:

  • PicoRV32 CPU with direct ROM/SRAM memory interfaces
  • AXI-Lite crossbar for internal peripheral access
  • KMCSR (control/status registers) with IRQ aggregation
  • Mailbox for bidirectional SEP-KM communication
  • DRBG sampler for random number acquisition
  • KPV (Key and Policy Vault) for key storage
  • External crypto engine master ports (OTBN, AES, KMAC, HMAC, Adams Bridge) and the OTP/eFuse master

km_reset_conditioner conditions reset internally and produces two clean resets:

  • Cold (AASD, rst_cold_aasd_no): resets all KM components; source is cold_rst_ni.
  • Warm (synchronous, rst_warm_sync_no): resets the CPU, the internal AXI fabric and the warm KMCSR/KPV/DRBG/mailbox fields; sources are warm_rst_ni, soft_rst_n from KMCSR and cold reset.

LATCHED_MEM_RDATA is 1 when ROM/SRAM latch read data, so it stays valid after the request deasserts, and 0 when read data is valid only while rvalid is asserted. Setting it lets the CPU use look-ahead optimization when the memory supports it.

OTP_EFUSE_REMAP_BASE is the absolute address of the eFuse controller as seen on efuse_req_o. Transactions from the internal OTP crossbar port (xbar port 8, the KM-local OTP page) that fall in the MAP, CTRL or MMR register map keep their page offset, the low km_intf_pkg::OtpRemapAddrWidth bits, and take their upper bits from OTP_EFUSE_REMAP_BASE before being driven onto efuse_req_o. Every other offset in the page completes locally with SLVERR and never reaches efuse_req_o. The integrator sets OTP_EFUSE_REMAP_BASE to the page-aligned system-level address of the eFuse controller and must connect efuse_req_o/efuse_resp_i to that controller.

The ROM and SRAM hard macros are instantiated at integration level and connect through the exposed memory ports.

Parameters

Table 1. Parameters
NameTypeDefaultDescription
ROM_SIZE_BYTESint unsigned16384Size of the KM boot ROM in bytes. Must equal the ROM window of the KM memory map in km_intf_pkg.
SRAM_SIZE_BYTESint unsigned32768Size of the KM data SRAM in bytes. Must equal the SRAM window of the KM memory map in km_intf_pkg.
MAILBOX_DEPTHint unsigned16Words per mailbox FIFO direction. Must be a power of two from 16 to 256.
LATCHED_MEM_RDATAbit1'b01 if ROM/SRAM keep read data valid after the request deasserts, which lets the CPU use it directly for look-ahead.
OTP_EFUSE_REMAP_BASEkm_addr_t32'h1093_0000Absolute eFuse controller address on efuse_req_o; replaces the bits above the OTP page offset. Page-aligned.

Ports

Table 2. Ports
NameDirectionTypeDescription
clk_iinputlogicSystem clock.
cold_rst_niinputlogicCold reset, asynchronous active-low; the conditioner releases it synchronously to clk_i.
warm_rst_niinputlogicWarm reset, active-low and synchronous to clk_i; the warm reset stays asserted at least 10 clk_i cycles after it releases.
mbox_sep_req_iinputkm_axil_req_tMailbox AXI4-Lite slave request from the SEP host, which sends and receives messages to and from KM here.
mbox_sep_resp_ooutputkm_axil_resp_tMailbox AXI4-Lite slave response to the SEP host.
mbox_irq_to_sep_ooutputlogicLevel mailbox interrupt to the SEP: OR of the SEP-side sources (outbound data available, inbound space available, inbound overflow, outbound underflow, flushed by KM) masked by SEP_IRQ_ENABLE.
unrecoverable_err_ooutputlogicActive-high: KM is in trap state (no longer executing).
recoverable_err_ooutputlogicLevel of the firmware-written KMCSR RECOVERABLE_ERR register bit.
otbn_req_ooutputkm_axil_req_tExternal crypto AXI4-Lite master to OTBN (Big Number Accelerator).
otbn_resp_iinputkm_axil_resp_tAXI4-Lite response from OTBN.
aes_req_ooutputkm_axil_req_tExternal crypto AXI4-Lite master to the AES accelerator.
aes_resp_iinputkm_axil_resp_tAXI4-Lite response from the AES accelerator.
kmac_req_ooutputkm_axil_req_tExternal crypto AXI4-Lite master to the KMAC accelerator.
kmac_resp_iinputkm_axil_resp_tAXI4-Lite response from the KMAC accelerator.
hmac_req_ooutputkm_axil_req_tExternal crypto AXI4-Lite master to the HMAC accelerator.
hmac_resp_iinputkm_axil_resp_tAXI4-Lite response from the HMAC accelerator.
abr_req_ooutputkm_axil_req_tExternal crypto AXI4-Lite master to the Adams Bridge accelerator.
abr_resp_iinputkm_axil_resp_tAXI4-Lite response from the Adams Bridge accelerator.
abr_mlkem_sharedkey_irq_iinputlogicAdams Bridge ML-KEM shared-key valid IRQ (level-sensitive, active-high).
efuse_req_ooutputkm_axil_req_tOTP/eFuse AXI-Lite master from xbar port 8, carrying only MAP/CTRL/MMR accesses, remapped to OTP_EFUSE_REMAP_BASE.
efuse_resp_iinputkm_axil_resp_tAXI-Lite response from the system eFuse controller.
rom_mem_req_ooutputkm_rom_mem_req_tRequest to the ROM hard macro.
rom_mem_rsp_iinputkm_rom_mem_rsp_tResponse from the ROM hard macro.
sram_mem_req_ooutputkm_sram_mem_req_tRequest to the SRAM hard macro.
sram_mem_rsp_iinputkm_sram_mem_rsp_tResponse from the SRAM hard macro.
drbg_axis_req_iinputkm_drbg_axis_req_tDRBG AXI-Stream request (KM is slave, DRBG is master).
drbg_axis_resp_ooutputkm_drbg_axis_resp_tDRBG AXI-Stream response.
otp_data_iinputkm_otp_data_tDifferentially encoded SEP OTP data.
wipe_state_iinputlogicWipe state. A rising edge sets IRQ_STATUS.WIPE_STATE and zeros the entire KPV on the next cycle. It is ORed with the CPU trap before edge detection, so a CPU trap wipes the same way and masks this input while it lasts.
test_en_iinputlogicDFT test-enable, active-high; selects scan_rst_ni for both conditioned resets and drives the crossbar and mailbox test inputs.
scan_rst_niinputlogicScan reset, active-low; replaces both the cold and warm conditioned resets while test_en_i is high.