Hello,
We have a sequence in which below code is getting executed:
start_item(m_req_check);
finish_item(m_req_check);
and the sequence was started as:
vtl_completer_seq.start(m_env.m_virtual_sequencer.pcie_vtl_sqr);
I have put a check to confirm m_sequencer is not null before start_item.
on stat_item line, it gives error as:
UVM_FATAL @ 32647251000: uvm_test_top.m_env.m_vtl_agent.m_sequencer@@vtl_completer_seq [STRITM] sequence_item has null sequencer
Nitin
In reply to ngehlot123:
shouldn’t we start virtual sequence on virtual sequencer i.e., vtl_completer_seq.start(m_env.m_virtual_sequencer); instead of m_env.m_virtual_sequencer.pcie_vtl_sqr.
, it is difficult to tell with out seeing your code block, can you share it eda playground, mainly the code of the virtual sequence in test and virtual sequencer in env?
m_sequencer is object of class uvm_sequencer, and property inside the uvm_sequence class, when we call the start method of child(of uvm_sequence), it will assign the property m_sequencer to sequencer which is passed via argument, then it calls the body method of sequence. m_sequencer cannot access the properties of virtual_sequencer_handle(child), so we do the $cast(v_seqrh,m_sequencer), then pass the other seqr handles from the virtual_sequencer_handle.
other_seqrh = virtual_sequencer_handle.other_sequencer;
another_seqrh = virtual_sequencer_handle.another_sequencer;
UVM_FATAL @ 32647251000: uvm_test_top.m_env.m_vtl_agent.m_sequencer, is the name of the sequencer in m_vtl_agent is also “m_sequencer”??
Try the following:
if (m_sequencer == null)
`uvm_fatal("NULL", "SEQUENCER")
`uvm_info(get_type_name(), $sformatf("m_sequencer = %p", m_sequencer), UVM_MEDIUM)
start_item(m_req_check);
Rather than write the $cast(), look into the `uvm_declare_p_sequencer(type) macro.