Ijseas 20150367
Ijseas 20150367
ISSN: 2395-3470
www.ijseas.com
1, 2,
P M.Tech., VLSI, U.V.Patel College of Engineering and Technology, Kherva, Mehsana, India
P 2T 2T
3
Verification Technical Assistant, eiTRA, Ahmedabad, India
P P
Abstract—we
42T present design of an
42T
intellectual property (IP) for inter-integrated To exploit these similarities and benefit
circuit (I2C) bus protocol. To enable multiple
P P
to both systems designers and equipment
devices to communicate with each other over manufacturers and to maximize hardware
serial data bus without any data or address efficiency and circuit simplicity, that is why a
loss, as well as to enable faster devices with simple bidirectional 2-wire bus for efficient
slower ones. The inter IC(I2C) protocol was P P
inter-IC control. This bus is called the Inter IC
put forward by Philips semiconductors in 4th P P
or I2C-bus. All I2C-bus devices incorporate an
P P P P
April 2014. This protocol design proposed on-chip interface which allows them to
for reusability concept. In this paper, a communicate directly with each other via the
design on FPGA Platform is presented for I2C-bus. This design concept solves the many
P P
471
International Journal of Scientific Engineering and Applied Science (IJSEAS) - Volume-1, Issue-3, June 2015
ISSN: 2395-3470
www.ijseas.com
• Slave selection protocol uses a 7-bit transition from High to Low. Initially both are
slave address at high impedance (Z) and for STOP condition
• Bidirectional data transfer indicate that SCL must be high rising
• Data transfer Speed edge/state. And SDA line must follow the
1. standard mode - 100 Kbit/s transition from Low to High.[1][2]In software
2. fast mode - 400 Kbit/s simulation based verification, the HDL code of
3. High Speed mode - 3.4 Mbits/s the digital logic is simulated by the simulation
• Acknowledgement after each transferred software. Logic simulation is the primary tool
byte used for verifying the logical correctness of a
• No fixed length of transfer hardware design. In many cases, logic
• True Multi-master capability simulation is the first activity performed in the
process of taking a hardware design from
• Fully supports Clock synchronization &
concept to realization. Test-bench can be
arbitration process
written around the design under test (DUT) and
• Data stability
inputs can be passed to the DUT through the
• Programmable SCL frequency test-bench. Simulation is completely generic
• Soft reset of I2C Master/Salve and any hardware design can be simulated.
• Electrical & timing Specification[1] Setup is simple, quick and easy highest level of
controllability and observability Designer gets
B. I2C Addressing Format
P P
read and 0 for write bit respectively. Then Figure 2: I2C Start & Stop Condition
4thstep, acknowledgement bit indicate that slave
P P
master received acknowledgement and then Master/slave receivers pull data line low for one
master sends a stop condition that indicate no clock pulse after reception of a byte. Master
more data or address will there. Finally stop the receiver leaves data line high after receipt of the
transaction. [1][2] last byte requested. Slave receiver leaves data
line high on the byte following the last byte it
can accept.(Figure3).Receiver leaves data line
high for one clock pulse after reception of a
byte.( Figure4) [2]
472
International Journal of Scientific Engineering and Applied Science (IJSEAS) - Volume-1, Issue-3, June 2015
ISSN: 2395-3470
www.ijseas.com
F. Arbitration
procedure to decide which takes control and gives in a valid START condition on it.
which not. This is done by the clock Arbitration is needed to check which master
synchronization and arbitration procedure. will complete their transmission as early as
possible. There is no data lost in it. The
In clock synchronization, wired-and connection advantage is that two master can complete its
can be performed in i2c interface to SCL line. transmission without causing any hazard or
During high to low transition on SCL line start error. Arbitration procedure keeps sending
counted off their low period of concerned pattern bit by bit. When the SCL is gone high it
master. If master clock goes LOW, Then it also will also verify SDA level for which is sent. For
holds the SCL line until the clock remains the the first time a master try to initiates or generate
HIGH state. However, if another clock will a HIGH period, but that will be detecting the
remain at its LOW period, then during the LOW SDA level also gone LOW, the master knows
to HIGH shift of the clock it may not change that it will be lost the arbitration procedure and
the state of the SCL line. So, master held the turns off its SDA output driver. Another master
SCL line LOW with much long LOW period. goes to finish their entire transaction. If a
After that the shorter LOW period enters the master also incorporates a slave function and it
HIGH wait-state during this time by master. loses its arbitration during its address, there is
possible that the possibility of winning masters
When whole masters concerned about counted may attempt to address the master. There will
off their LOW period, so the clock line will be be losing master must be therefore switch over
release and goes HIGH. Then, there is no instantly to their slave mode. Figure shows the
difference between the master clocks & the arbitration procedure for all the masters. For the
473
International Journal of Scientific Engineering and Applied Science (IJSEAS) - Volume-1, Issue-3, June 2015
ISSN: 2395-3470
www.ijseas.com
moments there can be dissimilarities between We can also receive acknowledgement from
the internal data level of the master initiating slave. Whole operation can perform in
DATA1 and also actual level on the SDA line, bidirectional way because Slave may be master
and the DATA1 output could be also switched or master Slave. Address and data will be
off. That won’t affect any of the data transfer generated on SDA line also correlating to the
initiated by the winning master. Since Final SCL line. All devices of (slaves) connected to
control of the I2C-bus is decided on address and the I2C bus should be follow the wired- and
P P
data sent by true competing masters, there condition. If the I2C bus is idle than it goes to
won’t be centralize master inside it, nor any high impedance state. Whether the BUS is
higher priority master given on the bus.[1][3] ‘high’, the Master instantly captures the I2C bus
by pulling down the BUS line to a ‘low’ state.
whether two masters trying to get the bus at the
same time, then the most winning one master
control will be decided by following the I2C
arbitration logic.[1] Functional block diagram
is described as below.
G. Clock stretching
Master can be work as a Slave same as Slave Figure 9: Master /Slave Top module
can be work as Master respectively. In Design, I Table1 indicates the pin and port connection of
have implemented format of the I2C frame. P P
I2C Master/Slave.
P P
474
International Journal of Scientific Engineering and Applied Science (IJSEAS) - Volume-1, Issue-3, June 2015
ISSN: 2395-3470
www.ijseas.com
475
International Journal of Scientific Engineering and Applied Science (IJSEAS) - Volume-1, Issue-3, June 2015
ISSN: 2395-3470
www.ijseas.com
more command, then the master will issues stop IV.IMPLEMENTATION RESULTS
condition (stop state) and go back to We have done the simulation of
the ready state. In slave state machine only state complete I2C frame format on Xilinx ISE
operation of slave acknowledgement and master simulator. Also we cross check the Design work
acknowledgement will change nothing else. as per the FSM or not. This design is for I2C P P
CONCLUSION
476
International Journal of Scientific Engineering and Applied Science (IJSEAS) - Volume-1, Issue-3, June 2015
ISSN: 2395-3470
www.ijseas.com
MOTIVATIONAL WORK
REFERENCES
Semiconductors.
477