RTL Studio Open IDE

0.2 · AXI CLASS

AXI SV interface and modport: master and slave directions

Bundle AXI signals into an SV interface and define master/slave modport directions.

Watch on YouTube

What you practice

AXI SV interface and modport: master and slave directions (0.2). Bundle AXI signals into an SV interface and define master/slave modport directions. It is in AXI SV Interface and Modport — Part 0 · AXI Foundation of the AXI Masterclass. Bundle AXI’s five channels into modern SystemVerilog interfaces.

AXI only counts when the handshake simulates. RTL Studio is the Verilog and SystemVerilog IDE where you edit the RTL and prove each beat on a VCD.

What you will learn

You will learn how to bundle AXI channel signals into a SystemVerilog interface and define correct modport directions for master and slave endpoints.

Learning objectives

  • Declare AXI channel signals in a SystemVerilog interface.
  • Define modport direction lists for master and slave endpoints.
  • Connect a dummy slave module to the interface.
  • Elaborate the interface in a testbench and verify signal directions.

Theory

An AXI interface bundles all channel signals (AW, W, B, AR, R) into a single package for reuse and clarity. Modports declare signal directions *from the perspective of the module using the interface*.

ModportDirectionMeaning
masteroutput write requestsMaster drives address, data, and control signals
masterinput responsesMaster receives ready/valid and response data
slaveinput requestsSlave receives address, data, and control signals
slaveoutput responsesSlave drives ready/valid and response data

The aclk and aresetn signals are shared and always input to both modports.

Practice

  1. Open this chapter in RtlStudio; files appear in Explore.
  2. Open student/rtl/axi_if.sv and fill in the modport master (...) block.
  3. Open student/tb/tb_top.sv — no edits needed; it already instantiates dut and prints INFO.
  4. Run Simulation from the sidebar; read Log for INFO messages.
  5. Confirm INFO: PASS appears after the simulation completes.

Summary

You practiced bundling AXI channel signals into a parameterized SystemVerilog interface and correctly defined master and slave modport directions. Master modports declare request channels as outputs and response channels as inputs, while slave modports declare request channels as inputs and response channels as outputs. Shared clock and reset signals are consistently declared as inputs to both modports, ensuring proper synchronization and interface contract clarity. This foundational step enables reliable design elaboration and prepares the interface for integration with real AXI slaves and masters.

Run it in the Verilog IDE

  1. Open the lesson in the IDE and find the valid/ready or AXI channel ports in the editor.
  2. Simulate with Verilator. Confirm the beat on the VCD, not only in the transcript.
  3. Check that data moves only on the beats this lesson describes, and that backpressure holds the transfer.
  4. Synthesize the RTL master, slave, or buffer with Yosys. Leave the UVM bench out of synthesis.

The lesson is done when the simulation matches AXI SV interface and modport: master and slave directions. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.