Skip to content

olo_ft_fifo_async

Back to Entity List

Status Information

VHDL Source: olo_ft_fifo_async

Description

This component implements an ECC-protected asynchronous FIFO using SECDED (Single Error Correction, Double Error Detection) Hamming code. The interface and behavior match olo_base_fifo_async.

The ECC is transparent to the user: data is automatically encoded on write and decoded/corrected on read. Error status flags indicate whether a single-bit error was corrected or a double-bit error was detected.

Generics

Name Type Default Description
Width_g positive - Number of data bits per FIFO entry. The internal FIFO is wider to accommodate ECC parity bits.
Depth_g positive - Number of FIFO entries.
This must be a power of two (see olo_base_fifo_async).
AlmFullOn_g boolean false Enable almost-full flag
AlmFullLevel_g natural 0 Almost-full threshold level
AlmEmptyOn_g boolean false Enable almost-empty flag
AlmEmptyLevel_g natural 0 Almost-empty threshold level
RamStyle_g string "auto" Controls the RAM implementation resource
RamBehavior_g string "RBW" Controls the RAM behavior. "RBW" or "WBR"
ReadyRstState_g std_logic '1' Value of In_Ready during reset. Behaves exactly as in olo_base_fifo_async.
Optimization_g string "SPEED" "SPEED" or "LATENCY". Behaves exactly as in olo_base_fifo_async.
SyncStages_g positive 2 Number of synchronization stages of the clock crossings.
Range: 2 ... 4
SyncTmr_g boolean false Implement every synchronizer as three chains with a majority voter, see clock-crossing principles

Interfaces

Input Data

Name In/Out Length Default Description
In_Clk in 1 - Input clock
In_Rst in 1 - Reset input (high-active, synchronous to In_Clk). Empties the FIFO and clears the internal error-injection latch.
In_RstOut out 1 N/A Reset output (see clock-crossing principles, synchronous to In_Clk)
In_Data in Width_g - Input data (synchronous to In_Clk)
In_Valid in 1 '1' AXI4-Stream handshaking signal for In_Data (synchronous to In_Clk)
In_Ready out 1 N/A AXI4-Stream handshaking signal for In_Data (synchronous to In_Clk)

Output Data

Name In/Out Length Default Description
Out_Clk in 1 - Output clock
Out_Rst in 1 - Reset input (high-active, synchronous to Out_Clk). Empties the FIFO and clears the internal error-injection latch.
Out_RstOut out 1 N/A Reset output (see clock-crossing principles, synchronous to Out_Clk)
Out_Data out Width_g N/A Output data, corrected if a single-bit error was detected (synchronous to Out_Clk)
Out_Valid out 1 N/A AXI4-Stream handshaking signal for Out_Data (synchronous to Out_Clk)
Out_Ready in 1 '1' AXI4-Stream handshaking signal for Out_Data (synchronous to Out_Clk)
Out_EccSec out 1 N/A Single error corrected flag. Time-aligned with Out_Data.
Out_EccDed out 1 N/A Double error detected flag. Read data is unreliable. Time-aligned with Out_Data.

Input Status

Name In/Out Length Default Description
In_Full out 1 N/A Status flag. Asserted if the FIFO is full (synchronous to In_Clk)
In_Empty out 1 N/A Status flag. Asserted if the FIFO is empty (synchronous to In_Clk)
In_AlmFull out 1 N/A Status flag. Asserted if the FIFO fill level is >= AlmFullLevel_g (synchronous to In_Clk)
Output is undefined if AlmFullOn_g=false.
In_AlmEmpty out 1 N/A Status flag. Asserted if the FIFO fill level is <= AlmEmptyLevel_g (synchronous to In_Clk)
Output is undefined if AlmEmptyOn_g=false.
In_Level out ceil(log2(Depth_g+1)) N/A FIFO fill level calculated on the write side (synchronous to In_Clk)

Output Status

Name In/Out Length Default Description
Out_Full out 1 N/A Status flag. Asserted if the FIFO is full (synchronous to Out_Clk)
Out_Empty out 1 N/A Status flag. Asserted if the FIFO is empty (synchronous to Out_Clk)
Out_AlmFull out 1 N/A Status flag. Asserted if the FIFO fill level is >= AlmFullLevel_g (synchronous to Out_Clk)
Output is undefined if AlmFullOn_g=false.
Out_AlmEmpty out 1 N/A Status flag. Asserted if the FIFO fill level is <= AlmEmptyLevel_g (synchronous to Out_Clk)
Output is undefined if AlmEmptyOn_g=false.
Out_Level out ceil(log2(Depth_g+1)) N/A FIFO fill level calculated on the read side (synchronous to Out_Clk)

