Driver with two sequence item

Hello,

I have a situation where i have two sequence item,

  1. class seq_item_one extends uvm_sequence_item.
  2. class seq_item_two extends uvm_sequence_item.

I have one interface and my driver drives variables of both seq_item to the interface one by one.
So, first my driver drives variable of seq_item_one and then variable of seq_item_two and yes,i dont want to combine these two sequence _item.
So can i have one sequencer and one driver two handle both the seq_item or there must be a dedicated sequencer and driver for each sequence item.

As as far as i know sequencer and driver are generally parameterized with one sequence_item,
class my_driver extends uvm_driver#(seq_item_one);

please guide me further in this,
Thanks in advance,
Dhruvesh.b

In reply to Dhruvesh.b:

I’m not sure what do you mean with 2 different seq_items, but each sequencer/driver pair is assigned for a specific seq_item and parameterized for it. Also for the virtual interface you need data specifie in the corresponding seq_item. Of course the sequence will generate different seq_itemsbut of the sam type (class).

In reply to chr_sue:
What i am trying to convey here is can my driver drive two seperate seq_item sequencetially.

In reply to Dhruvesh.b:

From your question, I understood that you need to drive two different types of transactions. If it is the case, as you said driver and sequencer should be parametrized with one type of transaction only. To drive two different types of transactions you should have two agents with two different drivers and each driver parameterized with different transactions as explained with the below example.



interface intf1(bit clock);

...

endinterface

interface intf2(bit clk);

....

endinterface

class seqence_item_one extends uvm_sequence_item;

....
endclass


class seqence_item_two extends uvm_sequence_item;

....
endclass

class sequence_one extends uvm_sequence#(squence_item_one);

...
endclass

class sequence_two extends uvm_sequence#(squence_item_two);

...
endclass

class driver_one extends uvm_driver#(sequence_item_one);

   virtual intf1 vif;

....
endclass

class sequencer_one extends uvm_sequencer#(sequence_item_one);

 

....
endclass

class diver_two extends uvm_driver#(sequence_item_two);

   virtual intf2 vif;

...

endclass

class sequencer_two extends uvm_sequencer#(sequence_item_two);

 

....
endclass

// agent1 should enclose drver_one & sequencer_one
// agent2 should enclose driver_two & sequencer_two
 
class test extends uvm_test;

  sequence_one seq1;
  sequence_two seq2;
...

  task run_phase(uvm_phase phase);
    seq1 = sequence_one::type_id::create("seq1");
    seq2 = sequence_two::type_id::create("seq2");

    phase.raise_objection(this);
    seq1.start(env.agt1.seqr1);// starting seq1 on agent1 seuencer
    seq2.start(env.agt2.seqr2);// starting seq2 on agent2 sequencer
    phase.drop_objection(this);
  endtask
endclass


If the sequence_item_one has to be driven first & sequence_item_two should be driven later we can start the seq1 & seq2 sequentially from the test. If both sequence_item_one & sequence_item_two are to be driven at the same time we can start seq1 & seq2 within fork-join.

I hope it’s clear.

Regards,
Shanthi

In reply to Dhruvesh.b:

In reply to chr_sue:
What i am trying to convey here is can my driver drive two seperate seq_item sequencetially.

No it cannot and it is not useful. For 1 pinlevel interface you need exactly 1 seq_item type (class). The sequencer and driver parameterized for the same seq_item will generate the seq_item and drive the pinlevel interface taking the data from the seq_item.
Another pinlevel interface needs another seq_item.

In reply to chr_sue:

Okay,now it is cleared.
Thank you for your suggestion and providing clearance to this concept.

Once again Thank you,
Dhruvesh.B