UVM null object access error

Hi,

In one of the UVC sequencer I have code:

virtual task run_phase(uvm_phase phase);
`uvm_info(get_type_name(), “inside run()”, UVM_MEDIUM)
forever begin
uvc_cfg.reset_phase_objection.wait_for_obj_gt(0, uvc_cfg.reset_phase_component);



end
endtask : run_phase


I am getting following error for uvc_cfg.reset_phase_objection.wait_for_objection_count_gt(0, uvc_cfg.reset_phase_component);
though I confriemd through display messages that all dependent objects have been created during build phase.
Error-[NOA] Null object access
The object at dereference depth 1 is being used before it was
constructed/allocated.
Please make sure that the object is allocated before using it

Can anyone tell me how to debug this?

Thanks,
Ashish

In reply to ashishk:

Is this in a component that extends uvm_sequencer? If so, you should never define a new run_phase() for a uvm_sequencer because the existing run_phase() is needed for the component to run correctly.

If this is part of a different type of component, you will need to provide more information about your code so that we can see what you are trying to accomplish.

In reply to cgales:

Yes this is extended from uvm_sequencer. This is existing axi uvc VIP and same sequencer code is for master as well as slave. For master its running well but when I took slave instance it started giving me issues. Is there any switch in UVM which can give me more detail of the error?

In reply to ashishk:

The error you are seeing is a SystemVerilog/Simulator error (a NULL pointer error) and has nothing to do with UVM. As I previously mentioned, by creating your own run_phase() in a uvm_sequencer, you are breaking the internal workings of UVM and the side-effects are unpredictable. I’m not sure why your UVC is doing that, but I can guarantee that there is a better way to accomplish what you are currently doing.