What you practice
MMIO load store (1.3). Measure MMIO store and load latency by connecting AXI interfaces in the design and verifying results in the testbench. It is in MMIO load/store timing — Part 1 · Core on Bus (MMIO) 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
You will measure the actual bus latency for MMIO store and load operations. This helps you understand how the RISC-V core interacts with peripheral memory-mapped I/O.
Learning objectives
- Understand the difference between store and load bus transactions.
- Measure the cycle count for an MMIO write operation.
- Measure the cycle count for an MMIO read operation.
- Verify data integrity after an MMIO load.
Theory
The RISC-V core uses a load-store architecture. All memory accesses go through the load-store unit (LSU). MMIO regions are mapped to specific addresses in the address space. The core sends a request to the bus. The bus routes the request to the correct peripheral. The peripheral responds with data or acknowledgment. The cycle count tells you how many clock cycles the transaction took. This latency depends on the peripheral's internal logic. It does not depend on the core's speed alone.
Practice
Open student/rtl/design.sv in RtlStudio. You need to connect the AXI interface instances to the correct address widths. The __TODO__[0] placeholder appears in the axi_if generic parameters. Replace the entire __TODO__[0] with 32. This sets the address width to 32 bits for all peripherals. Save the file. Open student/tb/tb_top.sv to see the testbench. The testbench performs a store and a load. It checks the results. Run the simulation. Check the Log panel for the results.
Summary
You practiced measuring the actual bus latency for MMIO store and load transactions using the testbench counter. This verification confirmed that the rv32i_lsu_axi_master correctly handles backpressure and data capture. The lesson demonstrated that valid transactions complete within a reasonable cycle count without hanging.
© 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 MMIO load store. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.