Objection Mechanism

In reply to chris_le:

You raise/drop objection in your test is enough. As Dave said, it because your test knows exactly when your simulation finish. Using objection in driver is completely unessersary, sometimes it hangs your simulation. Let’s assume you use objection in driver same as your code:


task run_phase(uvm_phase phase)  // driver class, without raise_objection and drop_objection
forver begin
phase.raise_objection(this);
seq_item_port.get_next_item(req)
drive();
seq_item_port.item_done();
phase.drop_objection(this);
end
endtass

Now, when all transactions complete, instead of blocking at get_next_item and waiting simulation finish (by dropping objection in test). Your code above raises an new objection and blocks at get_next_item statement, the drop_objection is never executed. Thats why your simulation will never stop.

Thanks for answer. Could you explain how the test knows when the test is over?