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.
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.
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??