I2C VVC Variable Data Length

Hello!

I’ve been using UVVM for a while now. I need to emulate an external I2C device with UVVM. The length of data that the external device accepts is variable based on the op code (the first byte sent).

It seems like UVVM does not handle this situation well. I first tried to read a single byte, determine the op code, and then receive the correct number of bytes after that (using another call to i2c_slave_receive). Using two separate calls to i2c_slave_recieve does not work because the BFM expects a start and stop condition for each call to i2c_slave_receive.

Is there a way to receive a variable amount of data in a single I2C stream? I was hoping to give a max length and the function would return when a stop condition was seen.