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
| Name | Type | Default | Description |
|---|---|---|---|
DEPTH | int unsigned | 64 | FIFO depth in words. |
Ports
| Name | Direction | Type | Description |
|---|---|---|---|
clk_i | input | logic | System clock. |
rst_ni | input | logic | Active-low asynchronous reset of the pointers; the storage is not reset. |
push_i | input | logic | Write request; ignored when full, on a pointer error or during clr_i. |
pop_i | input | logic | Read acknowledge that advances the read pointer; ignored when empty, on a pointer error or during clr_i. |
clr_i | input | logic | Synchronous flush: reset pointers/level to empty. |
wdata_i | input | logic [31:0] | Entropy word stored on an accepted push. |
entropy_churn_enable_i | input | logic | High XORs each pushed word with the entry half the FIFO depth ahead of the write pointer. |
rdata_o | output | logic [31:0] | Head-of-FIFO word; zero while empty. |
level_o | output | level_t | Number of stored words. |
wptr_o | output | ptr_t | Storage index of the next write. |
rptr_o | output | ptr_t | Storage index of the head entry. |
overflow_o | output | logic | Push requested while full; the word is dropped. |
underflow_o | output | logic | Pop requested while empty. |
parity_error_o | output | logic | Head entry of a non-empty FIFO fails its per-byte even-parity check. |
pointer_error_o | output | logic | Duplicated pointer counters disagree; pushes and pops are blocked while set. |
security_alert_o | output | logic | OR of parity_error_o and pointer_error_o. |