How to coordinate TB with 2 Drivers

Hello,

I’m performing verification on a block of RTL that has an I2C interface and other misc IO. I want to create a driver that drives the IO and also leverage an I2C agent I’ve already created for driving the I2C interface, however I feel stumped on how to do this.

The I2C Agent has a sequencer, driver and monitor. After get_next_item() the driver will either perform a I2C write or read.

The misc IO driver receives a random config from a sequence and then performs operations/drives inputs. I want the misc IO driver to almost act as a master to the I2C agent…controlling when the writes will happen.

One of the only thoughts that came to mind is to extend the I2C agent, disconnect the I2C driver from the sequencer and connect the seq_item_port directly to an output port of the misc IO driver…However this doesn’t feel like common practice.

Any recommendations on how to do this? I’m anticipating more clarification will be needed.