Localparam access to virtual interfaces compared to classes

In reply to jordan.chicheportiche:

You may want to search the DVCon.org archives for papers dealing with parameterized interfaces.

Some alternatives are

  1. Use a parameterized struct to represent a set of parameter values, and use a single parameter to override both the driver class and interface parameters. This works well when all the parameters are numeric values, but it becomes a pain if you want to override just a few parameter values.
  2. You can use a parameterized class type just for its parameters instead of a struct. Then the class parameters can contain type parameters, and you can override a few parameters by extending the class.
  3. Avoid the use of virtual interfaces. Abstract classes can be used instead, and they also can be used to decouple the interface parameters from the parameters that your driver/monitor needs to see.

You will need to check your downstream tools to make sure they support any of these alternative, especially if the interfaces need to be synthesized.