In a uvm_component if I call raise objection twice, do i have to call drop_objection twice?.
I ran a simulation, where i called raise objection twice and drop objection once. where the simulation ends immediately after the drop objection is called. Is that expected behavior ?
A couple of things. The code snippet looks like it is a base sequence and you have objections in pre & post body task. Are you actually starting this sequence on your sequencer or a sequence derived from this base class? Also, do you have any objections in your uvm components like uvm_test or uvm_env etc?
Each raise_objection does increment the objection counter for that object/instance passed from the argument. So if you call two times it will increment it to 2 and each drop_objection call decrements the objection counter for the object/instance passed from the argument.
If you pass the null object then it increment/decrement the global object (uvm_top) objection counter.
In a uvm_component if I call raise objection twice, do i have to call drop_objection twice?.
I ran a simulation, where i called raise objection twice and drop objection once. where the simulation ends immediately after the drop objection is called. Is that expected behavior ?
Regards
Srinivas
I think you do not understand the objection mechanism. Calling rais twice in an object or component is useless. Becuase the corresponding object/component can be working only once.
Mabe the second raise is simply ignored. Unfiortunately the standard is saying nothing with respect to this.