Hello,
I have a task defined within a class as below
virtual task drive_input (
string name,
int prior = -1,
uvm_sequence_base parent = null,
uvm_object tr = null,
output status_e status);
..........
tr = env.agent.seqr;//The sequencer is of type uvm_sequencer #(pin_uvi_transfer_c #(1))
`uvm_info ("", $sformatf("cmp_pos_analog_seq_get_seqr drive_input: tr = %p", tr), UVM_HIGH)//Here I am getting non-null value printed
..........
endtask
And from a sequence (i.e child of uvm_sequence) I am calling the above task as shown below.
uvm_sequencer #(pin_uvi_transfer_c #(1)) tst_cmp_neg_ana_seqr ;
sal.drive_input(
.name ("tst_cmp_neg_analog_seq_get_seqr"),
.parent (this),
.tr (tst_cmp_neg_ana_seqr),
.status (sal_status));
if(tst_cmp_neg_ana_seqr == null) `uvm_error("","Unable to get tst_cmp_neg_ana_seqr sequencer from SAL")
I get the error “Unable to get tst_cmp_neg_ana_seqr sequencer from SAL” because tst_cmp_neg_ana_seqr is null although the print statement inside drive_input task displays non-null value for tr.
Please let me know if I am missing something here or is this expected result.