# Questions about the I2C VVC

**URL:** <https://forum.uvvm.org/t/questions-about-the-i2c-vvc/133>\
**Category:** Bitvis VIP I2C\
**Created:** [November 19, 2020, 6:46am UTC](https://forum.uvvm.org/t/questions-about-the-i2c-vvc/133 "2020-11-19T06:46:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@Eric](https://forum.uvvm.org/u/Eric)\
**Post date:** [November 19, 2020, 6:46am UTC](https://forum.uvvm.org/t/questions-about-the-i2c-vvc/133/1 "2020-11-19T06:46:12Z")

</div>

Hi,

When developing a feature which uses a I2C Master, I created a testbench which holds my DUT including the I2C master.  
At the other side of the I2C bus I connected a vvc I2C slave.  
My first experience was that that the I2C\_ACK was not driven by the vvc I2C, is this correct?  
The slave\_mode\_address =\> “0001010000” was set but the vvc slave did not respond.  
Is the I2C VVC only monitoring? I expect a true slave that would pull the SDA low, to ACK the cycle.  
One I added a separate slave instantiation, a model of a m24aa64 EEProm, the I2C\_ACK was set by the m24aa64, not by the vvc\_I2C.  
Any idea what I did wrong?

Second, I thought the vvc\_I2C was able of receiving data and storing it internal as if the vvc\_I2C mimics a EEProm.  
When first writing, the data is stored and when reading via I2C, the stored data is send back to the master.

However, I couldn’t get that working. Again I had to add the m24aa64 to store the data in an array.  
Is this possible with only the vcc\_I2C instantiated?

Third, are there examples available of using the vvc\_I2C as an EEProm?

Rgds,  
Eric

---

<div class="post-metadata">

**Author:** ![Marius](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/marius/32/43_2.png) [@Marius](https://forum.uvvm.org/u/Marius)\
**Post date:** [November 23, 2020, 12:43pm UTC](https://forum.uvvm.org/t/questions-about-the-i2c-vvc/133/2 "2020-11-23T12:43:02Z")

</div>

Hi Erick,

Yes, the VVC/BFM should be able to set the ACK/NACK bit. Do you have 10 bit addressing enabled in the GC\_I2C\_CONFIG? You can see the configuration record on page 8 in the [BFM QR](https://github.com/UVVM/UVVM/blob/master/bitvis_vip_i2c/doc/i2c_bfm_QuickRef.pdf).  
The data from a VVC can be fetched using the fetch\_result() command. More information is found on page 6 in the [Common\_VVC\_Methods.pdf](https://github.com/UVVM/UVVM/blob/master/uvvm_vvc_framework/doc/Common_VVC_Methods.pdf)

Br,  
Marius
