Hi,
i am trying to implement raise_objection() and drop_objection() in pre/post body. the simulator is giving fatal error message like “Null instance encountered when dereferencing ‘this.starting phase’”. Please suggest me how to implement and what is necessary ?
It is highly recommended that raise_objection() and drop_objection() only be used in the run_phase() of your test. Since the run_phase() of your test will encapsulate all of your test sequences, there is no need to use raise_objection() or drop_objection() in any part of a sequence.
Hi Kbkdec :
Can you try to use raise_objection/drop_objection inside your seq body()? like
…
task body;
virtual task pre_start(); // optional
if ( starting_phase ! = null ) // to mk sure your seq is not sub_seq of another seq
staring_phase.raise_objection(this);
…
endtask
…
virtual task post_start(); // optional
if (starting_phase ! = null)
starting_address.drop_objection(this);
…
end
endtask