Is there a way to get the type of interface that is being passed in as a parameter? I believe using $typename will not work since the interface is not virtual.
I also believe that SV doesn’t support introspection so that’s out of the question. It’s effectively trying to have some kind of function like get_type_name() in UVM for a UVM class object
You cannot parameterize an interface, it is not a datatype. However, SystemVerilog provides a generic interface that assumes the kind of interface the port gets connected to. You can use a parameter inside the connected interface to select.
Yes, you can parameterize the types used inside the interface/module, but not an interface port itself, which is what you seemed to be doing with the m_if port in your first example.