RTL Studio Open IDE

4.2 · SOC CLASS

Mem ↔ stream FIFO bridge

Bridge memory port and AXI-Stream with a small FIFO to decouple data producers and consumers.

Video coming soon. This lesson page stays at the same URL when the lecture publishes.

What you practice

Mem ↔ stream FIFO bridge (4.2). Bridge memory port and AXI-Stream with a small FIFO to decouple data producers and consumers. It is in Mem Stream FIFO Bridge — Part 4 · Data Movement of the SoC Masterclass. Move data with AXI-Stream slices, mem↔stream FIFOs, and a small DMA engine.

SoC lessons simulate the fabric and the peripheral together in the IDE. Verilator is the simulator; the waveform is where address and response show up.

What you will learn

You will bridge a memory read port and an AXI-Stream interface using a small FIFO. This pattern is essential for decoupling data producers from consumers in SoC designs.

Learning objectives

  • Implement a simple synchronous FIFO for data buffering.
  • Connect memory read data to stream output signals.
  • Manage read and write pointers for FIFO state tracking.
  • Verify data integrity through a testbench simulation.

Theory

A FIFO (First-In-First-Out) buffer stores data temporarily to handle rate mismatches. It uses a write pointer for incoming data and a read pointer for outgoing data. The count signal tracks the number of valid items in the buffer. When the memory interface asserts mem_ren, data is pushed into the FIFO. When the stream interface asserts m_tvalid and m_tready, data is popped from the FIFO. The mem_rvalid signal indicates when the memory interface is ready to accept a new request or has completed one. In this simple bridge, mem_rvalid is directly tied to mem_ren to acknowledge the request. The m_tvalid signal is asserted whenever the FIFO is not empty. The m_tdata output is driven by the data at the current read pointer.

SignalDirectionDescription
mem_renInputMemory read enable signal
mem_rdataInputData from memory
m_tvalidOutputStream data valid signal
m_treadyInputStream ready signal
countInternalNumber of items in FIFO

Practice

Open this chapter in RtlStudio and confirm the files appear in Explore. Open student/rtl/ip/soc/mem_stream_fifo_bridge.sv to implement the FIFO logic. Fill in the __TODO__ comments to connect the memory data to the stream output. Ensure mem_rvalid reflects the mem_ren signal. Ensure m_tvalid is high when count is not zero. Ensure m_tdata outputs the data from the FIFO at the read pointer. Open student/tb/tb_top.sv to run the simulation. Click Simulation in the sidebar and select Run. Read the Log panel to check for INFO: messages.

Summary

You implemented a bridge connecting a memory port to an AXI-Stream interface using a small FIFO for data buffering. This exercise reinforced key concepts in data movement and protocol conversion within a SystemVerilog design. The successful simulation output confirms that the bridge correctly handles the transition between the two domains.

© 2026 RtlStudio. Licensed under CC BY-NC-ND 4.0. Commercial use and modifications by third parties are not permitted.

Run it in the Verilog IDE

  1. Open the lesson workspace in the IDE. The fabric and the peripheral are one simulation.
  2. Run Verilator and follow the address, write data, and read response on the waveform.
  3. A passing log is not enough when decode or an IRQ line is the point of the lesson — those show up on the VCD.
  4. Run Yosys on the RTL island you just integrated when you want the mapped cells.

The lesson is done when the simulation matches Mem ↔ stream FIFO bridge. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.