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*.
| Modport | Direction | Meaning |
|---|---|---|
master | output write requests | Master drives address, data, and control signals |
master | input responses | Master receives ready/valid and response data |
slave | input requests | Slave receives address, data, and control signals |
slave | output responses | Slave drives ready/valid and response data |
The aclk and aresetn signals are shared and always input to both modports.
Practice
- Open this chapter in RtlStudio; files appear in Explore.
- Open
student/rtl/axi_if.svand fill in themodport master (...)block. - Open
student/tb/tb_top.sv— no edits needed; it already instantiatesdutand prints INFO. - Run Simulation from the sidebar; read Log for INFO messages.
- Confirm
INFO: PASSappears 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
- Open the lesson in the IDE and find the valid/ready or AXI channel ports in the editor.
- Simulate with Verilator. Confirm the beat on the VCD, not only in the transcript.
- Check that data moves only on the beats this lesson describes, and that backpressure holds the transfer.
- 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.