# Sequence getting abruptly killed when configure\_phase() ends

**URL:** <https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442>\
**Category:** UVM\
**Tags:** UVM, Cookbook-SequencesStopping, uvm\_sequence, main\_phase\
**Created:** [October 20, 2016, 8:42am UTC](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442 "2016-10-20T08:42:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmozhiku](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/eada6e/32.png) [@rmozhiku](https://verificationacademy.com/forums/u/rmozhiku)\
**Post date:** [October 20, 2016, 8:42am UTC](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/1 "2016-10-20T08:42:25Z")

</div>

I am starting a sequence in configure\_phase() with an intend to continue running until test ends (i.e through configure\_phase() and main\_phase())

Sample code as below and I expect the sequence to start in configure\_phase() but continue running even after the phase ends. I rather see the error

m\_sqr: SEQREQZMB: The task responsible for requesting a wait\_for\_grant on sequencer \<\> for sequence \<‘’\> has been killed, to avoid a deadlock the sequence will be removed from the arbitration queues at /tools/mentor/questasim/10.4c\_2/questasim/verilog\_src/uvm-1.1d/src/seq/uvm\_sequencer\_bas e.svh(709)

task configure\_phase(uvm\_phase phase)  
phase.raise\_objection(this);  
fork  
my\_test\_seq = new();  
my\_test\_seq.start(my\_sqr);  
join\_none  
phase.drop\_objection(this);  
endtask

Any idea why the forked off sequence doesnt run beyond configure\_phase() ? The sequence has a forever loop and is not stopped.

---

<div class="post-metadata">

**Author:** ![mayurkubavat](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/a9a28c/32.png) [@mayurkubavat](https://verificationacademy.com/forums/u/mayurkubavat)\
**Post date:** [October 20, 2016, 9:35am UTC](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/2 "2016-10-20T09:35:48Z")

</div>

_In reply to [rmozhiku](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442):_

Hi,

Do you have objections at any other places as well? For e.g. at test level.

If no, then phase objection mechanism in configure\_phase() does not look effective as drop\_objection will be called just after raise\_objection is being called because fork - join\_none is used there.

---

<div class="post-metadata">

**Author:** ![rmozhiku](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/eada6e/32.png) [@rmozhiku](https://verificationacademy.com/forums/u/rmozhiku)\
**Post date:** [October 20, 2016, 9:42am UTC](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/3 "2016-10-20T09:42:44Z")

</div>

_In reply to [MayurKubavat](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/2):_

Yes, the following main\_phase() has objection and test continues to main\_phase. The problem I see is the sequence getting killed once configure\_phase ends

---

<div class="post-metadata">

**Author:** ![mayurkubavat](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/a9a28c/32.png) [@mayurkubavat](https://verificationacademy.com/forums/u/mayurkubavat)\
**Post date:** [October 20, 2016, 9:54am UTC](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/4 "2016-10-20T09:54:03Z")

</div>

_In reply to [rmozhiku](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/3):_

I think all processes called after call to raise\_objection() will get killed once drop\_objection() is encountered. To keep the sequence running objections should not be called there.

---

<div class="post-metadata">

**Author:** ![cgales](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/c/ccd318/32.png) [@cgales](https://verificationacademy.com/forums/u/cgales)\
**Post date:** [October 20, 2016, 11:28am UTC](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/5 "2016-10-20T11:28:33Z")

</div>

_In reply to [rmozhiku](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/4):_

When a phase completes, all forked tasks of that phase will be killed, hence why your sequence stops.

This is one of the reasons that we recommend to only use the run\_phase(). Within the run\_phase(), use sequences to control the reset, main stimulus generation, etc. This will provide the greatest compatibility across the UVM ecosystem.

---

<div class="post-metadata">

**Author:** ![rmozhiku](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/eada6e/32.png) [@rmozhiku](https://verificationacademy.com/forums/u/rmozhiku)\
**Post date:** [October 20, 2016, 3:31pm UTC](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/6 "2016-10-20T15:31:41Z")

</div>

_In reply to [cgales](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/5):_

How would you control reset and stimulus generation using sequences?

For eg, in a testbench with multiple envs and agents, how do I synchronize such that all env’s complete initilization (backdoor or frontdoor) before all agents start stimulus phase?

Would I need to implement my own synchronization using uvm events?

---

<div class="post-metadata">

**Author:** ![cgales](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/c/ccd318/32.png) [@cgales](https://verificationacademy.com/forums/u/cgales)\
**Post date:** [October 20, 2016, 3:50pm UTC](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/7 "2016-10-20T15:50:47Z")

</div>

_In reply to [rmozhiku](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/6):_

No. Don’t use events.

At your test level, you would fork…join around all your reset sequences. Similarly you would fork…join around all the stimulus sequences. The join will ensure that all of the forked sequences have completed prior to forking the next set of sequences. If you want a sequence to run forever, then use a fork…join\_none.

---

<div class="post-metadata">

**Author:** ![yogesh\_kalbande\_1](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/yogesh_kalbande_1/32/1271_2.png) [@yogesh\_kalbande\_1](https://verificationacademy.com/forums/u/yogesh_kalbande_1)\
**Post date:** [October 23, 2016, 3:01pm UTC](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/8 "2016-10-23T15:01:01Z")

</div>

_In reply to [rmozhiku](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/7):_

Hi,

Generally, we configure the DUT in the configuration phase sequence and send any data traffic in main phase.

Is it possible to restructure your configuration sequence so that the DUT configuration resides in configuration sequence and the other thing which runs in forever and should be there till end of test?

This way you will be able to synchronize DUT configuration through configure phase and forever can be called from rum phase.

Regards,  
Yogesh

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [October 23, 2016, 5:23pm UTC](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/9 "2016-10-23T17:23:41Z")

</div>

_In reply to [yogesh\_kalbande\_1](https://verificationacademy.com/forums/t/sequence-getting-abruptly-killed-when-configure-phase-ends/32442/8):_

Reading this discussion gives me the impression you need some education in dealing with the phased approach of the UVM on the one hand and TLM on the other hand.  
If you believe you need the sub-phases you can use them. But you have to consider the behavior these sub-phases have. From my point of view with 15+ UVM projects done in the past I’d recommend the sub pahes of the run phase only as an exception. It provides you one way to do the things you need. But using them this might result in consequences you have to consider.  
From my professional experience I think there is no need to use them. You can solve all your tasks working the run-phase only. It is very common for all designs that you have a reset mode and a configuration mode before starting the operational mode.  
Doing so, you need one or more reset and configuration sequences for each agent or sub-env. They will be executed before you enter a forever loop with your operational sequences.  
BTW what do you mean with backdoor/frontdoor initialisation. The usage of backdoor and frontdoor is limited to the register access.
