RTL Studio Open IDE

2.1 · AXI CLASS

AXI sequence item: address, data, and UVM field macros

Define an AXI4-Lite sequence item with address, data, and response fields using UVM field macros.

Watch on YouTube

What you practice

AXI sequence item: address, data, and UVM field macros (2.1). Define an AXI4-Lite sequence item with address, data, and response fields using UVM field macros. It is in AXI Sequence Item — Part 2 · AXI4-Lite UVM Verification of the AXI Masterclass. Verify the AXI4-Lite DUT with UVM and RAL.

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

Today you will define a UVM sequence item for AXI4-Lite transactions, register its fields using uvm_field_int macros, and verify it in a minimal testbench.

Learning objectives

  • Create a UVM sequence item extending uvm_sequence_item.
  • Register AXI fields (addr, data, wstrb, resp, is_write) using uvm_object_utils and uvm_field_int macros.
  • Use convert2string() to print transaction content.
  • Run a minimal UVM testbench that instantiates and randomizes the sequence item.

Theory

UVM sequence items model transaction payloads. They must extend uvm_sequence_item and use uvm_object_utils macros to enable field registration, copy, compare, and print operations.

MacroPurpose
uvm_object_utils_begin(T)Starts registration for class T.
uvm_field_int(field, flag)Registers a 32-bit or smaller integral field with UVM operations.
uvm_object_utils_endEnds registration block.

Field registration enables automatic print(), copy(), compare(), and record() functionality via UVM’s introspection system.

Practice

  1. Open this chapter in RtlStudio.

Confirm student/tb/env/axi_seq_item.sv and student/tb/tb_top.sv appear in Explore.

  1. In student/tb/env/axi_seq_item.sv, replace each __TODO__ with the correct field name in the uvm_object_utils_begin and uvm_field_int macros.
  2. In student/tb/tb_top.sv, ensure axi_seq_item is imported and instantiated correctly (no changes needed—file is complete).
  3. Run Simulation → Run and check the Log panel for INFO: output.

Summary

You defined a UVM sequence item for AXI4-Lite transactions, including randomized address, data, write flag, and response fields. You registered the class with uvm_object_utils and each field with uvm_field_int macros to enable automatic copy, compare, print, and record operations. You integrated the sequence item into the testbench by updating the filelist, importing UVM packages, and instantiating it in tb_top.sv to verify correct behavior through INFO-level logging. The key takeaway is that UVM field macros eliminate boilerplate code and ensure consistent object behavior across the verification environment.

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 sequence item: address, data, and UVM field macros. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.