# Calling of build phase?

**URL:** <https://verificationacademy.com/forums/t/calling-of-build-phase/30059>\
**Category:** UVM\
**Tags:** UVM, UVM\_PHASE, build\_phase\
**Created:** [October 22, 2014, 6:35am UTC](https://verificationacademy.com/forums/t/calling-of-build-phase/30059 "2014-10-22T06:35:19Z")\
**Posts on this page:** 7\
**Page:** 2

<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:** [March 30, 2023, 1:38am UTC](https://verificationacademy.com/forums/t/calling-of-build-phase/30059/21 "2023-03-30T01:38:37Z")

</div>

_In reply to [hsam](https://verificationacademy.com/forums/t/calling-of-build-phase/30059/20):_

All UVM phases are defined as virtual methods. When run\_test() eventually gets to calling the reset\_phase of every created component, as with any virtual method, it calls the most derived method for that class object. So unless main::reset\_phase calles super.reset\_phase, reset\_sequence\_1 will not get started.

---

<div class="post-metadata">

**Author:** ![hsam](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/h/74df32/32.png) [@hsam](https://verificationacademy.com/forums/u/hsam)\
**Post date:** [March 30, 2023, 1:48am UTC](https://verificationacademy.com/forums/t/calling-of-build-phase/30059/22 "2023-03-30T01:48:25Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/calling-of-build-phase/30059/21):_

what will happen if the task reset\_phase in base test is not declared as virtual but the main test has declared the task reset\_phase as virtual?

---

<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:** [March 30, 2023, 5:12am UTC](https://verificationacademy.com/forums/t/calling-of-build-phase/30059/23 "2023-03-30T05:12:23Z")

</div>

_In reply to [hsam](https://verificationacademy.com/forums/t/calling-of-build-phase/30059/22):_

Assuming your base\_test is extended from uvm\_test, which is extended from uvm\_component, the reset\_phase method (and all other UVM phases) are defined as virtual methods in the uvm\_component base class. SystemVerilog rules say that once a method gets defined as virtual, it remains virtual in all other derived classes; the virtual keyword becomes optional.

---

<div class="post-metadata">

**Author:** ![dhira](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@dhira](https://verificationacademy.com/forums/u/dhira)\
**Post date:** [February 29, 2024, 6:49am UTC](https://verificationacademy.com/forums/t/calling-of-build-phase/30059/24 "2024-02-29T06:49:49Z")

</div>

run\_test creates the test and starts executing the phases right, but after create the environment in test it new to the env then how it again call the build phase of test?

---

<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:** [February 29, 2024, 7:02am UTC](https://verificationacademy.com/forums/t/calling-of-build-phase/30059/25 "2024-02-29T07:02:12Z")

</div>

`run_test()` creates the test component and then calls the test’s build\_phase(). The test::build\_phase() creates children of the test, like the env class. After the test::build\_phase finishes, it calls the build\_phases of all the child components of the test, which would include the env component. It does this recursively until there are no more children.

---

<div class="post-metadata">

**Author:** ![Sandip\_Solanki](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/b38774/32.png) [@Sandip\_Solanki](https://verificationacademy.com/forums/u/Sandip_Solanki)\
**Post date:** [November 14, 2024, 12:09pm UTC](https://verificationacademy.com/forums/t/calling-of-build-phase/30059/26 "2024-11-14T12:09:32Z")

</div>

Hi Dave,  
I am not able to find the code that you have attached.

---

<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:** [November 14, 2024, 6:38pm UTC](https://verificationacademy.com/forums/t/calling-of-build-phase/30059/28 "2024-11-14T18:38:13Z")

</div>

Reattached

[Previous page](https://verificationacademy.com/forums/t/calling-of-build-phase/30059.md?page=1)