Error Injection (optional)

These ports drive the internal olo_ft_ecc_encode instance (synchronous to In_Clk). Leave them unconnected for normal operation; see Open Logic Fault-Tolerance Principles - Error Injection for the latched-strobe semantics shared across the ft area.

Name In/Out Length Default Description
In_ErrInj_BitFlip in eccCodewordWidth(Width_g) all 0 Codeword-wide flip pattern. Each '1' bit XORs (flips) the corresponding bit of the stored codeword. Popcount 1 = SEC-correctable, popcount 2 = DED-detectable.
In_ErrInj_Valid in 1 '0' Strobe that latches In_ErrInj_BitFlip into the encoder's pending-injection register. The latched pattern is applied to the next accepted input beat.

Detailed Description

Architecture

olo_ft_fifo_async architecture

The entity is composed of three Open Logic entities:

  1. olo_ft_ecc_encode encodes each accepted input beat into a SECDED codeword (In_Clk domain, reset by In_RstOut).
  2. olo_base_fifo_async stores the codeword (entity configured with a codeword-wide word) and crosses the clock domains. All levels, status flags and reset outputs come directly from it.
  3. olo_ft_ecc_decode decodes and corrects each beat on the read side (Out_Clk domain, reset by Out_RstOut) and drives Out_EccSec / Out_EccDed time-aligned with Out_Data.

The codeword is protected end-to-end while it is inside the FIFO: encoding happens before, and decoding after, all storage elements.

See olo_base_fifo_async for detailed FIFO behavior.

Note that the ECC FIFOs deliberately come without a scrubber, unlike the ECC RAMs (olo_ft_ram_sp_scrub, olo_ft_ram_sdp_scrub). A FIFO does not store data permanently, so as long as it is drained regularly, errors do not accumulate in a word over time and there is nothing for a background scrubber to repair.

Combinational ECC Encoder and Decoder

Both codecs are instantiated with Pipeline_g = 0. The datapath to and from the internal FIFO is therefore combinational, and the ft entity behaves exactly like its olo_base_fifo_async counterpart.

The ECC decode lies between the RAM output and the output ports and is the critical path of the entity. Where it limits the clock frequency, use olo_base_fifo_async directly and place registered olo_ft_ecc_encode / olo_ft_ecc_decode instances around it in the surrounding design. The levels and status flags of the base FIFO then do not account for the beats held in the codec pipelines.

Radiation Hardening

The ECC protects the data stored in the FIFO. The control logic (pointers, level and flag computation, handshaking) is protected by the automatic TMR of the surrounding design (e.g. syn_radhardlevel = "tmr" in Synplify for Microchip devices), like any other logic.

The synchronizers of the Gray-pointer and reset clock crossings are excluded from automatic TMR, see clock-crossing principles.

With SyncTmr_g=true, each of these synchronizers is implemented three times and followed by a majority voter, see Triplicated Synchronizers. A single-event upset of a synchronizer register is then masked; the effects described below require two upsets of the same bit in different chains that reach the voter in the same clock cycle.

With SyncTmr_g=false (default), a single-event upset of a pointer synchronizer register shows a wrong pointer value on the other side of the FIFO for one clock cycle. Because of the Gray-to-binary conversion, the wrong value can differ from the correct one by more than one entry. This only matters if the FIFO is empty (pointer seen by the read side) or full (pointer seen by the write side) in exactly this cycle and data is transferred: then an entry that was not written yet is read, or an entry that was not read yet is overwritten. Afterwards, the FIFO delivers invalid data until the read pointer has caught up with the write pointer again (at most 2 x Depth_g - 1 reads) or until the next reset. Right after such an event, In_Level and Out_Level are larger than Depth_g, which the surrounding design can check to detect it.

An upset of a reset synchronizer register leads to a reset pulse on one side of the FIFO only (visible on In_RstOut or Out_RstOut), after which the FIFO also delivers invalid data until the pointers are aligned again.

Take this into account in the radiation analysis of the design.

ECC Overhead, Error Injection and Status Flags

See the corresponding sections in Open Logic Fault-Tolerance Principles:

Constraints

The same constraints as for olo_base_fifo_async apply, see clock-crossing principles. Because the clock crossings are the ones of olo_base_fifo_async, the automatic constraints for AMD tools (Vivado) apply as well.

See Open Logic Fault-Tolerance Principles - Constraints That Apply Across the Area for the constraints that apply across the ft area.