RTL Studio Open IDE

4.6 · SOC CLASS

DMA engine top

Integrate descriptor CSR and transfer FSMs in dma_engine_top.

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

What you practice

DMA engine top (4.6). Integrate descriptor CSR and transfer FSMs in dma_engine_top. It is in DMA Engine Top — 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 integrate the descriptor CSR and transfer FSMs inside the DMA engine top module. This lesson connects the configuration logic with the actual data movement paths.

Learning objectives

  • Connect the descriptor CSR outputs to the memory-to-peripheral and peripheral-to-memory FSMs.
  • Instantiate the private AXI interface for the peripheral-to-memory path.
  • Drive the clock and reset signals for the private AXI interface.
  • Verify the top-level integration using the provided testbench.

Theory

The DMA engine top module acts as the controller for data movement between memory and peripherals. It combines two distinct transfer directions: memory-to-peripheral (M2P) and peripheral-to-memory (P2M). The dma_descriptor_csr module handles register access to configure source addresses, destination addresses, and transfer lengths. It also generates a go_pulse to trigger transfers. The M2P path uses a shared memory master interface (m_mem). The P2M path requires its own private memory master interface (p2m_mem) to avoid bus contention with the M2P path. This private interface must be driven by the same clock and reset as the rest of the design. The top module aggregates the done_irq signals from both FSMs to notify the CPU when transfers complete.

Practice

  1. Open RtlStudio and select this chapter.
  2. Open student/rtl/ip/soc/dma_engine_top.sv in the editor.
  3. Locate the p2m_mem interface declarations.
  4. Fill in the __TODO__ assignments to connect p2m_mem.aclk, p2m_mem.aresetn, p2m_mem.awready, p2m_mem.wready, and p2m_mem.bvalid to the correct signals.
  5. Open student/tb/tb_top.sv to verify the testbench structure.
  6. Run Simulation from the sidebar.
  7. Check the Log panel for the INFO: PASS message.

Summary

You successfully integrated the descriptor CSR and transfer FSMs into the dma_engine_top module by instantiating the M2P and P2M DMA engines. You configured the private P2M memory interface to accept all writes and indicate no pending responses, ensuring independent operation from the shared memory path. This exercise reinforced the importance of proper clock distribution and interface routing for managing separate data movement paths without bus contention.

© 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 DMA engine top. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.