In reply to dave_59:
what about if I have to instantiate two different instances (with different value of N) of the same virtual interface?
// in top module
uvm_config_db#(intf#(M))::set(null, "*", "intf", intf_inst_1);
uvm_config_db#(intf#(N))::set(null, "*", "intf", intf_inst_2);
I suppose that first set db creates an interface with M, while the second config_db returns an error because it finds a interface already set with M.
Am I wrong?