OpenCores
no use no use 1/1 no use no use
i2c protocol
by arunask on Oct 6, 2015
arunask
Posts: 1
Joined: Sep 28, 2015
Last seen: Feb 4, 2016
anyone pls help us to write vhdl code for i2c and spi protocol.. both master and slave with testbench.
thanks in advance
Copy of im.JPG (23 kb)
RE: i2c protocol
by dgisselq on Oct 6, 2015
dgisselq
Posts: 247
Joined: Feb 20, 2015
Last seen: Oct 24, 2024
You should be able to find plenty of examples of what you need in the projects directory. Take a look at what others have done, and that should give you some ideas.

Will you be posting your work when you are done?

Dan
RE: i2c protocol
by NIDHI_MAKWANA on Nov 5, 2015
NIDHI_MAKWANA
Posts: 2
Joined: Oct 3, 2015
Last seen: Dec 17, 2015
Hello,
We have a project on creating "VIP of I2C MASTER", we need a I2Cslave DUT, so , we have downloaded I2Cslave project from opencores...we are facing problem in understanding the DUT..Kindly help us out..

How should we implement the master VIP to test the I2Cslave?

The RTL code which we have referred to is attached below.. In that the reset, and clock, are understood , but we are not getting the use of rest of the 8 registers used in the portlist of I2Cslave DUT.

This confusion is due to the fact that according to the protocol, we have only 2 main and only connections to the slave..

Thanking you..
i2cSlave.v (6 kb)
RE: i2c protocol
by dgisselq on Nov 5, 2015
dgisselq
Posts: 247
Joined: Feb 20, 2015
Last seen: Oct 24, 2024
I'm not sure I understand your question. Here's some possible helps:

The I2C protocol is difficult to implement internally to an FPGA, since it depends upon pullup resistors that are available on output ports only.

However, once you have it set up right, two chips should communicate nicely over the I2C using only two wires--one controlled by the master only, the second wire jointly controlled by the master and the slave. These wires are the sda and scl lines in the i2cSlave file you posted. These are probably the two wires you are thinking of.

The other connections to the I2C slave (myReg0-myReg7) are, IIRC, connections to the rest of the slave device. According to the documentation, the device allows you to set and query up to 256 registers, although the register module appears to only support 8 output registers and 4 input registers.

Incidentally, for those others reading, the file appears to come from Steve Fielding's I2C Slave project.

Perhaps if you

Dan

RE: i2c protocol
by NIDHI_MAKWANA on Nov 6, 2015
NIDHI_MAKWANA
Posts: 2
Joined: Oct 3, 2015
Last seen: Dec 17, 2015
Hello Dan,

Thank you for replying us..

We will be working on this...

no use no use 1/1 no use no use
© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.