RTL Studio Open IDE

4.3 · SOC CLASS

DMA descriptor CSR

Implement SRC/DST/LEN/GO descriptor registers for a DMA controller using AXI4-Lite interface.

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

What you practice

DMA descriptor CSR (4.3). Implement SRC/DST/LEN/GO descriptor registers for a DMA controller using AXI4-Lite interface. It is in DMA Descriptor CSR — 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 implement the control and status registers for a DMA descriptor. This lesson covers how to map AXI4-Lite write addresses to internal registers for source address, destination address, transfer length, and a trigger pulse.

Learning objectives

  • Define register addresses for SRC, DST, LEN, and GO descriptors.
  • Implement a state machine to handle AXI4-Lite read and write transactions.
  • Extract data from AXI write payloads to update internal descriptor registers.
  • Generate a one-cycle go_pulse when the GO register is written.

Theory

A DMA descriptor is a small block of memory that tells the DMA engine where to read from, where to write to, and how many bytes to transfer. The CPU writes these values via a register interface, typically AXI4-Lite. The DUT must decode the write address to determine which register is being targeted. For example, writing to address 0x0 updates the source address register. Writing to address 0xC with bit 0 set triggers the DMA transfer. The interface uses a simple state machine to wait for valid addresses, accept data, and return responses. The go_pulse is a single-cycle signal that indicates the start of a transfer.

Practice

  1. Open this chapter in RtlStudio and confirm the files appear in the Explore tree.
  2. Open student/rtl/ip/soc/dma_descriptor_csr.sv in the editor.
  3. Define the REG_SRC, REG_DST, REG_LEN, and REG_GO localparameters with addresses 32'h00, 32'h04, 32'h08, and 32'h0C respectively.
  4. Ensure the always_ff block correctly decodes lat_addr[11:0] to update src_r, dst_r, len_r, and generate go_pulse.
  5. Open student/tb/tb_top.sv and run Simulation from the sidebar.
  6. Check the Log panel for INFO: PASS.

Summary

You implemented the SRC, DST, LEN, and GO descriptor registers to control DMA data movement. This exercise reinforced your understanding of CSR interfaces and register mapping within the SoC design. By verifying the simulation output, you confirmed that the descriptor logic correctly triggers the data transfer process. This foundational step is essential for mastering efficient data movement in embedded systems.

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