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) usinguvm_object_utilsanduvm_field_intmacros. - 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.
| Macro | Purpose |
|---|---|
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_end | Ends registration block. |
Field registration enables automatic print(), copy(), compare(), and record() functionality via UVM’s introspection system.
Practice
- Open this chapter in RtlStudio.
Confirm student/tb/env/axi_seq_item.sv and student/tb/tb_top.sv appear in Explore.
- In
student/tb/env/axi_seq_item.sv, replace each__TODO__with the correct field name in theuvm_object_utils_beginanduvm_field_intmacros. - In
student/tb/tb_top.sv, ensureaxi_seq_itemis imported and instantiated correctly (no changes needed—file is complete). - 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
- 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 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.