In Both Virtual Sequence and Virtual Sequencer which one is preferrable to use to drive the signals from sequence=>sequencer to Driver?

Hi sir,

I am new to UVM and I referred many documents to get idea about UVM Environment. Now I Know i should Use Virtual Sequence/ virtual sequencer to pass signals from sequence => sequencer to Driver. I should run Virtual sequence/Virtual sequencer in Environment or test module with null sequencer. I am having till confusion with this or doubt that

When i have

Sequence => Generate Stimulus
Sequencer => To control the stimulus using PUSH method
Driver => PULL signals from sequencer and connect to Design through virtual interface

why do i need virtual sequence or virtual sequencer to drive the signal from sequencer to driver. In both Virtual sequence and virtual sequencer which one should use to drive the signas can anyone guide me ?? or suggest me some examples or links to get idea abou this.

Thanks in advance.

See, there is lot more happening in this.
First of all you need to get to know why we use virtual concept here.?

As in major industries, tb designers and test cases designers are two different teams. As that of SV testbenches testcases writer needs to remember the name of the handles, due to which both team has to constantly communicate which was a major drawback.

Here in virtual concept, test case writer just need to know the handle for virtual sequencer, anyway virtual sequencer has the handles for actual sequencer present in the agent.
So, virtual sequence can be started over virtual sequencer, which in turn started over actual sequencer “virtually”.

Hope this helped you to grow
Regards
Ujjwal

In reply to Ujjwal Kaushik:

Hi Kaushik,

Thanks for reply.

Can you suggest me some links or documents to understand this virtual sequencer concept. Really I want to know why do we need virtual sequencer to drive the signals from sequencer to driver because as we know sequencer is used for porting inputs from sequence to driver using push method again why to use virtual concept here.

In reply to babanrosesalluri5:

Both Virtual sequence and Virtual sequencer are actually required to coordinate the running of sequences on different sequencers. When you have only one sequencer then virtual sequence does not provide any visible benefit,but if you have multiple agents in your environment(which is mostly the case) then you require it. Also use of Virtual sequencer is discouraged on Verification Academy because same coordination can be achieved by using virtual sequence only.

virtual sequence => you can remember it as sequence of sequencers.

also check this
http://cluelogic.com/2012/01/uvm-tutorial-for-candy-lovers-virtual-sequence/

In reply to Ankur Jain4:

Hi Ankur,

Thanks for reply.

According to your answer there is no need to define virtual sequence for one agent. If it so can you guide me how can i run the sequences using sequencer for passing stimuli to components in environment.

In reply to babanrosesalluri5:

I could not understand your question correctly, So let me explain two things to help:

Normal sequences always require a sequencer to run on. For example on this you can look at:
http://cluelogic.com/2011/07/uvm-tutorial-for-candy-lovers-transactions-and-sequences/

Virtual Sequences does not necessarily requires sequencer.Example is in my previous solution.

In reply to babanrosesalluri5:

He just means if you only have a single sequencer in your environment ( which is inside an agent ), you can simply start the sequence on that sequencer. No virtual sequence, no virtual sequencer.

  class test_1 extends test_base;
    `uvm_component_utils( test_1 );

    function new( string name = "", uvm_component parent = null );
      super.new( name, parent );
    endfunction

    virtual function void build_phase(uvm_phase phase);
      super.build_phase(phase); // execute test base
    endfunction

    task run_phase(uvm_phase phase);
      seq_1 seq;
      phase.raise_objection(this, "Objection raised");
      seq = seq_ARP::type_id::create("seq");
      if(!seq.randomize()) `uvm_fatal(report_id,"randomize() failed!")
      seq.start(env.an_agent.sequencer);
      phase.drop_objection(this, "Objection dropped");
    endtask

  endclass

Hi bmorris,

Thanks for reply. I understood about when i need to define Virtual sequence in environment. Could you please tell me any example with only one agent, one sequence and one sequencer how i have to pass stimulus from sequence to driver and how to define start function for one sequence and sequencer.

2.Q. Why virtual sequence concept has been introduced in verification environment ???

Hi ankur,

Thanks for sending a such nice example moreover what are the doubts i have i got the answers from replies from the post.

In reply to babanrosesalluri5:

“Could you please tell me any example with only one agent, one sequence and one sequencer how i have to pass stimulus from sequence to driver”

step 1) The driver begins running at simulation start, looking for “sequence items”.
step 2) You don’t talk directly with the driver, you start a sequence on the sequencer.
step 3) Nothing actually happens, until inside your sequence, you “start” a sequence item. The driver then detects the sequence item in the sequencer, pulls it into the driver, and executes whatever it’s programmed to do (bus activity) based on the properties of the transaction.

You don’t define start; it’s a method of uvm_sequence.

2.Q. Why virtual sequence concept has been introduced in verification environment ???

The virtual sequence is great for coordinating activity on multiple sequencers. A virtual sequence is not a seperate UVM class (its just a standard sequence), but it’s virtual in the fact that you don’t run it on a specific sequencer. I like to think of it as running out in the “ether”.

vseq.start(null);

The virtual sequence will generally have handles for any sequencers it uses, and optionally a method for setting/assigning them from the test (which can actually see them, buried down in the environment).

Hi bmorris,

Thank You for your explanation on my doubts. Really it is very helpful to me to get clear idea about sequence concepts. I will try to implement as you told. If i have any more doubts in UVM can i post you again??

Thanks in advance.