Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
13 years ago

Yes No question (Using FPGA as a wire)

1-Can I use FPGA, just as a wire, to carry a bidirectional line like I2C SDA from one pin of the FPGA to the other pin of the FPGA. In the FPGA there will not be an i2c master or slave it will just route the signal from one side to the other side. Both of the sides should be able to drive the SDA signal(bidirectional)

WHY :

I2c master and i2c slave is not physically connected to each other on the PCB BOARD. But they are physically connected to FPGA (Cyclone II EP2C20F484C8)

14 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Listen to FvM; "A repeater on a logical protocol level would be possible, but not an easy design".

    Your repeater needs to "listen" to the protocol and determine which direction the data is flowing. I've been through this exericse and determined that an FPGA I2C repeater is not worth the effort. Find another way.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Been there done that and dropped it as well. Not worth it. The only way is to actually decode the data and then determine what to do. No way to do a physical connection through the FPGA.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    May be the above discuss can be indicated as: external I2C master<--->FPGA I2C slave-----FPGA I2C master<---> external I2C slave. Like a protocol converter.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    May be the above discuss can be indicated as: external I2C master<--->FPGA I2C slave-----FPGA I2C master<---> external I2C slave. Like a protocol converter.

    --- Quote End ---

    The description fits in terms of involved effort, but not for the exact functionality.

    The converter needs to pass the response of addressed peripherals from second bus immediately bit by bit, clock cycle accurate.