# Config\_db From Component To an Object not getting set

**URL:** <https://verificationacademy.com/forums/t/config-db-from-component-to-an-object-not-getting-set/39257>\
**Category:** UVM\
**Tags:** UVM, uvm-uvm\_config\_db\
**Created:** [July 2, 2021, 12:20am UTC](https://verificationacademy.com/forums/t/config-db-from-component-to-an-object-not-getting-set/39257 "2021-07-02T00:20:31Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [July 2, 2021, 12:27pm UTC](https://verificationacademy.com/forums/t/config-db-from-component-to-an-object-not-getting-set/39257/4 "2021-07-02T12:27:37Z")

</div>

_In reply to [desperadorocks](https://verificationacademy.com/forums/t/config-db-from-component-to-an-object-not-getting-set/39257/3):_

I recommend that you change your methodology.

One of the main purposes of the test is to create and configure all of the configuration objects for your environment(s) and the sub-agent(s) of the environment(s). Every configuration variable of these objects should be set by the test, and the configuration objects passed to the environment(s) using the config\_db().

I don’t understand why you would create a configuration object, then try to use the config\_db() to get a variable inside the configuration object from the config\_db(). Just use the test and set each variable appropriately.

In your example, why would you try and pass num\_agents using the config\_db() instead of just setting the variable in the environment(s) config object(s) directly?

---

_[View the full topic](https://verificationacademy.com/forums/t/config-db-from-component-to-an-object-not-getting-set/39257)._
