Communicate between monitor and driver

I am creating an agent, the monitor of this agent needs data items from the randomly generated values from the sequencer to the driver. is there an easy way to get these data items?

Easy depends on how much data, and how often you to send it. For a small amount of data, that doesn’t change often, consider storing it in a shared configuration object. For a large amount of data that changes with every sequence, consider using an analysis port that write()s every item the driver get()s to the monitor.

From a reuse perspective this may be a bad design/architecture as the agent/monitor becomes un-usable at next level of sub-system verification (where typically this lower layer sequencer/driver is likely to be masked/turned off).

Consider making your monitor independent of sequencer as much as possible.

Good Luck
Ajeetha, CVC

You can declare these items as static variables in the sequence item and generate randomly. Then access these static variables from monitor using the scope resolution operator.

In reply to malathi@aceic.com:

I think defining the static variable is not the good way because if there are multiple instances of sequence item are created at same time then it will be problematic.

I would opt for the analysis port to send the transaction OR define the struct and share it between driver and monitor.

Ideally driver and monitor should operate independently for optimum re-usability.

Hi vaibhav,
I am using TLM ports for communication between monitor and driver.In my case I have to generate two different responses based on command and data sampled by monitor. I am sending this command and data to driver using two different TLM ports. But I am confused about generating two different responses using single sequencer and driver,so is there any way to handle such condition??

In reply to tavagad_pravin:

may be the monitor transactions can be accessed through virtual interface