Driver with two sequencer

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:


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?

In reply to alexkidd84:
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.

In reply to chr_sue:

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.