Inherits from uvm_sequence_item (which is an uvm_object). It uses
Field Macros for printing, copying, and comparing.
class my_transaction extends uvm_sequence_item;
rand bit [31:0] data;
rand bit [7:0] addr;
`uvm_object_utils_begin(my_transaction)
`uvm_field_int(data, UVM_ALL_ON)
`uvm_field_int(addr, UVM_ALL_ON)
`uvm_object_utils_end
function new(string name="my_transaction");
super.new(name);
endfunction
constraint c_addr { addr < 100; }
endclass