UVM uses 2 monitors, 1 for input, and 1 for output?

is this the best practice? or can I just use just 1 monitor for the inputs and the outputs of the DUT?
and if both are acceptable, when to use 1 monitor and when to use 2?

In reply to tonyyalfred:

In my opinion, it depends !!

If the input ports and output ports are part of a single interface (e.g. AXI4 where data can go in both directions) then I would make that one monitor.

If the output ports are completely unrelated to the input ports (in terms of being part of a protocol), then I would have 2 separate monitors

In reply to graeme_jessiman:

You may have noticed that uvm_driver includes a single TLM connection, and is a parameterized class that you specialize with the sequence item type. On the other hand, uvm_monitor does not include any TLM connections and is not parameterized. As Graeme said, how you use the monitor depends on your protocol.

My typical agents have a single monitor, with two TLM analysis ports, one for input transactions, and one for outputs. The run_phase() has two parallel threads to process these two streams.

In reply to graeme_jessiman:

In reply to tonyyalfred:
In my opinion, it depends !!
If the input ports and output ports are part of a single interface (e.g. AXI4 where data can go in both directions) then I would make that one monitor.
If the output ports are completely unrelated to the input ports (in terms of being part of a protocol), then I would have 2 separate monitors

Great insight, thank you.

In reply to chrisspear:

In reply to graeme_jessiman:
You may have noticed that uvm_driver includes a single TLM connection, and is a parameterized class that you specialize with the sequence item type. On the other hand, uvm_monitor does not include any TLM connections and is not parameterized. As Graeme said, how you use the monitor depends on your protocol.
My typical agents have a single monitor, with two TLM analysis ports, one for input transactions, and one for outputs. The run_phase() has two parallel threads to process these two streams.

I understand, thank you for your help.