drbg

Wrap CSRNG, EDN, and the wrapper-local seed and AXIS adapters into one DRBG block.

Integrate the CSRNG seed adapter, EDN endpoint AXI-Stream adapters, and separate CSRNG and EDN 64-bit AXI-Lite control ports. Register-bridge faults are sticky per path and held until each path's own clear.

The producer-driven entropy_stream_* input feeds the seed packer directly. The entropy source is fire-and-forget, and words offered while the seed path is full are dropped without forming a partial seed.

Native EDN endpoints bypass the AXI-Stream adapter; port width is 1 when EDN_NATIVE_ENDPOINT_COUNT is 0.

All wrapper logic stays in the single clk_i / rst_ni domain. Reset may assert asynchronously but must deassert synchronously to clk_i. The wrapper adds no internal reset-domain crossings or autonomous CSR control sequencing.

Parameters

Table 1. Parameters
NameTypeDefaultDescription
SEED_FIFO_DEPTHint unsignedDrbgDefaultSeedFifoDepthNumber of complete packed seeds queued for CSRNG. Must be at least 1.
EDN_ENDPOINT_COUNTint unsignedDrbgDefaultEdnEndpointCountNumber of EDN endpoints exposed as AXI-Stream outputs. Each output carries an independent random-data stream. Must be at least 1.
EDN_NATIVE_ENDPOINT_COUNTint unsignedDrbgDefaultEdnNativeEndpointCountNumber of native EDN req/rsp endpoints. Each exposes a raw edn_pkg bundle that bypasses the AXI-Stream FIFOs.
EdnNativePortWidthint unsigned(EDN_NATIVE_ENDPOINT_COUNT == 0) ? 1 : EDN_NATIVE_ENDPOINT_COUNTWidth of the native EDN ports, which is 1 when EDN_NATIVE_ENDPOINT_COUNT is 0. The single slot is then unused and its request should be tied off.
ENDPOINT_FIFO_DEPTHint unsignedDrbgDefaultEndpointFifoDepthDepth of the FIFO on each AXI-Stream EDN endpoint. Must be at least 1.

Ports

Table 2. Ports
NameDirectionTypeDescription
clk_iinputlogicSystem clock.
rst_niinputlogicActive-low. May assert asynchronously; must deassert synchronously to clk_i.
entropy_stream_data_iinputlogic [31:0]Producer entropy word into the seed packer.
entropy_stream_vld_iinputlogicProducer entropy valid, with no back-pressure; a word offered while the packer holds a complete seed is dropped.
edn_axis_ooutputdrbg_axis_req_t [EDN_ENDPOINT_COUNT-1:0]EDN AXI-Stream requests toward consumers; tuser carries the EDN FIPS bit of each word.
edn_axis_iinputdrbg_axis_rsp_t [EDN_ENDPOINT_COUNT-1:0]EDN AXI-Stream ready from consumers.
edn_native_req_iinputedn_pkg::edn_req_t [EdnNativePortWidth-1:0]Native EDN client requests (bypass AXI-Stream). Port width is 1 when EDN_NATIVE_ENDPOINT_COUNT is 0.
edn_native_rsp_ooutputedn_pkg::edn_rsp_t [EdnNativePortWidth-1:0]Native EDN client responses.
csrng_axil_req_iinputcsrng_axil_req_tCSRNG AXI-Lite CSR request.
csrng_axil_rsp_ooutputcsrng_axil_rsp_tCSRNG AXI-Lite CSR response.
edn_axil_req_iinputedn_axil_req_tEDN AXI-Lite CSR request.
edn_axil_rsp_ooutputedn_axil_rsp_tEDN AXI-Lite CSR response.
otp_en_csrng_sw_app_read_iinputprim_mubi_pkg::mubi8_tOTP enable for CSRNG SW app read.
lc_hw_debug_en_iinputlc_ctrl_pkg::lc_tx_tLifecycle HW-debug enable.
csrng_alert_rx_iinputprim_alert_pkg::alert_rx_t [csrng_reg_pkg::NumAlerts-1:0]CSRNG alert receivers.
csrng_alert_tx_ooutputprim_alert_pkg::alert_tx_t [csrng_reg_pkg::NumAlerts-1:0]CSRNG alert transmitters.
edn_alert_rx_iinputprim_alert_pkg::alert_rx_t [edn_reg_pkg::NumAlerts-1:0]EDN alert receivers.
edn_alert_tx_ooutputprim_alert_pkg::alert_tx_t [edn_reg_pkg::NumAlerts-1:0]EDN alert transmitters.
intr_cs_cmd_req_done_ooutputlogicCSRNG cmd-req-done interrupt.
intr_cs_entropy_req_ooutputlogicCSRNG entropy-req interrupt.
intr_cs_hw_inst_exc_ooutputlogicCSRNG HW-instance exception interrupt.
intr_cs_fatal_err_ooutputlogicCSRNG fatal-error interrupt.
intr_edn_cmd_req_done_ooutputlogicEDN cmd-req-done interrupt.
intr_edn_fatal_err_ooutputlogicEDN fatal-error interrupt.
csrng_bus_err_ooutputlogicSticky CSRNG register-bridge fault, set when a TL-UL response from CSRNG carries d_error. Held until csrng_bus_err_clr_i.
csrng_bus_err_clr_iinputlogicClear the CSRNG bus-fault sticky, active-high; a fault in the same cycle still sets it.
edn_bus_err_ooutputlogicSticky EDN register-bridge fault, set when a TL-UL response from EDN carries d_error. Held until edn_bus_err_clr_i.
edn_bus_err_clr_iinputlogicClear the EDN bus-fault sticky, active-high; a fault in the same cycle still sets it.