It seems that a virtual sequencer is a container class for other sequencers.
Is there some advantage to calling this a uvm_virtual_sequencer instead of just a uvm_component?
One can’t do a start on a uvm_virtual_sequencer (at least in the way that it is presented in the link).
A virtual sequencer is a sequencer that can run sequences, but it doesn’t connect to any drivers, hence the virtual name. It is designed to run virtual sequences that spawn sub-sequences on other sequencers.
You can start virtual sequences on a virtual sequencer. Refer to the run() task inside the test class of the referenced part of the Verification Academy.
One recommendation is to make the sequencer handles part of the virtual sequence and not the virtual sequencer, as this allows you to start() the virtual sequence on a ‘null’ virtual sequencer.
Ahh, missed that last part of the code.
Makes sense now.
I’m building a verification IP that has a configurable number of independent data channels. Normally I would have a sequencer per channel. The test bench people said that they don’t want to hook up a unknown amount of sequencers into their virtual sequence. Thinking that a virtual sequencer would allow them to hook up one, and then I can deal with controlling the multiple sequencers under the hood.