2 analysis ports connected to one analysis import

I need to develop a reusable scoreboard which would be connected to a variable agent. Different agents would be selected through the environment. Only one agent would be constructed at the environment.
My goal is to create a single analysis import in the scoreboard connected to analysis port of the different agents with different transaction types. Is there a way to implement a single analysis import with a common transaction type to the different analysis ports?
Your reply would most certainly be appreciated. :)

When you are planning to connect agents analysis port to single analysis implement of scoreboard, Are these Agents of same class type or different class type?

In reply to vishnuprasanth:

the agents are of different class type and their items are also different types.

In reply to kbx2124:

Since both analysis ports and analysis_imp are parametrized to a particular transaction type it may not be possible to connect two different types of analysis ports to one imp.

In my case I was able to connect multiple analysis ports to a single imp port in a scoreboard. All analysis and imp ports are typed to one transaction type though.

If the transaction types are different with different item types, you will have to explain how you expect to make the scoreboard reusable.

Normally the transaction classes will share a common base class, and you use a common set of virtual methods to interact with the different class types. You can have a single analysis port in your scoreboard receive all the transactions from the different agents and have either a field in your transaction indicate which monitor it came from, or if each agent has a different type, you can use the virtual method get_object_type() (added by the `uvm_object_utils macro) to see which type of object you have.

However, if you need to access a specific item in an extended class object, you will need to know which class types have that extra item defined and $cast it to that type

In reply to dave_59:

Agree with Dave. This type of reuse has to come from basic OOP which includes defining generic base classes and using those to pass information around and cast it when required.

In reply to techridge:

Thanks for all the replies. I think I would need to find a way to transfer a generic base class to the analysis port of the scoreboard

In reply to nocsmsourabh:
An analysis port(from agent) can be connected to multiple analysis exports(to scoreboard), but all must be parameterized with the same type.

In reply to dave_59:

Thanks Dave !!

I will be very thankful to you if you can answer my this query :- https://verificationacademy.com/forums/uvm/uvm-predictor