Skip to question
SystemVerilogDesignVerificationFirmwareArchitectureASIC Interview Questions→
/Interview questions/UVM get_next_item and item_done Handshake

Q077·Free·Design Verification

UVM get_next_item and item_done Handshake

Difficulty
Easy
Topic
UVM Components
Language
SV
Interview prompt

Question

What is wrong with this driver loop?

Provided context

Code to inspect

forever begin
  seq_item_port.get_next_item(req);
  drive(req);
  seq_item_port.get_next_item(req);
end
Choose one

Answer choices

  1. A. The driver must call item_done exactly once for the first get_next_item before requesting another item
  2. B. Nothing; get_next_item implicitly completes the prior item
  3. C. drive must be a function rather than a task
  4. D. A driver may call get_next_item only once in its lifetime
Answer framework

Short answer

The loop requests a second item before completing the first. After each successful `get_next_item(req)`, the driver must finish driving that request and call `item_done()` exactly once before another `get_next_item`. Otherwise the sequencer-driver handshake can stall or report a protocol violation.

Why this reasoning works

`get_next_item` grants the driver access to one sequence item while the sequencer retains an outstanding handshake for it. Driving the pins does not tell the sequencer that processing is complete. The explicit `item_done` call closes that transaction and allows the sequence’s completion path and sequencer arbitration to progress.

The usual loop is therefore get, drive, then complete before repeating. Error and reset branches must preserve that pairing as well; abandoning a granted item can leave the originating sequence blocked. APIs such as `get` use different completion semantics, but they should be chosen deliberately rather than mixed with an incomplete `get_next_item` protocol.

Interview takeaways

  • One item may be outstanding
  • Driving does not complete it
  • Call item_done before repeating
Exact question handoffPractice Q077

Solve it in the question bank, keep your progress, and reveal the reviewed solution when your access allows.

Open in question bank →
Solution accessEach time you open this Solution, one Practice Credit is used; it is not permanently unlocked. Premium Solution content also uses one credit per opening.
Continue learning

UVM Factory and Stimulus

Review factory overrides, configuration, sequences, sequencers, and drivers.

  • UVM Components
  • UVM
  • Pull protocol handshake
UVM Factory and Stimulus →
Continue practicing

Related questions

Q808 · UVM ComponentsReset during an outstanding itemMediumP→Q263 · UVM ComponentsSequencer-driver connectionEasyP→Q950 · UVM ComponentsBuild a reset-responsive nonblocking driverHardP→Q1084 · UVM ComponentsStart_item and finish_itemEasyP→
ASIC.FYI · Learn silicon end to end.info@asic.fyi