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
- Open RtlStudio and select this chapter.
- Open
student/rtl/ip/soc/dma_engine_top.svin the editor. - Locate the
p2m_meminterface declarations. - Fill in the
__TODO__assignments to connectp2m_mem.aclk,p2m_mem.aresetn,p2m_mem.awready,p2m_mem.wready, andp2m_mem.bvalidto the correct signals. - Open
student/tb/tb_top.svto verify the testbench structure. - Run Simulation from the sidebar.
- Check the Log panel for the
INFO: PASSmessage.
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
- Open the lesson workspace in the IDE. The fabric and the peripheral are one simulation.
- Run Verilator and follow the address, write data, and read response on the waveform.
- A passing log is not enough when decode or an IRQ line is the point of the lesson — those show up on the VCD.
- 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.