# Driver with two sequencer

**URL:** <https://verificationacademy.com/forums/t/driver-with-two-sequencer/31642>\
**Category:** UVM\
**Tags:** UVM, sequencer, driver, item, ports\
**Created:** [March 25, 2016, 7:51am UTC](https://verificationacademy.com/forums/t/driver-with-two-sequencer/31642 "2016-03-25T07:51:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexkidd84](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/alexkidd84/32/1540_2.png) [@alexkidd84](https://verificationacademy.com/forums/u/alexkidd84)\
**Post date:** [March 25, 2016, 7:51am UTC](https://verificationacademy.com/forums/t/driver-with-two-sequencer/31642/1 "2016-03-25T07:51:06Z")

</div>

Hi,

I don’t know if a similar question has been already posted, but I’m wondering if it is possibile to have a driver with two different “uvm\_seq\_item\_pull\_port”.  
In my code there are two sequences (and different sequencers) that are sending item to two different ports to the driver, but I get these errors:

**UVM\_ERROR** @ 1698.75 ns: uvm\_test\_top.tb.fec\_2\_fs\_traffic\_frm2fec\_agent.passive\_sequencer [TRY\_NEXT\_BLOCKED] try\_next\_item: the selected sequence ‘_uvm\_test\_top.tb.fec\_2\_fs\_traffic\_frm2fec\_agent.passive\_sequencer.fec\_2\_fs\_traffic\_frm2fec\_seq_’ did not produce an item within an NBA delay. Sequences should not consume time between calls to start\_item and finish\_item. Returning null item.  
**UVM\_ERROR** @ 1708.75 ns: uvm\_test\_top.tb.fec\_2\_fs\_traffic\_frm2fec\_agent.reset\_sequencer [uvm\_test\_top.tb.fec\_2\_fs\_traffic\_frm2fec\_agent.reset\_sequencer] get\_next\_item/try\_next\_item called twice without item\_done or get in between

In my driver two task in fork-join process are trying to get item from their respective ports. This is my code:

```verilog

task get_parameters_and_reset();
    @(posedge vif.clk);
    if(vif.en_ck) begin
      seq_collect_port.try_next_item(parameters_req);
      if (parameters_req == null) begin
        n_slot_req = n_slot_req;
        pilot_dist_req = pilot_dist_req;
      end
      else begin
        n_slot_req = parameters_req.n_slot;
        pilot_dist_req = parameters_req.pilot_dist;
        reset_driver = 1'b1;
        end
        seq_item_port.item_done(); 
      end
    end
    else begin
      reset_driver = 1'b0;
    end    
  endtask

task buffer_data();
    @(posedge vif.clk);
    if(vif.en_ck) begin
      seq_item_port.try_next_item(req);
      if (req == null) begin
        wr_en_dbg = 1'b0;
      end
      else begin
        n_slot_init = n_slot_req;
        pilot_dist_init = pilot_dist_req;
        traffic_buffer_fifo.put(req);
        wr_en_dbg = 1'b1;        
        $cast(rsp, req.clone());
        rsp.set_id_info(req);
        seq_item_port.item_done(rsp); 
      end
    end
    else begin
    wr_en_dbg = 'b0;
    end    
  endtask

```

The sequences that send item to driver are in a “fork-join none” process  
Can anybody help me?

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [March 25, 2016, 11:20am UTC](https://verificationacademy.com/forums/t/driver-with-two-sequencer/31642/2 "2016-03-25T11:20:32Z")

</div>

_In reply to [alexkidd84](https://verificationacademy.com/forums/t/driver-with-two-sequencer/31642):_  
I try to understand what your intention is. It looks like the first sequencer is providing parameters or in other words configuration data. In this case you do not need two sequencers.  
You can use for your parameters a configuration object which you can also randomize.  
Dealing with two sequencers makes your life more complicated, but it is possible.

---

<div class="post-metadata">

**Author:** ![alexkidd84](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/alexkidd84/32/1540_2.png) [@alexkidd84](https://verificationacademy.com/forums/u/alexkidd84)\
**Post date:** [March 25, 2016, 11:30am UTC](https://verificationacademy.com/forums/t/driver-with-two-sequencer/31642/3 "2016-03-25T11:30:32Z")

</div>

_In reply to [chr\_sue](https://verificationacademy.com/forums/t/driver-with-two-sequencer/31642/2):_

I have to get item from differente sequencer, because driver needs this configuration also in running\_phase (not only in configuration\_phase).

BTW I find my mistake, the two task were listening on the same port “seq\_item\_port”, so they both executed item\_done on the same port.
