ArticleslgStudy

engineering

FIFO (electronic)

FIFO (electronic) is a engineering topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand FIFO (electronic) rather than just read about it. In short: 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.

FIFO (electronic) — main illustration
FIFO (electronic) — illustration

Key takeaways

  • FIFO (electronic) belongs to engineering; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect FIFO (electronic) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of FIFO (electronic) from memory before moving on to harder problems.

Reference excerpt

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.

Interface ports

A FIFO has two electrical interfaces known as the write port and read port, through which it exchanges data and status information with external circuits.

Write and read agents The external circuits connected to a FIFO's ports consist of a data producer (variously referred to as data source or write agent) that stores data in the FIFO and a data consumer (also known as data sink or read agent) that fetches the stored data. More specifically, the producer sends data to and receives status information from the write port, and the consumer receives both data and status from the read port.

Clock domain Each port operates in the clock domain of the external circuit it is connected to, meaning that the port and external circuit share a common clock signal. The write port operates in the producer's clock domain and thus all write port signals are synchronized to the producer's clock. Similarly, the read port operates in the consumer's clock domain.

FIFO types Every FIFO is categorized as either synchronous or asynchronous.

Synchronous FIFO

A synchronous FIFO is an electronic FIFO that uses a common clock for the read and write ports. Since read and write operations take place in the same clock domain, the FIFO's status signals (buffer level, threshold flags) can be safely used by both the data producer and consumer without causing metastability. Consequently, a synchronous FIFO outputs a single, shared group of status signals.

Asynchronous FIFO

An asynchronous FIFO is an electronic FIFO that uses different clocks for the read and write ports. To avoid errors due to metastability, a dedicated set of status signals (buffer level, threshold flags) is output for each clock domain. The circuitry used to circumvent metastability introduces additional latency (compared to synchronous FIFOs) into status flag updates when data is written to an empty FIFO or read from a full FIFO.

Memory attributes To facilitate concurrent read and write operations, the memory in all asynchronous FIFOs and in many synchronous FIFOs is dual-ported, typically consisting of a register file or dual-ported RAM (random access memory). In asynchronous FIFOs, the memory is an asynchronous circuit that is accessible to logic operating in any clock domain.

Width The data written to and read from a FIFO typically have the same, fixed word size (number of bits) — commonly known as the FIFO width — which matches the native word size of the internal memory.

Depth The maximum number of words that can be stored in a FIFO is known as the FIFO depth. Although it is not required, the depth is usually an integer power of two, as this tends to simplify circuitry and improve speed performance. To avoid overflow, the FIFO depth must be large enough to store the data resulting from the worst-case difference between data production and consumption rates, and the average bandwidths of the producer and consumer must match. Also, in asynchronous FIFOs, a small amount of additional depth is usually provided to allow for status latency.

Memory address registers A FIFO is implemented as a circular buffer that employs two memory address registers (MARs) to store the addresses of (pointers to) the next memory locations to be accessed. The read MAR (RMAR) indicates the next location that data will be read from, and the write MAR (WMAR) indicates the next location that data will be written to. Each MAR is associated with a particular port, and thus operates in that port's clock domain.

Each MAR is implemented as a counter, with the count incremented every time data is transferred (WMAR incremented upon FIFO write; RMAR incremented upon FIFO read). Initially both MARs point to the first memory location and the FIFO is empty. A FIFO becomes full when the write address reaches the read address, and empty when the read address reaches the write address. When a MAR addresses the last location in memory, it will automatically roll over to the first memory address upon the next increment. For any particular FIFO, the MARs may be implemented as either binary or Gray code counters. Binary counters are usually preferred in synchronous FIFOs, as this simplifies the FIFO circuitry. Gray code counters, or Gray code-encoded binary counters, are used in asynchronous FIFOs to avoid errors due to metastability.

Status signals

Buffer level Many FIFOs output a binary value that indicates the current buffer level (number of words stored). Depending on its design, a FIFO may do this by either tracking the level with a counter or computing the level using pointer arithmetic. Synchronous FIFOs may use either method, whereas asynchronous FIFOs are restricted to using pointer arithmetic.

Tracking via counter

In a synchronous FIFO, the buffer level may be monitored by tracking it with a bidirectional binary counter. The count is incremented when data is written to the FIFO, and decremented when data is read. The binary count value output by the counter directly indicates the buffer level. This method is not suited to asynchronous FIFOs because the read and write ports operate in different clock domains, which would require the counter to be controlled by two different clocks.

… excerpt ends here. Continue reading the full article.

Illustrations

FIFO (electronic): Integrated circuit, 5,048 words by 8 bits FIFO (NEC D485505g-25)
Integrated circuit, 5,048 words by 8 bits FIFO (NEC D485505g-25)
FIFO (electronic): A FIFO provides two ports through which it connects to an external data producer and data consumer
A FIFO provides two ports through which it connects to an external data producer and data consumer
FIFO (electronic): Symbolic representation of a synchronous FIFO. Both ports share a common clock, which allows them to also share status information.
Symbolic representation of a synchronous FIFO. Both ports share a common clock, which allows them to also share status information.
FIFO (electronic): Symbolic representation of an asynchronous FIFO. Each port has a unique clock, thus requiring it to generate status signals specific to its clock domain.
Symbolic representation of an asynchronous FIFO. Each port has a unique clock, thus requiring it to generate status signals specific to its clock domain.
FIFO (electronic) illustration

Worked examples

Example 1 — a first encounter with FIFO (electronic)

Start with the simplest possible case. Write down what FIFO (electronic) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In engineering, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to FIFO (electronic) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about FIFO (electronic) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of FIFO (electronic)

In research
FIFO (electronic) appears in engineering research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses FIFO (electronic) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
FIFO (electronic) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Digital circuits, so understanding it makes those chapters shorter.
In everyday life
Look for FIFO (electronic) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “FIFO (electronic)” →

How to study FIFO (electronic) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what FIFO (electronic) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain FIFO (electronic) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is FIFO (electronic) in simple terms?

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 indepe…

Why does FIFO (electronic) matter?

Because it connects several engineering ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study FIFO (electronic)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on FIFO (electronic).

Tags

  • Digital circuits

Keep exploring