Passing interface directly to driver in UVM?

How to pass interface directly to driver without sending them through config_db from top?

In reply to Sv-hustler:

There are probably dozens of other ways. But choosing one way makes your code easier to manage, which is the whole point of UVM.

In reply to dave_59:

The way in which we can pass interface into driver without using config object!

In reply to Sv-hustler:

In reply to dave_59:
The way in which we can pass interface into driver without using config object!

config object and config_db are 2 different things. Please explain what you mean.

In reply to chr_sue:

I use config object to send interface to driver . That is by giving interface to interface instance inside config object and then use it to get in driver .

		in test 

if(!uvm_config_db #(virtual ram_if)::get(this,“”,“vif”,wcfg.vif));
uvn_config_db #(mem_env_cfg)::set(this,“*”,“mem_env_cfg”,ecfg);

                   in env 

uvm_config_db #(mem_write_cfg)::set(this,“wagent*”,“mem_write_cfg”,ecfg.ewcfg);

                    in driver 

if(!uvm_config_db #(mem_write_cfg)::get(this,“”,“mem_write_cfg”,wcfg))

Without using config object to send sequence into driver any other way to pass interface?

In reply to Sv-hustler:

Looks a little bit confusing. Where do you set your virtual interface. The recommended way is to do this in the toplevel module.

Using a config object is one way to do pass the interface. You can do it directly.