In my testbench, I am passing multiple virtual interfaces to agents. These are mod port type.
The interfaces are passed from env to agents and from there to drivers/monitors.
The interfaces are set/get using config_db.
The question is, is it necessary to specify the complete type at every stage but it is cumbersome and prone to error.
For example,
uvm_config_db#(virtual avalon_streaming_if.master_mp)::set(this,"rx_function_driver","av_st_vif", m_cfg.av_st_master_mp_vif);
Can I just pass plain interface up to drivers/monitors and assign mod port at the driver/monitor. Is this even possible?
For example, assuming a_if is the interface in config_db and a_vif_mp is the modport type declared in the driver, is the following possible:
The following code is the driver class:
virtual a_if.a_mp a_vif;
a_vif = m_cfg.a_if.a_mp;