Is it mandatory to instantiate a UVM monitor?

Hi all,

I see that the base class i.e, uvm_monitor is a virtual class. So is it mandatory to use a UVM monitor?

Regards,
Rakesh Reddy

No, the use of a monitor is not mandatory. The virtual tag on the uvm_monitor class definition simply means that you can’t instantiate a uvm_monitor class directly - you instead have to extend a class from uvm_monitor and use that.

Regardless of how a monitor is defined, though, the use of a separate monitoring component within an agent is highly advisable. It enables a very useful level of agent reuse and flexibility that you wouldn’t get otherwise (easily switch between active & passive modes by removing an active driver component in your agent, leaving only the monitor).