# NO\_VIF: virtual interface must be set for:test.env.vif

**URL:** <https://verificationacademy.com/forums/t/no-vif-virtual-interface-must-be-set-for-test-env-vif/40608>\
**Category:** UVM\
**Tags:** UVM, Systemverilog-UVM-RAL\
**Created:** [July 5, 2022, 2:53am UTC](https://verificationacademy.com/forums/t/no-vif-virtual-interface-must-be-set-for-test-env-vif/40608 "2022-07-05T02:53:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nhatd2k](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/n/7feea3/32.png) [@nhatd2k](https://verificationacademy.com/forums/u/nhatd2k)\
**Post date:** [July 5, 2022, 2:53am UTC](https://verificationacademy.com/forums/t/no-vif-virtual-interface-must-be-set-for-test-env-vif/40608/1 "2022-07-05T02:53:15Z")

</div>

Hi,  
I am having a problem of getting in the interface using the right path in the environment. My testbench has instance of RxCxsCcb1. Thank you for your help.

**My error**  
regr.attribute: failmsg = 0:F:test.env: NO\_VIF: virtual interface must be set for:test.env.vif

**My env**

…  
function void build\_phase(uvm\_phase phase);  
super.build\_phase(phase);  
if\_path = “pcie\_iod\_tb.RxCxsCcb1.m\_cxsb\_txrx.m\_cxsb\_txrx\_if1.u\_if”; //Check this path  
if(!uvm\_config\_db#(virtual cxsb\_txrx\_full\_if)::get(null , “”, if\_path, vif))  
`vvm\_fatal(“NO\_VIF”,{“virtual interface must be set for:”,  
get\_full\_name(),“.vif”});

…

**My tb**  
…  
CxsCcb #( .NUM\_ASYNC\_FIFO\_ENTRIES (8),  
.NUM\_CXS\_RX\_LCREDIT (4’d7)  
) RxCxsCcb1 (  
…

**My bind file**  
bind RxCxsCcb1 cxsccb\_if m\_cxsb\_txrx (.\*);

**My module get binded**  
module cxsccb\_if (

…

cxsb\_txrx\_if m\_cxsb\_txrx\_if1 (  
.CLK (RXCLK),  
.RESETn (~RXRESET),  
…

---

<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 5, 2022, 11:35am UTC](https://verificationacademy.com/forums/t/no-vif-virtual-interface-must-be-set-for-test-env-vif/40608/2 "2022-07-05T11:35:28Z")

</div>

_In reply to [nhatd2k](https://verificationacademy.com/forums/t/no-vif-virtual-interface-must-be-set-for-test-env-vif/40608):_

Your get() call to the uvm\_config\_db seems incorrect.

I recommend reading the Verification Academy section on the [UVM Configuration Database](https://verificationacademy.com/cookbook/resources/config-db) and fixing your get() call.
