UVM sequence

Hi,
I have few queries regarding uvm_sequence.

1)I was referring to synchronization mechanism between sequence, sequencer and driver. There it was mentioned that before uvm_sequencer selects a do operation, uvm_sequence will create the item for first do operation. Is it true for all the sequences present in the TB? Or is it for sequence which are started on the sequencers?

  1. What happens when more than one sequences try to grab same sequencer? Which sequence will win first and on what ground/bases? Same question for lock operation.

  2. Is there any way to know which is next sequence in sequencer’s queue?

Thanks in advance,
Chander

In reply to Chander_M:

do operations are macros consisting of several steps. We suggest you learn how to start sequences and send sequence_items without using the macros. Then you will understand when the the items gets created versus sent to the sequencer for arbitration.
If the ordering of the grabs are determinate, the first one wins. This guarantee is the same as a semaphore. locks are arbitrated in the same way as any other sequence.

There is no way to know what the next sequence item will be because it could change all the way up until it is time to arbitrate the next sequence.

In reply to Chander_M:

There are 2 relationships. One is between the sequencer and the sequence and another one between the sequencer and the Driver. With the exception of using a push sequencer the driver initiates to get a sequence item by executing a get or get_next_item on the sequence item port. This is the relationship between the Driver and the sequencer. If you have more sequences running in a fork/join on a sequencer you cannot predict which sequence is executed first. But you can control this by Setting a priority for a sequence. And you can set the arbitration mode.
BTW the usage of the `uvm_do* macros is quite common in the UVM community.