I am trying to figure out what the purpose of a UVM Virtual Sequencer is.
If you look at what verification academy says about it. It is basically a container class for other sequencers.
class sequencer extends uvm_virtual_sequencer;
`uvm_component_utils(virtual_sequencer)
sequencer_a m_seq_a;
sequencer_b m_seq_b;
...
...
endclass
One just does a heretical reference to m_seq_a or m_seq_b when doing a start on their sequence.
Why isn't a virtual sequencer just a uvm_component? Is there something that a uvm_virtual_sequencer can do? One can't do a start on the virtual sequencer.
There are 2 ways to start virtual sequences (which will in turn start different sequences on different sequencers).
Like this.
However the approach of
Virtual Sequencer
is not recommended, as it just adds another layer of hierarchy and is complicated for reuse.Another point is that,
uvm_virtual_sequencer
is nothing but auvm_sequencer
only, and it can't be auvm_component
, as the virtual sequence will be started on it.Here is the relevant code from the UVM 1.2 source code.