# Config\_db - parameters for set/get method

**URL:** <https://verificationacademy.com/forums/t/config-db-parameters-for-set-get-method/33871>\
**Category:** UVM\
**Tags:** UVM, config\_db\
**Created:** [December 31, 2017, 12:56pm UTC](https://verificationacademy.com/forums/t/config-db-parameters-for-set-get-method/33871 "2017-12-31T12:56:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![LinaLin20](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/l/34f0e0/32.png) [@LinaLin20](https://verificationacademy.com/forums/u/LinaLin20)\
**Post date:** [January 3, 2018, 5:23am UTC](https://verificationacademy.com/forums/t/config-db-parameters-for-set-get-method/33871/2 "2018-01-03T05:23:35Z")

</div>

_In reply to [verif\_learner](https://verificationacademy.com/forums/t/config-db-parameters-for-set-get-method/33871):_

```verilog

  //class uvm_config_db ....
  static function void set(
    uvm_component cntxt,
    string inst_name,
    string field_name,
    T value
  )

```

Here is my two cents:

1. uvm\_config\_db::set function is to create a new or an update of an existing configuration setting for field\_name in inst\_name from cntxt. The full scope of set is the concatenation of cntxt and inst\_name **{cntxt,”.”,~inst\_name~}**. If cntxt is null then inst\_name provides the complete scope information of the setting.
2. I would think this in an opposite way - the user of uvm\_config\_db::set() should know exactly what hierarchy and field name to configure. The lower layer component expects field\_name to be configured. If configuration fails, it can report error or fatal message. The upper layer component should provide matched scope and field\_name setting to satisfy it.
3. When reuse from unit level to system level, may or may not need to take care of scope change {cntxt,”.”,~inst\_name~} of uvm\_config\_db::set().

---

_[View the full topic](https://verificationacademy.com/forums/t/config-db-parameters-for-set-get-method/33871)._
