# Config\_db dynamic connection

**URL:** <https://verificationacademy.com/forums/t/config-db-dynamic-connection/35044>\
**Category:** UVM\
**Tags:** UVM, config\_db\
**Created:** [September 17, 2018, 5:24am UTC](https://verificationacademy.com/forums/t/config-db-dynamic-connection/35044 "2018-09-17T05:24:09Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [September 18, 2018, 6:27am UTC](https://verificationacademy.com/forums/t/config-db-dynamic-connection/35044/4 "2018-09-18T06:27:34Z")

</div>

_In reply to [rohitkumar.b](https://verificationacademy.com/forums/t/config-db-dynamic-connection/35044/3):_

I knew that was going to be your next question. SystemVerilog identifiers are not dynamically constructed strings. They must be resolved as you compile the source code. You could create a text macro to help you, but you still would need to repeat the line.

```verilog
`define config_vif(N) \
uvm_config_db #(virtual input_if)::set(null,`"uvm_test_top.top_env.env[``N``]`","pcm_if_SCAN_ENABLE",PCM_top.DUT1.pcmif_``N``_SCAN_ENABLE);

`config_vif(1)
`config_vif(2)
`config_vif(3)
`config_vif(4)

```

---

_[View the full topic](https://verificationacademy.com/forums/t/config-db-dynamic-connection/35044)._
