# Is OK, in my situation, for a driver to have an analysis port or for a monitor to drive an interface signal?

**URL:** <https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930>\
**Category:** UVM\
**Tags:** UVM\
**Created:** [August 27, 2018, 10:58am UTC](https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930 "2018-08-27T10:58:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aarelovich](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@aarelovich](https://verificationacademy.com/forums/u/aarelovich)\
**Post date:** [August 27, 2018, 10:58am UTC](https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930/1 "2018-08-27T10:58:34Z")

</div>

Here is my situation.

The output of my DUT drives an 8 bit word on each clock and also a write enable when the data is valid. The DUT will be connected to another IP which has a FIFO receiving the data, becuase it needs to process each byte and it takes several clocks to do so. When the DUT attempts to write into the FIFO and the FIFO is full, it will emit a FIFO\_full signal so that the DUT does not change continue sending the information.

The only way of knowing when the information is all sent is to buffer and process the each byte in the UVM testbench.

In order to fully verify the DUT I need to reproduce that FIFO\_full behaviour, hence I need a driver for that interface. Thing is, that a monitor for that interface will need to do the almost EXACT same thing. The only difference is that the driver will drive the FIFO\_full signal, while the monitor will just read it, to know whether to buffer the data or not. But both will need to receive and process each byte. The Driver needs to do this in order to know when the transaction is done. And the Monitor needs to do it because it actually needs the information so it can provide it to the scoreboard.

This seems very counter-intuitive because of doing the same thing twice.

The problem can easily be fixed by either having the monitor drive the FIFO\_full signal or just having the driver use an analysis port to send the information to the scoreboard.

Is there any reason why this should not be done?

---

<div class="post-metadata">

**Author:** ![desperadorocks](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/d/ecc23a/32.png) [@desperadorocks](https://verificationacademy.com/forums/u/desperadorocks)\
**Post date:** [August 27, 2018, 2:41pm UTC](https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930/2 "2018-08-27T14:41:29Z")

</div>

_In reply to [aarelovich](https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930):_

My suggestion would be not to mix and match the operations of driver with monitor and vice-versa.

a. Say if you are porting your bench to the SoC level, in that scenario you don’t want the driver/sequence active components and you tend to disable them. So in that case, your scoreboard will be expecting some data for checking process and will get stuck since your components are in passive mode.

b. Instead if you have your monitor by default as per basic flow, irrespective whether you agent is in active/passive mode, the monitor keeps monitor the data and sends it to the scoreboard for checks.

So for portability from IP/Subsystem Verification to SoC verification, its better to have them separate and do their functionalities separately and not to mix them.

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [August 27, 2018, 3:56pm UTC](https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930/3 "2018-08-27T15:56:36Z")

</div>

_In reply to [aarelovich](https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930/2):_

> Here is my situation.  
> The output of my DUT drives an 8 bit word on each clock and also a write enable when the data is valid. The DUT will be connected to another IP which has a FIFO receiving the data, becuase it needs to process each byte and it takes several clocks to do so. When the DUT attempts to write into the FIFO and the FIFO is full, it will emit a FIFO\_full signal so that the DUT does not change continue sending the information.  
> The only way of knowing when the information is all sent is to buffer and process the each byte in the UVM testbench.  
> In order to fully verify the DUT I need to reproduce that FIFO\_full behaviour, hence I need a driver for that interface. Thing is, that a monitor for that interface will need to do the almost EXACT same thing. The only difference is that the driver will drive the FIFO\_full signal, while the monitor will just read it, to know whether to buffer the data or not. But both will need to receive and process each byte. The Driver needs to do this in order to know when the transaction is done. And the Monitor needs to do it because it actually needs the information so it can provide it to the scoreboard.  
> This seems very counter-intuitive because of doing the same thing twice.  
> The problem can easily be fixed by either having the monitor drive the FIFO\_full signal or just having the driver use an analysis port to send the information to the scoreboard.  
> Is there any reason why this should not be done?

My question is: does the DUT fifo indicate ‘full’ or do you have a fifo in the driver indicating ‘full’? I gues you want to verify ‘fifo full’ in the design. Then you have to feed your DUT fifo with appropriate data.

---

<div class="post-metadata">

**Author:** ![aarelovich](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@aarelovich](https://verificationacademy.com/forums/u/aarelovich)\
**Post date:** [August 27, 2018, 4:22pm UTC](https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930/4 "2018-08-27T16:22:19Z")

</div>

_In reply to [desperadorocks](https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930/3):_

This is the final design. These situations are very very unlikely. Basically they are not a problem.

_In reply to [chr\_sue](https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930/3):_

The IP that will be connected to the DUT is the one that will emit the FIFO\_full signal. I need (in my driver) to simulate this behaviour in order to see if the DUT reacts accordingly to that signal.

I hope that clarifies it for you.

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [August 28, 2018, 6:10am UTC](https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930/5 "2018-08-28T06:10:45Z")

</div>

_In reply to [aarelovich](https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930/4):_

OK, your IP is a VIP (verification IP). Is this a UVM agent or environment?  
Then you can generate a sequence to drive the fifo\_full signal.

---

<div class="post-metadata">

**Author:** ![aarelovich](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@aarelovich](https://verificationacademy.com/forums/u/aarelovich)\
**Post date:** [August 28, 2018, 8:07am UTC](https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930/6 "2018-08-28T08:07:22Z")

</div>

_In reply to [chr\_sue](https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930/5):_

Yes, this is what I’ve done. I just didn’t add a monitor since the sequence can only end when the driver obtains all of the information.

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [August 28, 2018, 11:29am UTC](https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930/7 "2018-08-28T11:29:08Z")

</div>

_In reply to [aarelovich](https://verificationacademy.com/forums/t/is-ok-in-my-situation-for-a-driver-to-have-an-analysis-port-or-for-a-monitor-to-drive-an-interface-signal/34930/6):_

The UVM does not have compliance rules. For this reason it is OK, what you are doing. In some of my UVM testbenches I do not have monitors. I’m passing directly from the driver data needed for coverage collection or scoreboarding through an analysis port in the driver to the appropriate components. It’s simply fine and not a violation of rules.

For most problems there is not ONE best practice. There are always more than ONE solutions.
