What you practice
Core idle DMA fill (3.5). Verify DMA memory fill operation with CPU idle state and interrupt handling. It is in Core idle + DMA fill — Part 3 · Interrupts & DMA of the RISC-V on SoC & System Masterclass.
The core and the mini-SoC simulate as one workspace in the IDE. Follow MMIO, interrupts, and the program on the Verilator waveform, not only a pass line.
What you will learn
This lesson teaches you how to verify a DMA engine that fills memory while the CPU is idle. You will observe how the system handles interrupts and memory transfers without CPU intervention. This is a critical pattern for high-performance embedded systems.
Learning objectives
- Understand the role of the DMA engine in offloading memory tasks from the CPU.
- Learn to interpret status registers and interrupt lines during DMA operations.
- Verify that the CPU halts or remains idle while the DMA completes its transfer.
- Inspect memory contents to confirm the DMA fill operation succeeded.
Theory
The DMA (Direct Memory Access) engine allows peripherals to transfer data directly to/from memory without CPU involvement. This frees the CPU to perform other tasks or enter low-power states. In this lesson, the CPU is configured to idle while the DMA fills a memory region. The system uses interrupts to signal completion or errors. You will verify that the gpio_out register reflects the expected data pattern after the DMA transfer. The halted signal indicates the CPU state, ensuring it did not interfere with the transfer.
Practice
- Open RtlStudio and select chapter 3.5.
- Open
student/rtl/design.svin the Explore panel. - Notice the
__TODO__[0]placeholders in theaxi_ifinstance declarations. - Replace each
__TODO__[0]with the correct address width value32. - Open
student/tb/tb_top.svin the Explore panel. - Run Simulation from the sidebar.
- Check the Log panel for
INFO:lines and the finalINFO: PASS. - If the simulation fails, inspect the
gpio_outandhaltedsignals in the Waveform tab.
Summary
You practiced configuring the DMA engine to perform memory fills while the core remains idle. By polling the status register, you verified that the transfer completed successfully without CPU intervention. This exercise demonstrated the efficiency of offloading data movement tasks to hardware peripherals.
© 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 system lesson in the IDE. The RV32I core and the mini-SoC fabric simulate together.
- Run Verilator and trace the program through MMIO: address, load/store data, and the peripheral response.
- Interrupts and DMA belong on the waveform next to the instruction stream, not only in a pass/fail line.
- Edit the integration RTL, resimulate, and run Yosys on the structural block when you want a netlist.
The lesson is done when the simulation matches Core idle DMA fill. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.