How to use different enum definitions (user defined) for different instances of a BFM/VIP

Hi,
We have a VIP/BFM which uses a enum_type XYZ for a field “node_id”.

The above VIP works when with one definition of the enum_type.

Suppose the VIP code has to be reused at multiple places (using instances ) but each use case has a different enum definition for node_id field

The enum_type XYZ is expected to be defined differently in different use cases (as node_id can vary per user).

How can the build/compile of the VIP be taken care so that different instances have enum_type XYZ pointing to different enum_defintions

In reply to Chinky:

You question needs more details, like how are the enums different? Is it just different encodings, or different sets of enum labels? Also, how are these enums being used? Could you use an associative array instead?

There are a number of ways of dealing with this depending on what the intended use of these types and how your testbench is structured. You could use parameterized types and pass hem down to each BFM.