Get Virtual Interface In uvm_test

In reply to Ankelih:

There are many typos in the code that you have shown. When debugging issues with uvm_config_db, every character counts.

You are doing the set() to the context “uvm_test_top_env.agt0”, but the get() is from the context “uvm_test_top”.

In the set(), the null string replaces
uvm_root::get()

In the get(), “uvm_test_top.” replaces
this
.

You probably want:

uvm_config_db#(virtual v_interface)::set(null,"uvm_test_top", "vif", if0);