Hardware interview practice
End run phase with a forever monitor
A test owns finite traffic and also starts a forever monitor in run_phase. Show how the test ends without waiting for the monitor to return.
Starting point
Question code
task run_phase(uvm_phase phase);Reviewed example
Work through one case
Input
traffic completes, the last objection drops, and no new objection is raised during drain timeExpected output
run phase ends; the forever monitor is terminated; later phases runThe forever process belongs to the task phase and does not prevent phase completion after objections and drain handling finish.
What to cover
Requirements
- Raise the objection before starting finite traffic.
- Drop it only after all test-owned traffic completes.
- Explain what happens to forever processes spawned by the task phase.
- State the default effect of UVM's finish_on_completion setting.
