FIRST-IN— FIRST-OUT MEMORIES (FIFOs)
Catching information “on the fly" can often be a problem for a microprocessor-based system. A system may have the processing power to accept data at an overall fast rate, but at times other processing tasks may cause a few words to slip by unread. One solution to this problem is to build a small memory circuit to pile up data as it comes in. With such a memory system the microprocessor can process the data when it gets around to it; as long as the memory never gets filled to capacity, no harm is done.
There are single integrated circuits designed to do precisely what has just been described. First-in-first-out (FIFO) memories are devices that have data input lines (usually 8 or 9) with a control called push, plus data output lines“with a control called pop. Data is “pushed onto the top" of an internal memory when the push line is pulsed; it ripples through the FIFO, “stacking up at the bottom," where it can be conveniently popped off when needed. Pushes and pops can be done completely asynchronously.
The Advanced Micro Devices 2812 is a good example of FIFO. It consists of 32 ripple through memory locations of8 bits width plus corresponding control logic. Figure 5-29 illustrates the 2812. A low-to-high transition on the PL line (parallel load) causes the 8-bit input data (DO-D8) to be loaded into the FIFO, while PD (parallel dump) causes it to be popped off. This FIFO also features a serial load and dump capability and a master reset (MR) line. Input ready and output ready lines are provided to help external control logic determine FIFO overflow and out-of-data conditions, and a half-full flag line indicates that the FIFO‘s bottom 15 locations are full. The half-full flag is useful in applications in which control over input and output data is possible. A half-full FIFO provides the best I/O rate matching for varying I/O rate buffering. The half-full flag can also be used to send a “you’d better start unloading this FIFO“signal to the microprocessor. An interrupt line connected to the half-full flag is a possible implementation.