Why does UVM need both wait_for_grant() and wait_for_item_done()?

Hi everyone,

I understand the basic purpose of these methods:

wait_for_grant();
send_request(req);
wait_for_item_done();

  • wait_for_grant() waits until the sequencer grants permission to the sequence.

  • send_request() sends the item through the sequencer to the driver.

  • wait_for_item_done() waits until the driver indicates completion of the item.

However, I’m struggling to understand why UVM needs both waiting mechanisms.

My current thinking is:

If multiple sequences are running on the same sequencer, then the sequencer arbitrates based on priority and grants one sequence at a time. The granted sequence sends its transaction to the driver. Once the driver completes that transaction, the sequencer could simply grant the next waiting sequence.

If that’s how the flow works, then it seems like a single wait condition should be enough. Why do we need both:

wait_for_grant() and wait_for_item_done()

Specifically:

  1. Is my understanding above incorrect?

  2. Can the sequencer grant another sequence even though a previously granted transaction has not yet completed in the driver?

  3. Does the sequencer keep requests queued while the driver is still working on earlier transactions?

  4. What would break if UVM only had wait_for_grant() and no wait_for_item_done()?

I’m trying to understand the actual communication flow and timing relationship between sequence, sequencer, and driver, rather than just the individual API descriptions.

Thanks!