# UVM Test is not comming out

**URL:** <https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195>\
**Category:** UVM\
**Tags:** UVM\
**Created:** [October 22, 2012, 10:13am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195 "2012-10-22T10:13:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raj2004](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/b9bd4f/32.png) [@Raj2004](https://verificationacademy.com/forums/u/Raj2004)\
**Post date:** [October 22, 2012, 10:13am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/1 "2012-10-22T10:13:04Z")

</div>

Hi,

I am running a UVM testcase having AXI Driver(as one of the interface) to the Memory Control and on the other side is the Memory Block. But when i am running a simple WRITE sequence, the testcase got hanged (means its not coming out).  
The last message what i am getting in the log file (I enabled UVM\_OBJECTION\_TRACE)::

UVM\_INFO @ 0: run [OBJTN\_TRC] Object uvm\_test\_top subtracted 1 objection(s)its total(dropped from source object uvm\_test\_top.tb.v\_seqr.simple\_vseq): count=0 total=0.  
UVM\_INFO …/base/uvm\_objection.svh(1120) @ 0:reporter [TEST\_DONE] 'run’phase is ready to proceed to the ‘extract’ phase

My basic code is something like this::

class simple\_vtest extends uvm\_test  
…  
function build\_phase(uvm\_phase phase)  
uvm\_config\_wrapper::set(this,“env.v\_seqr.run\_phase”,“default\_sequence”,simple\_vseq::type\_id::get());  
super.build\_phase(phase);  
endfunction

class simple\_vseq extends uvm\_sequence;  
…  
write\_seq seq\_a;  
task pre\_body();  
uvm\_test\_done.raise\_objection(this);  
endtask  
task bosy();  
`uvm\_do\_on(seq\_a,p\_sequncer.axi\_seqr)  
endtask  
task post\_body();  
uvm\_test\_done.drop\_objection(this);  
endtask  
endclass

I am also getting the display after “uvm\_test\_done.drop\_objection(this)” i.e., inside task post\_body.

And i also tried to finish the test by using $finish from the top after putting some delay.

module top();  
…  
initial begin  
run\_test();  
end

initial begin  
#1000  
$finish;  
end  
…  
endmodule

But this is also not working as its seems like testcase got hang in #0 time only.  
Can anyone please help me in this. Its urgent. Please HELP

Thanks

---

<div class="post-metadata">

**Author:** ![Raj2004](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/b9bd4f/32.png) [@Raj2004](https://verificationacademy.com/forums/u/Raj2004)\
**Post date:** [October 23, 2012, 5:50am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/2 "2012-10-23T05:50:33Z")

</div>

Hi ,  
Please anyone can help me in this?

Thanks

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [October 23, 2012, 5:56am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/3 "2012-10-23T05:56:38Z")

</div>

_In reply to [Raj2004](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/2):_

Are you aware in which conditions pre/post\_body are called or not called? We generally do not recommend using them because are not aware of the different situations.

Do you have a typo in your source code, or is it just in your post - bosy() should be body().

---

<div class="post-metadata">

**Author:** ![Raj2004](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/b9bd4f/32.png) [@Raj2004](https://verificationacademy.com/forums/u/Raj2004)\
**Post date:** [October 23, 2012, 6:00am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/4 "2012-10-23T06:00:54Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/3):_

Hi Dave,  
Thanks for the reply. bosy() its just a typing mistake.  
So if i don’t want to use pre/post\_body for objection raise and drop then what i suppose to use?

---

<div class="post-metadata">

**Author:** ![Raj2004](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/b9bd4f/32.png) [@Raj2004](https://verificationacademy.com/forums/u/Raj2004)\
**Post date:** [October 23, 2012, 6:16am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/5 "2012-10-23T06:16:10Z")

</div>

_In reply to [Raj2004](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/4):_

Hi Dave,

The Last message what i am getting is ::

UVM\_INFO …/base/uvm\_objection.svh(1120) @ 0:reporter [TEST\_DONE] 'run’phase is ready to proceed to the ‘extract’ phase

After this its Not completing , just hanged there?  
Do you need any details so please ask?

Thanks

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [October 23, 2012, 7:54am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/6 "2012-10-23T07:54:35Z")

</div>

_In reply to [Raj2004](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/5):_

You can put what was in pre/post\_body() as the first/last statements of your body().

This does not explain your hang. You will have to interrupt it and see what is executing while hanging using the debugger.

---

<div class="post-metadata">

**Author:** ![Raj2004](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/b9bd4f/32.png) [@Raj2004](https://verificationacademy.com/forums/u/Raj2004)\
**Post date:** [October 23, 2012, 8:17am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/7 "2012-10-23T08:17:11Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/6):_

Hi,

I also tried fork join\_any to come out from the sequence but still getting the same result.

…  
virtual task body();  
starting\_phase.raise\_objection(this,get\_type\_name());  
fork  
begin  
`uvm\_do\_on(veq\_b,p\_sequencer.axi\_seqr)  
end  
begin  
#1000;  
end  
join\_any  
disable fork;  
starting\_phase.drop\_objection(this,get\_type\_name());  
endtask  
…

Can you please tell me how to use the debugger or please share any link for this.

Thanks

---

<div class="post-metadata">

**Author:** ![Raj2004](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/b9bd4f/32.png) [@Raj2004](https://verificationacademy.com/forums/u/Raj2004)\
**Post date:** [October 23, 2012, 8:21am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/8 "2012-10-23T08:21:42Z")

</div>

_In reply to [Raj2004](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/7):_

I am using Cadence NcSim.

Thanks

---

<div class="post-metadata">

**Author:** ![mperyer](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/5f8ce5/32.png) [@mperyer](https://verificationacademy.com/forums/u/mperyer)\
**Post date:** [October 23, 2012, 9:35am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/9 "2012-10-23T09:35:02Z")

</div>

What the trace is telling you is that for some reason the body() task is completing in zero time and the post\_body() task is dropping the objection leading to the end of the run\_phase(). The UVM simulation then terminates.

Therefore you need to look at what is going on in the write\_seq and/or the driver. Is there something happening that causes the body() method in write\_seq to return in 0 time? Is it something like the driver doing a get(), and the write\_seq only sending a single write sequence\_item? If this is the case you would get this type of behaviour.

Something you could try is raising an objection in the run\_phase of the test, or another component, to extend the run\_phase, this will allow you to see whether your driver is actually doing anything. (Your initial block is outside the UVM and will have no effect).

`
task run_phase(uvm_phase phase);
  phase.raise_objection(this);
  #1000us;
  phase.drop_objection(this);
endtask: run_phase
`

---

<div class="post-metadata">

**Author:** ![nash123](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/n/858c86/32.png) [@nash123](https://verificationacademy.com/forums/u/nash123)\
**Post date:** [December 21, 2012, 3:43am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/10 "2012-12-21T03:43:37Z")

</div>

_In reply to [mperyer](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/9):_

Hi Raj2004,

I am seeing a similar issue…my build and connect phases are done…simulation enters run phase and hangs at time 0…Could you figure out what caused your simulation to hang?

Thanks

---

<div class="post-metadata">

**Author:** ![Raj2004](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/b9bd4f/32.png) [@Raj2004](https://verificationacademy.com/forums/u/Raj2004)\
**Post date:** [December 21, 2012, 11:06am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/11 "2012-12-21T11:06:19Z")

</div>

_In reply to [nash123](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/10):_

Hi Nash,

There may be few possibilities but the important one is may be some thing (process) is running in background, That the same with me.Please check the loops in your code as may be some loops are going in infinite condition or its waiting for some signals or values.

Thanks  
Anubhaw

---

<div class="post-metadata">

**Author:** ![Ajeetha\_Kumari\_CVC](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@Ajeetha\_Kumari\_CVC](https://verificationacademy.com/forums/u/Ajeetha_Kumari_CVC)\
**Post date:** [January 4, 2013, 6:38pm UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/12 "2013-01-04T18:38:53Z")

</div>

_In reply to [Raj2004](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/11):_

A wild guess, perhaps one of your raised-objections are not dropped yet? See a way to debug that kind of scenario @ [404](http://www.uvmworld.org/forums/showthread.php?853-How-can-all-opposing-objections-be-printed&p=3543#post3543)

HTH  
Ajeetha, CVC

> **[Verification Course Blog | VeriLog Courses | CVC](https://www.cvcblr.com/blog/)**
>
> Read our verification course blog to find out more about what CVC can offer, if you are looking for online courses contact us today.

---

<div class="post-metadata">

**Author:** ![nash123](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/n/858c86/32.png) [@nash123](https://verificationacademy.com/forums/u/nash123)\
**Post date:** [January 14, 2013, 7:47am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/13 "2013-01-14T07:47:46Z")

</div>

_In reply to [ajeetha](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/12):_

Thanks All for the help…I actually had an infinite loop in one of the components

---

<div class="post-metadata">

**Author:** ![Bhanu\_Prakash](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@Bhanu\_Prakash](https://verificationacademy.com/forums/u/Bhanu_Prakash)\
**Post date:** [August 13, 2013, 6:21am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/14 "2013-08-13T06:21:17Z")

</div>

Hi all,

I’m facing the similar issue, forever loops in the monitor are running even after dropping all the objections (enabled objection trace). How to end the testcase, in this case? Can’t we control this using objection mechanism only ?

Thanks in advance,  
Bhanu

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [August 13, 2013, 11:21pm UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/15 "2013-08-13T23:21:10Z")

</div>

_In reply to [Bhanu Prakash](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/14):_

For debugging, try changing your monitor’s forever loop to break out after some timeout, or by checking some variable that you interactively set when you notice the simulation not ending. Then see what the remaining activity in the testbench is doing.

---

<div class="post-metadata">

**Author:** ![Bhanu\_Prakash](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@Bhanu\_Prakash](https://verificationacademy.com/forums/u/Bhanu_Prakash)\
**Post date:** [August 14, 2013, 4:36am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/16 "2013-08-14T04:36:00Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/15):_

Thanks Dave,  
I found that objection is raised in main\_phase of driver, but in run\_phase all the objections are dropped. So the main\_phase in env is not completed.

Is this the reason why this happened?

Regards,  
Bhanu

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [August 14, 2013, 5:17am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/17 "2013-08-14T05:17:22Z")

</div>

_In reply to [Bhanu Prakash](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/16):_

Hard to know without seeing your code. But this is why we recommend sticking with the run\_phase, especially in your driver. Also, you driver should not be raising and dropping objections.

---

<div class="post-metadata">

**Author:** ![Mr\_Verification](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/0ea827/32.png) [@Mr\_Verification](https://verificationacademy.com/forums/u/Mr_Verification)\
**Post date:** [July 9, 2016, 4:36pm UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/18 "2016-07-09T16:36:14Z")

</div>

In my case, all phases were ending and reporting was run, but the sim never stopped. What? Why?

So I finally looked at uvm\_root:

class uvm\_root extends uvm\_component;  
// Task: run\_test  
//  
// Phases all components through all registered phases. If the optional  
// test\_name argument is provided, or if a command-line plusarg,  
// +UVM\_TESTNAME=TEST\_NAME, is found, then the specified component is created  
// just prior to phasing. The test may contain new verification components or  
// the entire testbench, in which case the test and testbench can be chosen from  
// the command line without forcing recompilation. **If the global (package)  
// variable, finish\_on\_completion, is set, then $finish is called after  
// phasing completes.  
. . .  
// Variable: finish\_on\_completion  
//  
// If set, then run\_test will call $finish after all phases are executed.**  
bit finish\_on\_completion = 1;  
. . .  
task uvm\_root::run\_test(string test\_name=“”);  
. . .  
// if test now defined, create it using common factory  
if (test\_name != “”) begin  
$cast(uvm\_test\_top, factory.create\_component\_by\_name(test\_name,  
“”, “uvm\_test\_top”, null));  
. . .  
// phase runner, isolated from calling process  
fork begin  
// spawn the phase runner task  
phase\_runner\_proc = process::self();  
uvm\_phase::m\_run\_phases();  
end  
join\_none  
#0; // let the phase runner start  
. . .  
wait (m\_phase\_all\_done == 1);

// clean up after ourselves  
phase\_runner\_proc.kill();

l\_rs = uvm\_report\_server::get\_server();  
l\_rs.report\_summarize();

**if (finish\_on\_completion)  
$finish;**

endtask

I was trying to bring up a BFM only full chip TB (CPUs stubbed out). The Top TB had this code, so UVM wouldn’t finish before the C tests:

uvm\_top.finish\_on\_completion=0;

Solution: In full chip tests (non-BFM), C tests now write to a GPIO pin when they are finished. A UVM monitor waits for write and drops an objection, allowing UVM to finish. C tests no longer need a cycle count arg and finish\_on\_completion gets axed!!!

---

<div class="post-metadata">

**Author:** ![tan\_27](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/t/df788c/32.png) [@tan\_27](https://verificationacademy.com/forums/u/tan_27)\
**Post date:** [September 30, 2026, 4:07am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/19 "2026-09-30T04:07:42Z")

</div>

Could you please explain the usage of UVM\_OBJECTION\_TRACE and provide a simple code example for better understanding?

---

<div class="post-metadata">

**Author:** ![MichaelP](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@MichaelP](https://verificationacademy.com/forums/u/MichaelP)\
**Post date:** [September 30, 2026, 6:42am UTC](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195/20 "2026-09-30T06:42:43Z")

</div>

> [@tan\_27](#):
>
> UVM\_OBJECTION\_TRACE

+UVM\_OBJECTION\_TRACE  
is a command-line plusarg used in the UVM to trace objection activity and debug simulation hangs or premature terminations.  
Add it to your test command-line, and run the test, finally open the test log: you would see many prints to the test log, which are tracking the rise and drop of each objection in a UVM test.  
In SoC/Full-Chip environments those prints could be quite overwhelming…

Please first try to read on UVM objection mechanism:

> **[Objection Mechanism](https://verificationacademy.com/verification-methodology-reference/uvm/docs_1.2/html/files/base/uvm_objection-svh.html)**

And on UVM command line processor which receives this TRACE plusarg:

> **[uvm\_cmdline\_processor](https://verificationacademy.com/verification-methodology-reference/uvm/docs_1.2/html/files/base/uvm_cmdline_processor-svh.html)**

I don’t have a simple code example, but sure you could find one on the Internet or ask one of the chatbots to generate one.

[Next page](https://verificationacademy.com/forums/t/uvm-test-is-not-comming-out/28195.md?page=2)
