# Calculate the number of bytes from master to slave

**URL:** <https://verificationacademy.com/forums/t/calculate-the-number-of-bytes-from-master-to-slave/36447>\
**Category:** UVM\
**Tags:** UVM, master-and-slave\
**Created:** [August 23, 2019, 1:02pm UTC](https://verificationacademy.com/forums/t/calculate-the-number-of-bytes-from-master-to-slave/36447 "2019-08-23T13:02:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![syedtaahirahmed](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@syedtaahirahmed](https://verificationacademy.com/forums/u/syedtaahirahmed)\
**Post date:** [August 23, 2019, 1:02pm UTC](https://verificationacademy.com/forums/t/calculate-the-number-of-bytes-from-master-to-slave/36447/1 "2019-08-23T13:02:58Z")

</div>

Hi ,

I had one interview question:: there is multi master slave environment.  
Let’s say M1 and M2 are master’s , S1 and S2 are slaves.  
There are transactions like M1 to S1 and M2 to S2 , M1 to S2 so on.  
And there is no VIP ( drivers/Sequencer) , have to write a monitor logic to find the number of bytes from M1 to S1 and the time taken.

Could anyone help me on this?

Thanks

---

<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 23, 2019, 3:04pm UTC](https://verificationacademy.com/forums/t/calculate-the-number-of-bytes-from-master-to-slave/36447/2 "2019-08-23T15:04:29Z")

</div>

_In reply to [syed taahir ahmed](https://verificationacademy.com/forums/t/calculate-the-number-of-bytes-from-master-to-slave/36447):_

You have to know the protocol of this interface. This gives you a starting point for counting the bits/bytes. And you have to count the clock cycles for each byte.
