Asynchronous FIFO Final
Asynchronous FIFO Final
FIFO
What is FIFO?
• FIFO (First-in-first-out) memories are Special Purpose devices that
implement a basic queue structure that has broad applications in
Computer and Communication Architecture.
• FIFO memory is a Storage device in which data is read out from its
memory array (SRAM) in same order in which it is written in memory.
• The first word written into the memory block is the first word that is read
out of the memory block. Because of this operation it is referred as First-
in-first-out memories.
• This type of memory is used to interface Slow input/output devices to fast
operating computers.
• The FIFO memory is useful as a Data-rate Buffer in which reading and
writing operations are done at independent data rates.
• The Architecture of FIFO is created by surrounding a dual-port memory
array – generally SRAM with a write pointer , read pointer and control
logic as shown in previous slide.
• As entries are written , the write pointer increments and as entries are
read , read pointer increments as well.
• If read pointer fails to advance, the write pointer wraps around the end
of memory array and become equal to read pointer. At this point FIFO is
full
and cannot accepts any more data until reading resumes.
Types of FIFO Memories
• The following types of FIFO memories are available:
1. Asynchronous FIFO memory.
2. Synchronous FIFO memory.
3. Bi-directional FIFO memory.
• The interfaces of FIFO can be synchronous(Single clock for read & Write
operations) or Asynchronous (Two Different clock Domains).
• If Synchronous , then only one clock signal exits and this clock signal is
used for both reading and Writing operations.
• Synchronous FIFO has advantage of improved interface timing because of
flops placed at a device’s inputs and outputs reduce timing requirements
to familiar setup , hold , clock-to-out specifications.
• One common Application of FIFO is in clock domain crossing where we
need to communicate a series of data values from logic block at one clock
frequency to another block operating at different clock frequency.
• This application is governed by Asynchronous FIFO or a Dual-clock
synchronous FIFO.
Asynchronous FIFO
• There are times when a designer needs to interface two systems working
at two different clocks.
• This interfacing is difficult in the sense that design becomes asynchronous
at the boundary of interface, which results in setup and hold violation,
metastability and unreliable data transfers.
• We know that any two systems can be asynchronous to each other when
they operate at two different frequency(Case I) or when they operate at
same frequency, but at two different clock phase angles (Case II)as shown.
•
•
Case – I Case – II
Block Diagram of Asynchronous FIFO
• In such a case if we need to do data transfer, there are very few methods to achieve this:
1. Handshake Signaling method.
2. Asynchronous FIFO.
Asynchronous FIFO
• Asynchronous FIFO has got two interfaces, one for writing the data into the FIFO and the other for reading the
data out. It has got two clocks, one for writing and the other for reading.
• System A writes the data in the FIFO and System B reads out the data from it.
• To facilitate error free operations, we have FIFO full and FIFO empty signals(With respect to corresponding
clock).
• FIFO full signal is used by system A (as when FIFO is full, we don't want
system A to write data into FIFO, this data will be lost), so it will be driven
by the write clock.
• Similarly, FIFO empty will be driven by the read clock. Here read clock
means system B clock and write clock means system A clock.
• Asynchronous FIFO is used at places when the performance is a matter,
when one does not want to waste clock cycles in handshake signals, when
there is a lot of system resources available.
• So Asynchronous FIFOs are used as buffers between two asynchronous
clock domains to exchange data safely.
• Synchronization is important to understand the signal stability in multi
clock domains since for a traveling signal the new clock domain appears to
be asynchronous.
• If the signal is not synchronized to new clock, the first storage element of
the new clock domain may go to metastable state and affects the
resolution time.
Depth of Asynchronous FIFO