FIFO (electronic)
In digital electronics, a FIFO (acronym for first-in, first-out) is a digital circuit that stores incoming data in internal memory and outputs the stored data in the order it was received. Data is stored on demand and the oldest stored data is output on demand, with both operations occurring independently and at potentially different rates. This is in contrast to a shift register, which requires data to be concurrently stored and output, and for the oldest data to sequentially propagate through memory before it is output.
A FIFO primarily consists of a pair of counters that serve as read and write memory address registers, an addressable memory array, and status and control logic.
The data stored in a FIFO typically have a fixed word size (number of bits), which is commonly referred to as the FIFO width. The maximum possible number of stored datums is known as the FIFO depth. Together, the width and depth determine the storage capacity of a FIFO.
FIFOs are used to exchange data between two hardware devices or between a hardware device and software. They are commonly used to exchange data between circuits that operate in different clock domains, and for buffering and flow control between data producers and consumers which, over finite intervals, operate at different data rates.