You should never create a virtual sequencer component. The best approach is to have the handles to your sequencers as part of a base virtual sequence. You can then extend your virtual sequences from the base virtual sequence. When the virtual sequence is created in the test, you assign the virtual sequence handles from the agent’s sequencers in the environment.
Sequencers are UVM components which are created once per entire simulation.
Sequencers are created inside their corresponding agent and in order use them we need to point to the handles present inside the agent.
Hence, we can say creating the handles inside virtual sequencer build phase is not necessary or not allowed.
Yes. You should never create a virtual sequencer component. Instead, assign the handles in the virtual sequence as I explained above. This reduces complexity in your environment, reduces the number of components you need to code/instantiate, and provides greater flexibility as you run your virtual sequence on a null sequencer. When you start your sequence and specify ‘null’ as the sequencer, UVM will create a sequencer for you automatically.