Default sequence in UVM

Hello all,
In UVM, default sequences can be used to start a sequence. I can see many replies in this forum regarding default sequences say “It is not recommended to use default sequences in test”.
Could you please tell why it is not recommended to use default sequences in a test?
what will the issue while using a default sequence?

In reply to SriGanesh D:

In general, you want all of the testbench stimulus generation and response (i.e. sequences) to be configured/started during the run_phase() of your test. This is desired to allow the user to control the exact relationship between these sequences.

There are several reasons using a default_sequence doesn’t follow this:

  • Setting a default_sequence is done outside of the run_phase(). Additionally, changing the default_sequence requires changes outside of the run_phase().
  • There is no mechanism to control when the default_sequence starts, other than at the beginning of a specific phase.
  • You can’t run more than one sequence
  • You can’t easily run additional sequences on the same sequencer
  • Debugging a default_sequence can be difficult since the user may not be aware that the default_sequence exists.
  • The default_sequence can’t be randomized() or otherwise configured

It’s simple enough to create()/randomize()/start() a single sequence at the beginning of the run_phase() instead of setting a default_sequence.

In reply to cgales:

Agree with your reply, but i am wandering what is the advantage by using default_sequence and has got no idea. do you have any idea or advice ?

In reply to ansami:

The default_sequence is a leftover from the OVM which is not deprecated. There is no benefit using this construct. You should not use it in your environment.