# I2C multiplexer

**URL:** <https://verificationacademy.com/forums/t/i2c-multiplexer/34670>\
**Category:** SystemVerilog\
**Tags:** I2C, SystemVerilog, inout\
**Created:** [July 12, 2018, 10:01am UTC](https://verificationacademy.com/forums/t/i2c-multiplexer/34670 "2018-07-12T10:01:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bogdan\_Mavrodin](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/74df32/32.png) [@Bogdan\_Mavrodin](https://verificationacademy.com/forums/u/Bogdan_Mavrodin)\
**Post date:** [July 12, 2018, 10:01am UTC](https://verificationacademy.com/forums/t/i2c-multiplexer/34670/1 "2018-07-12T10:01:26Z")

</div>

Hello,

I have to verify an interface with 2 inout pins which can be configured as I2C signals:

- if pin0\_cfg == 0 =\> pin0 will be SDA;
- if pin0\_cfg == 1 =\> pin0 will be SCL;
- if pin1\_cfg == 0 =\> pin0 will be SDA;
- if pin1\_cfg == 1 =\> pin0 will be SCL;

My idea is to connect the UVCs to an “i2c mux interface” which will than be connected to the DUT.  
The issue appears at the bidirectional SDA channel. I cannot decide who is controlling the SDA (Master/Slave);

Any suggestions on how can I implement the mux or how can I verify those 2 configurable pins ?

Best regards.  
Bogdan
