Sorry if this is a very basic question.
Please look at the following code that I am referring to:
class one_jelly_bean_sequence extends uvm_sequence#(jelly_bean_transaction);
`uvm_object_utils(one_jelly_bean_sequence)
function new(string name = "");
super.new(name);
endfunction: new
task body();
jelly_bean_transaction jb_tx;
jb_tx = jelly_bean_transaction::type_id::create(.name("jb_tx"), .contxt(get_full_name()));
start_item(jb_tx);
assert(jb_tx.randomize());
finish_item(jb_tx);
endtask: body
endclass: one_jelly_bean_sequence
class gift_boxed_jelly_beans_sequence extends uvm_sequence#(jelly_bean_transaction);
rand int unsigned num_jelly_bean_flavors; // knob
constraint num_jelly_bean_flavors_con { num_jelly_bean_flavors inside { [2:3] }; }
function new(string name = "");
super.new(name);
endfunction: new
task body();
same_flavored_jelly_beans_sequence jb_seq;
repeat (num_jelly_bean_flavors) begin
jb_seq = same_flavored_jelly_beans_sequence::type_id::create(.name("jb_seq"), .contxt(get_full_name()));
assert(jb_seq.randomize());
jb_seq.start(.sequencer(m_sequencer), .parent_sequence(this));
end
endtask: body
`uvm_object_utils_begin(gift_boxed_jelly_beans_sequence)
`uvm_field_int(num_jelly_bean_flavors, UVM_ALL_ON)
`uvm_object_utils_end
endclass: gift_boxed_jelly_beans_sequence
I am not quite clear what is the difference between start_item and start used in the first and the second example.
Also, in case of start_item, I am not clear why reference to sequencer is not passed
PS: code reference
UVM Tutorial for Candy Lovers – 3. Transactions and Sequences – ClueLogic