# Difference between set\_config\_object and uvm\_config\_db #(...)::set();

**URL:** <https://verificationacademy.com/forums/t/difference-between-set-config-object-and-uvm-config-db-set/30390>\
**Category:** UVM\
**Tags:** UVM, uvm\_config\_db-get, set\_config\_\
**Created:** [February 23, 2015, 7:21am UTC](https://verificationacademy.com/forums/t/difference-between-set-config-object-and-uvm-config-db-set/30390 "2015-02-23T07:21:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anilhr](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/b487fb/32.png) [@anilhr](https://verificationacademy.com/forums/u/anilhr)\
**Post date:** [February 23, 2015, 7:21am UTC](https://verificationacademy.com/forums/t/difference-between-set-config-object-and-uvm-config-db-set/30390/1 "2015-02-23T07:21:26Z")

</div>

Hi,

If i set an handle to some object or an interface using set\_config\_\* , can i retrieve it using uvm\_config\_db #(…)::get(); or i must use get\_config\_object?. And also is converse of it is true??  
or is their real difference between them ?.

---

<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 23, 2015, 11:26pm UTC](https://verificationacademy.com/forums/t/difference-between-set-config-object-and-uvm-config-db-set/30390/2 "2015-02-23T23:26:45Z")

</div>

The OVM’s set/get\_config\_\* has been implemented as a wrapper using the uvm\_config\_db as follows

```auto
set_config_int(...) => uvm_config_db#(uvm_bitstream_t)::set(this,...)
set_config_string(...) => uvm_config_db#(string)::set(this,...)
set_config_object(...) => uvm_config_db#(uvm_object)::set(this,...)

```

set/get\_config\_\* has be deprecated in UVM 1.2.

A warning that you should be aware set\_config\_int does **not** map to uvm\_config\_db#(int)::set(). We recommend against setting/getting individual int’s or strings anyways.

Instead of using uvm\_config\_db#(uvm\_object), you should use the actual type of your configuration object.

---

<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:** [July 4, 2016, 10:19am UTC](https://verificationacademy.com/forums/t/difference-between-set-config-object-and-uvm-config-db-set/30390/3 "2016-07-04T10:19:33Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/difference-between-set-config-object-and-uvm-config-db-set/30390/2):_

Does this work if we are migrating to UVM-1.1d version? I mean by keeping the same set/get config settings as in OVM

If so , do we need to be using +define+UVM\_NO\_DEPRECATED ?
