Almost Empty (AE) and Almost Full (AF) flags allow the FIFO to support burst transfers and to trigger load/unload operations.
AE and AF flags can be designed into the FIFO chip or ASIC/PLD IP, otherwise extra logic circuitry can be added around the FIFO to do it.
For bursts: if the FIFO write data or read data is to be moved by burst transfer of blocks, such as across a bus in data packets, then the AE/AF thresholds can be set for when there is sufficient write space for a new incoming block or enough read data for a new outgoing block. Care must be taken if the total transfer is not a multiple of the block length, to ensure the stray end parts don't get ignored because the AE/AF flags have not tripped.
For load/unload: if it is preferable to fetch more FIFO write data or take out more FIFO read data all in one go, the AE/AF flags can be set to trigger the succession of single/burst transfers to do this. This may be because the supplier/consumer of the data does not want it drip-fed.
ForAn example, of loading is a digital sound playback card in a computer may want. It can be better for the fetching of more playback FIFO data from RAM to occur quickly once triggered. That notifies the software earlier that data is running low, giving it more advance time to load more data from mass storage. Actually fetching it may involve a series of successive bursts, or as close together as possible. But the whole fetching operation is triggered by a FIFO Almost Empty flag.