# To restrict the visibility of interface to agent only using config\_db

**URL:** <https://verificationacademy.com/forums/t/to-restrict-the-visibility-of-interface-to-agent-only-using-config-db/38044>\
**Category:** UVM\
**Tags:** UVM, uvm-config\_db\
**Created:** [September 8, 2020, 3:47pm UTC](https://verificationacademy.com/forums/t/to-restrict-the-visibility-of-interface-to-agent-only-using-config-db/38044 "2020-09-08T15:47:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [September 8, 2020, 4:37pm UTC](https://verificationacademy.com/forums/t/to-restrict-the-visibility-of-interface-to-agent-only-using-config-db/38044/2 "2020-09-08T16:37:39Z")

</div>

_In reply to [jj\_bukhari](https://verificationacademy.com/forums/t/to-restrict-the-visibility-of-interface-to-agent-only-using-config-db/38044):_

Your problem is in the config\_db set command:

```verilog
uvm_config_db#(virtual intf)::set(null,"*.agent_h","intf_h",intf_h);

```

Your code restricts the virtual interface to a component which has at the end of its hierarchical path ‘agent\_h’.  
Replacing the 2nd argument with awildcard ‘\*’ will work.

---

_[View the full topic](https://verificationacademy.com/forums/t/to-restrict-the-visibility-of-interface-to-agent-only-using-config-db/38044)._
