IMPORTANT NOTICE: Please be advised that the Verification Academy Forums will be offline for scheduled maintenance on Sunday, March 23rd at 4:00 US/Pacific.
UVM : raise_objection() and drop_objection()
Objection mechanism is a UVM strategy used to decide the end of test.
I read somewhere earlier that objections are also used to debug the failures in a TB.
While building the UVM environment, if at all any failure, we can debug using objections.
I wanted to understand more about this with some example.
Can anyone please point “How objections helps us to debug failures”? (Failures can be testcase fail or component/connection fail)
One of the possible cause of a test failing is wrong use of objections. There are two possible scenarios.
a) No component raises an objection. The test ends at time 0.
b) A single component forgets to drop an objection that it has raised. The test never ends (unless a timeout mechanism has been set).
In order to debug the above scenarios the +UVM_OBJECTION_TRACE is very useful.
You will see all the objection raises/drops by any component in the log.
Regarding other causes of test failures (such as connectivity failures etc) the UVM_OBJECTION_TRACE is not going to be of much help. But I would still use it to rule
out objection failures mentioned above.
The best way to prevet the simulation having trouble with the objections is to employ them inm a restrictive way. The best place to rais/drop objections is in the test. If you are doing this you’ll not run into trouble as far as your test is running. Adding objections in the sequence, driver/monitor make the debugging more complicated. But you do not need objections in this place. I recommend to remove your objectiosn from there and your test will work.