Uvm_monitor and class parameter

In reply to Lina.Lin:

In reply to verif_learner:
Here is my understanding:
Usually the monitor is used to collect the transactions from the bus interfaces and do checks and coverage etc. there or send the transactions to analysis components like scoreboards through analysis ports. You have freedom to instance the monitor in an agent or in an sub-system environment component which depends on your test bench architecture. You also have freedom to collect one type transaction or multiple type transactions in one monitor.
If you want to have one monitor which can be reused for multiple instances with different transaction type, maybe you can consider to implement your own parameterized monitor. Perhaps there is a case if the different transaction types all share a common base class that you access with virtual methods, it might work.


class my_monitor #(type T) extends uvm_monitor;
T trans;
...
endclass

Thanks God. Someone understands my question. So, you are saying that monitor is a parameterized class as it can have multiple transaction types & interfaces with multiple analysis port?

Thanks for your response. I will post my question on Accelera and see what they say.