How to grab sequencer, to give to class instance

Hi,
I’m trying to implement worker sequence.
My code has the following packages apb_pkg, env_pkg, test_pkg, and seq_pkg. In seq_pkg I import apb_pkg and have a class that is my version of instance
“spi_read_seq read;” as shown under Worker Sequences in the example.
In this class I also create a instance of the sequencer that is in apb_pkg.

In my extended uvm_test I have an instance of seq_pkg class where I execute a create in the build phase and perform a .start(null); in the run_phase.

The code compiles but I get a null sequencer at run-time as indicated by the simulator message:
“neither the item’s sequencer nor dedicated sequencer has been supplied to start item in…”

In my version of “read.start(m_sequencer, this);”
if I add get_full_name(m_apb_sequencer )I get a compile error " too many actual arguments"

So I’m wondering if the purpose of ‘parent’ in
task read(input bit [7:0] addr, output bit [15:0] read_data,
input uvm_sequencer_base seqr, input uvm_sequence_base parent = null);

needs to be set to something other than null?
Thanks for any help,
–Ross

In reply to rossswanson:

get_full_name(m_apb_sequencer ) is a wrong command. get_full_name()does not have an argument, You should call m_apb_sequencer.get_full_name()-

In reply to chr_sue:

Thanks chr_sue,
That gives this compile error
formal and actual do not have assignment compatible data types (expecting datatype compatible with ‘class uvm_pkg::uvm_sequencer_base’ but found ‘string’ instead

In reply to rossswanson:

H****i,
Reading the virtual sequences section I see my extended uvm_test needs to set the sequencer in the seq_pkg.

No longer get the error “neither the item’s sequencer no…”.

But the sequence read task below is throwing error " NULL pointer dereference."
when I try to assign the i_addr

In apb_pkg:: is the following code
class seq_read extends uvm_sequence #(apb_seq_item);
`uvm_object_utils(seq_read)
const string report_id = “seq_read”;
bit [11:0] i_addr;
integer exp, i_data, Error_count;

apb_seq_item aseq;

function new(string name = “seq_read”);
super.new(name);
endfunction

task body;
aseq = apb_seq_item::type_id::create(“apb_request”);
start_item(aseq);
finish_item(aseq);
`uvm_info (“APB Seq”, $sformatf(“APB Data xfer = %h”, aseq.si_data), UVM_LOW)
i_data = aseq.si_data;
endtask:body

task apb_read(input bit [11:0] i_addr, input integer exp, output integer got,
input bit check, input integer mask,
input uvm_sequencer_base seqr, input uvm_sequence_base parent = null);

 reg [31:0] exp_masked, my_mask;
 bit i_error;
 
 aseq.si_addr = i_addr;  //  <-- error "NULL pointer dereference"