Ten high-frequency questions on phase order, objections, drain time, phase_ready_to_end, hangs and early ends, each with the weak answer, the senior answer and the follow-ups.
On this page
The phases round sounds easy, and that is the trap. Every candidate can recite build, connect, run, report. The interviewer is listening for something else: whether you know what the library does when a count reaches zero, which mistakes end a test early and which hang it, and whether you have ever chased one of those at 2 a.m.
What separates a senior answer is mechanism plus evidence. "Objections propagate up to the top" is a mid-level line; "each component keeps its own count, the test's total includes the sequence's raise, and when it reaches zero the drain timer starts" is a senior one, especially when it ends with "on our DMA bench that is why the scoreboard re-raises in phase_ready_to_end". Each answer below links to the lesson that teaches it in full.
Area
What the interviewer is really testing
Order and phase kinds
Do you know why build is top-down and what is illegal after it?
Objections
Who owns end of test, and what the library reports when you get it wrong.
End of test
Drain time versus phase_ready_to_end: a guess versus a condition.
Failure modes
Can you tell an early end from a hang, and triage each in minutes?
The questions
Why is build_phase top-down, and what goes wrong if you create a component in connect_phase?
You call raise_objection in build_phase. What happens?
Your test finishes at time 0 with zero errors. What happened?
Who should raise objections: the test, the sequence, the driver or the monitor?
What is drain time, and how do you choose it?
How does a scoreboard keep the run phase alive until the last output arrives?
Your sequence runs in main_phase, but the test raises its objection in run_phase. What happens?
The regression has a test that hangs. Walk me through it.
How does a sequence raise an objection today, without starting_phase?
How does phase.jump() work for a mid-test reset?
Rapid fire
Check yourselfA colleague adds phase.raise_objection(this) at the top of a monitor's run_phase "to be safe". What happens to every test?
The monitor's loop never ends, so it never drops. Every test now runs until the timeout. Monitors never raise objections; end of test belongs to the test, plus a scoreboard through phase_ready_to_end when it still owes items.
Check yourselfA scoreboard's phase_ready_to_end tests if (phase == uvm_run_phase::get()) and never extends the phase. Why?
uvm_run_phase::get() returns the imp, not the phase node passed in, so the comparison is never true. Compare phase.get_imp() with it, or compare phase.get_name() with "run".
Check yourselfA cleanup task calls disable fork after waiting for a timeout branch, and the scoreboard's checker thread disappears. Why?
disable fork kills every child of the current process, not only the fork above it. Wrap the fork and the disable fork in their own fork begin ... end join so only that subtree dies.