entropy_fifo

Buffer 32-bit entropy words in a fault-hardened synchronous FIFO.

Depth is DEPTH words with per-byte even parity on stored data and hardened read/write pointers via prim_fifo_sync_cnt Secure=1. Local mem[] storage supports parity checks and entropy-churn reads that need random access.

When entropy_churn_enable_i is set, pushes XOR with the existing entry at (wptr + DEPTH/2) % DEPTH before store. clr_i synchronously flushes pointers and level to empty.

security_alert_o rises on any parity or pointer error. Each fault class has its own output:

  • overflow_o
  • underflow_o
  • parity_error_o
  • pointer_error_o

Parameters

Table 1. Parameters
NameTypeDefaultDescription
DEPTHint unsigned64FIFO depth in words.

Ports

Table 2. Ports
NameDirectionTypeDescription
clk_iinputlogicSystem clock.
rst_niinputlogicActive-low asynchronous reset of the pointers; the storage is not reset.
push_iinputlogicWrite request; ignored when full, on a pointer error or during clr_i.
pop_iinputlogicRead acknowledge that advances the read pointer; ignored when empty, on a pointer error or during clr_i.
clr_iinputlogicSynchronous flush: reset pointers/level to empty.
wdata_iinputlogic [31:0]Entropy word stored on an accepted push.
entropy_churn_enable_iinputlogicHigh XORs each pushed word with the entry half the FIFO depth ahead of the write pointer.
rdata_ooutputlogic [31:0]Head-of-FIFO word; zero while empty.
level_ooutputlevel_tNumber of stored words.
wptr_ooutputptr_tStorage index of the next write.
rptr_ooutputptr_tStorage index of the head entry.
overflow_ooutputlogicPush requested while full; the word is dropped.
underflow_ooutputlogicPop requested while empty.
parity_error_ooutputlogicHead entry of a non-empty FIFO fails its per-byte even-parity check.
pointer_error_ooutputlogicDuplicated pointer counters disagree; pushes and pops are blocked while set.
security_alert_ooutputlogicOR of parity_error_o and pointer_error_o.