Can we use run task instead of body task inside a sequence

In reply to sj1992:

In reply to dave_59:
Thanks for your help warner.
Hi Dave,
Can you tell me the difference between body task and run task. I believe we can use both the tasks in uvm test
Thanks

The run_phase can be used only in components which extended from uvm_component such as uvm_test, uvm_env, uvm_monitor, etc. The uvm_sequence is not extended from uvm_component (it is being extended from uvm_sequence_base, uvm_sequence_item, uvm_transaction, uvm_object), then the run_phase never existed. If you use uvm_phase in sequence, it will be your own defined task. The uvm_sequence only has body task which is implemented in base class, this task will be called when you start the sequence.