Passing config parameters to interface

This is one of the big problems with using parameterized interfaces. The parameters of interface become part of the interface type, just like a parameterized class. You can only make an assignment to a virtual interface variable if the interface instance parameters match.

This means you have to parameterize your driver to match the interface parameters

// driver 
virtual example_if#(DWIDTH,AWIDTH) vif;
uvm_config_db#(virtual example_if#(DWIDTH,AWIDTH) )::get(this, “”, “example_vif “, vif)

This means you have to either parameterize your agents(which means you won’t be able to make an array of agents), or use the factory to override each driver with the proper parameter overrides.

There have been many papers written to deal with this issue, including avoiding parameterized interfaces or avoiding virtual interfaces altogether.