# Why use uvm\_config\_db to pass vif or configuration object is recommended?

**URL:** <https://verificationacademy.com/forums/t/why-use-uvm-config-db-to-pass-vif-or-configuration-object-is-recommended/30310>\
**Category:** UVM\
**Tags:** UVM, uvm\_config\_db\
**Created:** [January 23, 2015, 1:58am UTC](https://verificationacademy.com/forums/t/why-use-uvm-config-db-to-pass-vif-or-configuration-object-is-recommended/30310 "2015-01-23T01:58:09Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [February 2, 2015, 7:08pm UTC](https://verificationacademy.com/forums/t/why-use-uvm-config-db-to-pass-vif-or-configuration-object-is-recommended/30310/6 "2015-02-02T19:08:46Z")

</div>

_In reply to [seabeam](https://verificationacademy.com/forums/t/why-use-uvm-config-db-to-pass-vif-or-configuration-object-is-recommended/30310/5):_

The reason that you can’t use assignments like you showed is because the environment and the agents will use some of the values provided in the configuration object during the build\_phase(). With assignments, you can’t assign the configuration object until the component is created, but the component requires the configuration object during the build\_phase(), which is called as part of create(). The most effective way to allow the component to retrieve its configuration object is by using the uvm\_config\_db().

---

_[View the full topic](https://verificationacademy.com/forums/t/why-use-uvm-config-db-to-pass-vif-or-configuration-object-is-recommended/30310)._
