There are primarily two ways to start a sequence : use a
`uvm_do macro, or use the
start() method. If you have read How to execute sequences via `uvm_do macros ?, you might already know that
`uvm_do macros eventually call the
start() method, and the macros act as a wrapper to execute both data items and sequences on the default sequencer "m_sequencer".
uvm_sequence_item objects have a uvm_sequencer_base handle called m_sequencer, to which a different sequencer can be assigned. This can be achieved in the following ways:
- provide a sequencer handle in
- use the sequencer of the parent sequence
- provide a sequencer via
virtual task start ( uvm_sequencer_base sequencer, uvm_sequence_base parent_sequence = null, int this_priority = -1, bit call_pre_post = 1 ); virtual function void set_sequencer (uvm_sequencer_base sequencer);
A sequence is always executed by the default sequencer. It's just that the default sequencer is made to point to the sequencer on which we want the sequence to execute on.