Start_item in sequence

I am trying to understand the flow of calls from test to sequence etc.

from the start_item launched by a sequence, I landed in uvm_base_sequence.svh file of UVM source code.
Everything is fine in start_item as per my understanding but I don’t see start_item calling send_request to the sequencer.
This is where the sequence item is actually sent to the sequencer.

The start_item ends after calling pre_do method.

In reply to shatrish:

start_item() doesn’t send the sequence_item to the sequencer. It only notifies the sequencer that a sequence_item is ready to be sent. start_item() is blocked by the sequencer, and when it returns, the sequence will need to randomize the sequence_item (if needed), then call finish_item() which will ‘send’ the sequence_item to the sequencer (and driver).

In reply to cgales:

Thanks a lot. Yes, I looked at the uvm_sequence_base code once again. There is a good bit of comments explaining this.

In reply to cgales:
Hi Cagles
finish_item() will be blocked until item_done() being executed?
please correct me if i am wrong
by the way, when should use get() followed by put() execution flow?
it seems that using get_next_item() followed by item_done() can do what get() followed by put() do.
thanks

In reply to peter:

Yes, finish_item() will be blocked until the driver is finished with the sequence_item. There are several use-models that the driver can interact with the sequencer explained in the UVM Cookbook.

In reply to cgales:

In reply to shatrish:
start_item() doesn’t send the sequence_item to the sequencer. It only notifies the sequencer that a sequence_item is ready to be sent. start_item() is blocked by the sequencer, and when it returns, the sequence will need to randomize the sequence_item (if needed), then call finish_item() which will ‘send’ the sequence_item to the sequencer (and driver).

But In "The Proper Care and Feeding of Sequences” course its mentioned that as a part of start_item(), sequencer adds sequence id and transaction id to the sequence item. How would it be able to do that without getting access to the sequence_item. Please let me know if I am understanding it wrong.

In reply to verif_gal:

seq_item() call with the argument of sequence_item handle would request a sequencer to give access to drive for sending a sequence_item.
once the drive calls the get_next_item or gets method would tell the sequencer to grant a access to one of the sequences who requested.
now seq_item() call return and you can prepare transaction by randomizing call or directly assigning a value to it.
after that, there is a call to finish_item with transaction handle that sequence wants to send it to drive via a sequencer.
finish_item call has send_request method call which will call the sequencer’s send_resquest method.
now, this method send_resquest has a responsibility to set the m_sequence_id and m_transaction_id fields using two different calls which are as follows:


``` verilog

param_t.set_transaction_id(sequence_ptr.m_next_transaction_id++);
param_t.set_sequence_id(sequence_ptr.m_get_sqr_sequence_id(m_sequencer_id, 1));