What are a virtual sequence and a virtual sequencer in UVM, and how do th…
What are a virtual sequence and a virtual sequencer in UVM, and how do they coordinate stimulus across multiple agents?
Model answer
**Virtual Sequence:** A **virtual sequence** is a top-level coordinator ( master ) sequence that does **not** generate or send transaction items directly to a single driver. Instead, it starts and synchronizes multiple sub-sequences across different agent sequencers (for example, coordinating an AXI configuration sequence, a PCIe data sequence, and an interrupt sequence simultaneously). **Virtual Sequencer:** A **virtual sequencer** is a uvm_sequencer component that is **not connected to any driver** itself. Instead, it contains **handles (pointers) to the real protocol sequencers** located inside the various agents of the environment. In the environment's connect_phase , these handles are assigned to point to the actual sub-sequencers: *(Note: A virtual sequencer is optional—a virtual sequence can also be started with a null sequencer ( vseq.start(null) ) if its sub-sequencer handles are passed to the virtual sequence directly via configuration or setter methods.)*