Send a value from driver to monitor without using TLMs

Hi,

I have to collect a value(de-whitened value) from a Check_whitening task implemented in the driver and pass it to the monitor.
I have made use of a static variable in the Class Packet to store the value from the task after it is executed in the driver.
When I access the variable in the monitor, it is still 0 since the Check_whitening task has not been executed yet in the driver.
How do I synchronize events between the monitor and the driver.
I don’t want to use analysis port/exports to pass the transaction between monitor and driver.

In reply to Curious_cat:

Wha doing simple things complicated. Using the TLM connection is the most simple approach. Any other approach like passing the data to the config_db requires events to indicate when the vale can be retrieved from the config_db.

In reply to chr_sue:

Conventionally, I haven’t seen Monitor connected to a Driver by a TLM.
Only Monitor connected to scoreboard or coverage collector.
Is it the correct way?

In reply to Curious_cat:

The UVM does not have compliance rulre, i.e. you can do anything you want to do. In a few of my industrial projects I used this connection to transmit seq_items to the monitor for further processing in coverage collectors etc. Or I was omitting the monitor and connectiong to the analysis port of the driver coverage collectos and scoreboard.

In reply to Curious_cat:

Use of static variables is generally discouraged is software programming. It becomes difficult to scale once you find you need multiple instances of the same environment. As you’ve already discovered, synchronization of reading and writing is also problematic. And reaching into another class created dependancies that don’t scale as you move from unit to block to SoC testing. (i.e. your driver might get removed because another part of the RTL was added).

The class uvm_event#() is probably the simplest mechanism for sending data from one class to another. But if you need any kind of buffering/queuing or other handshaking, the TLM is a better choice. If no synchronization is required, or already handled by the phases, then uvm_config_db is best for that.

In reply to dave_59:

Thanks for all the suggestions Dave.
I will see which option is best suited for my need and use it.

In reply to chr_sue:

In reply to Curious_cat:
The UVM does not have compliance rulre, i.e. you can do anything you want to do. In a few of my industrial projects I used this connection to transmit seq_items to the monitor for further processing in coverage collectors etc. Or I was omitting the monitor and connectiong to the analysis port of the driver coverage collectos and scoreboard.

Thank you for your inputs as well chr_sue!

Hi,

You can plan to use uvm_queue or uvm_pool to achieve this. To know more about uvm_queue, you can follow the below thread.

https://verificationacademy.com/forums/uvm/uvm-queue-class

Hope this helps.
Putta Satish

according to cookbook, driver is only there for driving transaction to pin level activity and other way around for monitor. why you need sync between to independent blocks?