# Is there a query function for an uvm\_component class to know which sub-phase (of run) is executing currently?

**URL:** <https://verificationacademy.com/forums/t/is-there-a-query-function-for-an-uvm-component-class-to-know-which-sub-phase-of-run-is-executing-currently/31112>\
**Category:** UVM\
**Tags:** UVM, query, uvm-run\_phase\
**Created:** [October 12, 2015, 4:43am UTC](https://verificationacademy.com/forums/t/is-there-a-query-function-for-an-uvm-component-class-to-know-which-sub-phase-of-run-is-executing-currently/31112 "2015-10-12T04:43:41Z")\
**Posts on this page:** 2\
**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 12, 2015, 4:43am UTC](https://verificationacademy.com/forums/t/is-there-a-query-function-for-an-uvm-component-class-to-know-which-sub-phase-of-run-is-executing-currently/31112/1 "2015-10-12T04:43:41Z")

</div>

From a uvm\_component class::run\_phase, I want to know which sub-phase is currently executing? Is there any global query function available? cant find any in docs.

---

<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 14, 2015, 8:07am UTC](https://verificationacademy.com/forums/t/is-there-a-query-function-for-an-uvm-component-class-to-know-which-sub-phase-of-run-is-executing-currently/31112/2 "2015-10-14T08:07:24Z")

</div>

_In reply to [rmozhiku](https://verificationacademy.com/forums/t/is-there-a-query-function-for-an-uvm-component-class-to-know-which-sub-phase-of-run-is-executing-currently/31112):_

I don’t think there is such a function. Given that each uvm\_component is running in it’s own thread, there would be no guarantee that the answer you got from such a function would still be valid after it returned and you acted upon it.

We don’t recommend using sub-phases and suggest that you use sequences for synchronization instead.
