I use these functions like this
In uvm_test
virtual task run_phase(uvm_phase phase);
super.run_phase(phase);
phase.raise_objection(this);
`uvm_info(get_type_name(),"I'm in dprx_test run before delay", UVM_LOW)
#1000000
print_config();
`uvm_info(get_type_name(),"I'm in dprx_test run after delay", UVM_LOW)
phase.drop_objection(this);
endtask:run_phase
In uvm_sequence:
virtual task pre_body();
// p_sequencer.get(x_aux_inst);
if (starting_phase != null)
starting_phase.raise_objection(this,"user_seq not finished");
`uvm_info(get_type_name(),"I'm in seq pre_body", UVM_LOW)
endtask: pre_body
virtual task body();
uvm_test_done.raise_objection(this);
x_aux_inst = new("x_aux_inst");
x_aux_inst.data_len = 1;
x_aux_inst.command = 4'b10_00;
`uvm_do(x_aux_inst)
uvm_test_done.drop_objection(this);
`uvm_info(get_type_name(),"I'm in seq body", UVM_LOW)
endtask
virtual task post_body();
if (starting_phase != null)
starting_phase.drop_objection(this,"user_seq finished");
endtask
Is there any problems here?