Layered sequencers

Hi UVM forum,
I have a layered sequencers architecture one:many.
meaning that I have few lower sequences with a pointer to one upper sequencer.
in the sequences I have the following code.


class lower_seq_A extends uvm_sequence #(my_seq_item);
   upper_sequencer upper_seqr;
   ...
   task body();
      forever begin
         upper_seqr.get(req_up);
         start_item(req_lo);
         finish_item(req_lo);
      end
   endtask
endclass : lower_seq_A

There are scenarios that all the sequences request item from the upper sequencer at the same simulation time.
so now new I have race condition, if one of the sequences get the request, the upper sequencer clean the fifo, and the other sequences get different items. in my application it is important that if few sequences request item at the same simulation time they must get the same item.
How can I solve this issue?

In reply to shimonc:

Unfortunately you do not show how your UVM structure looks like. But I guess you have one-to-one connections as always on the sequencer driving side. If you have more than one low level sequencers, you have to make a copy of the actual seq_item and distribute it the all your low-level sequencers. This should solve your issue.

Hi chr sue
My UVM structure is one:many. one upper sequencer and many lower sequencers.
I did some experiments and I found out that for my application is best to have one:one layered sequencer connection and than from the lower sequence send the seq_item to all other sequences.
following is part of the code.

the one:one sequence structure


virtual task body();
		uvm_event_pool ev_pool = uvm_event_pool::get_global_pool();
		uvm_event sync_event = ev_pool.get("sync_event");
		forever begin
			m_rtp_mng_sequencer.get(m_rtp_mng_seq_item);
                       ...
                       sync_event.trigger(m_rtp_util_seq_item);     
                end
endtask

one of the receiving sequences


virtual task body();
		uvm_event_pool ev_pool = uvm_event_pool::get_global_pool();
		uvm_event sync_event = ev_pool.get("sync_event");
		forever begin
			sync_event.wait_trigger();
			$cast(m_rtp_util_seq_item, sync_event.get_trigger_data());
                        ...
                 // Start handshake with agent sequencer
			start_item(m_rtp_ind_seq_item);

			finish_item(m_rtp_ind_seq_item);
               end
endtask