First-In, First-out Memory (FlFO)
In FIFo memory systems, data that are written into the RAM storage area are read out in the same order that they were written in. In other words, the first word writ ten into the memory block is the first word that is read out of the memory block: hence the name FIFO. This idea is illustrated in Figure 11-41.
Part(a) shows the sequence of writing three data bytes into the memory block. Note that as each new byte is written into location 1, the other bytes move to the next location. Part(b) shows the sequence of reading the data out of the FlFo block. The first byte read is the same as the first byte that was written, and so on The FIFO operation is controlled by special address pointer registers that keep track of where data are to be written and the location from which they are to be read.
A FIFO is useful as a data-rate buffer between systems that transfer data at widely different rates. One example is the transfer of data from a computer to a printer. The computer sends character data to the printer at a very high rate, say, one byte every 10 us. These data fill up a FIFO memory in the printer, The printer then reads out the data from the FIFO at a much slower rate, say, one byte every 5 ms, and prints out the corresponding characters in the same order as sent by the computer.
A FIFO can also be used as a data-rate buffer between a slow device, such as a keyboard, and a high-speed computer. Here the FIFo accepts keyboard data at the slow and asynchronous rate of human fingers and stores them. The computer can then read all of the recently stored keystrokes very quickly at a convenient point in its program. In this way, the computer can be performing other tasks while the FlFO is slowly being filled with data.