What you practice
LSU AXI-Lite master (1.1). Implement the reset logic for an AXI4-Lite master FSM to initialize state and data registers for RISC-V load/store operations. It is in LSU to AXI-Lite master FSM — 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 implement the control logic for an AXI4-Lite master interface within a RISC-V LSU. This module translates simple load/store requests into the multi-phase AXI protocol required by the system bus.
Learning objectives
- Complete the FSM state transitions for AXI write and read bursts.
- Understand how to handshake with AXI address and data channels.
- Verify the master by writing to GPIO registers and reading them back.
Theory
The AXI4-Lite protocol separates address, write data, and read data channels. A master must coordinate these channels to ensure data integrity. The FSM typically moves through idle, address, data, and response states. For writes, the master asserts AWVALID and WVALID. It waits for AWREADY and WREADY. It then waits for BVALID and BREADY to complete the write. For reads, the master asserts ARVALID. It waits for ARREADY. It then waits for RVALID and RREADY to receive data. The master must hold address valid signals until the bus accepts them. This ensures the slave sees the correct address. The FSM must also handle the reset state correctly. All registers should initialize to a known idle state.
Practice
- Open RtlStudio and select this chapter from the Examples or Lecture list.
- Confirm that
student/rtl/ip/riscv/rv32i_lsu_axi_master.svandstudent/tb/tb_top.svappear in the Explore tree. - Open
student/rtl/ip/riscv/rv32i_lsu_axi_master.svin the editor. - Locate the
always_ffblock and the__TODO__placeholders in the reset section. - Replace each
__TODO__with the correct initial value for the FSM and its registers. - The reset logic must initialize
statetoST_IDLEand all data/address queues to zero. - Save the file and run Simulation from the left sidebar.
- Check the Log panel for the
INFO:lines and the finalINFO: PASSmessage.
Summary
You implemented the reset logic for the AXI4-Lite master FSM and its internal registers to ensure proper initialization. This practice reinforced the handshake protocol between the LSU and the memory-mapped I/O slave interface. Successful simulation confirms that the master correctly sequences address, data, and response channels for both read and write operations.
© 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 LSU AXI-Lite master. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.