Uvm reg read from uvm-monitor

In reply to dayalan.natarajan:

I am trying to read a UVM Register from run_phase of UVM_Monitor and getting the following error
Error-[IOUCM] Illegal use of class method
dmtcomplex_uvc_pkg, “uvm_pkg::\uvm_reg::read (this.m_dmtcomplex_uvc.m_dmt_reg_block.dmt.dmtint, \this .status, this.intr_occurred, /* path = UVM_DEFAULT_PATH /, / map = null /, / parent = null /, / prior = (-1) /, / extension = null /, / fname = “\000” /, / lineno = 0 */);”
Class methods can’t be used in the current context.
Please check LRM for class method usage.
Please let me know if I can call UVM register read or write method from uvm_monitor

The monitor is by intention a passive component, i.e. no activity will be started from this component. This includes also register calls. If you setup your UVM environment correctly you can initiate any register activity through the sequencer/driver. And you can provide any register related data for further processing from the driver.