Communication between driver and monitor

hi everyone:
i have a problom with the communication between driver and monitor.
i generate a event in the driver, and i want to use the event in the monitor, how can i reference the event in driver??thank you!!

This functionality can be achieved by using ovm_event_pool. Declare ovm_event_pool in the global area of driver and monitor i.e. where these two components are instantiated.

class agent extends ovm_agent;
ovm_event_pool ev_pool;
driver drv;
monitor mon;

function build();
ev_pool = new;
drv = …
mon = …
endfunction
endclass

Then in the driver add events these pool. In monitor task use the events added by driver.

ovm_event_pool used to synchronize processes running across multiple components.

This functionality can be achieved by using ovm_event_pool. Declare ovm_event_pool in the global area of driver and monitor i.e. where these two components are instantiated.
class agent extends ovm_agent;
ovm_event_pool ev_pool;
driver drv;
monitor mon;
function build();
ev_pool = new;
drv = …
mon = …
endfunction
endclass
Then in the driver add events these pool. In monitor task use the events added by driver.
ovm_event_pool used to synchronize processes running across multiple components.

thank you, it seems the AVM does not have this feature?

Yes in AVM this event functionality is not there.

thank you, it seems the AVM does not have this feature?

thank you !

In the AVM, all communication between components is via TLM. You would simply use an analysis port in your driver and connect that to an analysis_fifo in your monitor. This also works in the OVM.

You can also use SystemVerilog’s built-in event data type directly.

Dave

In the AVM, all communication between components is via TLM. You would simply use an analysis port in your driver and connect that to an analysis_fifo in your monitor. This also works in the OVM.
You can also use SystemVerilog’s built-in event data type directly.
Dave

I have another idea but i do not know if it will run correctly, it is : because the driver and monitor are connected to the dut by interface, i want to put some valueable signal such as variable or event into the interface, then the driver and the moniotr can communicate with each other?

You can do that as well, but the question you need to be asking for re-usability sake is can the monitor work without the driver?

Dave