prim_fifo_sync_parity

Store WIDTH-bit beats in a synchronous FIFO with optional pass-through and pointer hardening.

PASS forwards a write into an empty FIFO in the same cycle when set. OUTPUT_ZERO_IF_EMPTY forces rdata_o to zero when the FIFO is empty. SECURE replaces pointer math with prim_count, stores an odd parity bit with each entry and checks it on read, and reports pointer or parity faults on err_o; NEVER_CLEARS documents that clr_i stays low. DEPTH 0 is a combinational pass-through and requires PASS. DEPTH 1 uses a single register whose full flag SECURE duplicates inverted. Deeper FIFOs hold wready_o and rvalid_o low for the first cycle after reset.

Evaluate prim_fifo_assert.svh whenever this file is included, even when the FIFO assertions are otherwise unused, so including the FIFO still pulls in that assert header.

Parameters

Table 1. Parameters
NameTypeDefaultDescription
WIDTHint unsigned16Datapath width.
PASSbit1'b11 allows a write to pass through an empty FIFO in the same cycle.
DEPTHint unsigned4Storage depth.
OUTPUT_ZERO_IF_EMPTYbit1'b11 forces rdata_o to 0 when the FIFO is empty.
NEVER_CLEARSbit1'b0Declares that clr_i stays low; checked by assertion, and with SECURE it drops the clear from the pointers.
SECUREbit1'b0Uses prim_count for pointers and adds per-entry parity.
DepthWintprim_util_pkg::vbits(DEPTH+1)Width of depth_o; derived.

Ports

Table 2. Ports
NameDirectionTypeDescription
clk_iinputFIFO clock.
rst_niinputAsync reset, active-low.
clr_iinputSynchronous clear / flush.
wvalid_iinputWrite valid.
wready_ooutputWrite ready.
wdata_iinput[WIDTH-1:0]Write data.
rvalid_ooutputRead valid.
rready_iinputRead ready.
rdata_ooutput[WIDTH-1:0]Read data.
full_ooutputFIFO full.
depth_ooutput[DepthW-1:0]Current occupancy.
err_ooutputPointer or parity integrity fault; always 0 unless SECURE.