//body of transaction
class adder_transaction extends uvm_sequence_item;
rand bit [3:0]a0;
rand bit [3:0]b0;
rand bit doAdd0;
bit [3:0]result0;
`uvm_object_utils(adder_transaction)
function new(string name = "");
super.new(name);
endfunction
constraint c{a0 inside {[1:15]};b0 inside {[1:15]};}
endclass
//body of sequence
class adder_sequence extends uvm_sequence#(adder_transaction);
`uvm_object_utils(adder_sequence)
function new(string name = "");
super.new(name);
endfunction: new
task body();
$display("body of sequence");
repeat(15)
begin
sa_tx = adder_transaction::type_id::create("sa_tx");
start_item(sa_tx);
assert(sa_tx.randomize());
finish_item(sa_tx);
end
endtask: body
endclass