IBM PowerPC 405GP User Manual page 619

Embedded processor
Table of Contents

Advertisement

I
Data bit
Data bit
Data bit
IICO_MDBUF is cleared (flushed and set to elT)pty) whenever the IIC interface is reset, or
IICO_MDCNTL[FMB] = 1. Figure 22-4 shows the four FIFO stages.
I
2
131
4
121 31
4
2
3
4
Clock Cycle 1
Clock Cycle 2
Clock Cycle 3
Clock Cycle 4
Figure 22-4. FIFO Stages
When IICO_MDBUF is written with a byte, the byte is placed in the FIFO. The hardware pushes the
byte into the deepest unoccupied stage in the FIFO and advances one FIFO stage per clock. Thus, if
the FIFO is empty, four clocks are needed (one per stage) for the byte to walk to the first stage of the
FIFO. This timing is important to consider when reading the IICO_MDBUF immediately after data is
written. When a master transfer is requested, the IIC interface handles this latency.
If a byte is written to IICO_MDBUF while the FIFO is full, the byte is discarded and not placed into the
FIFO.
If IICO_MDBUF is written with two bytes in a halfword access, and there is space in the FIFO, byte
°
of the halfword is placed ahead of byte 1 in the FIFO. The MSB, byte 0, is written to the IIC bus first,
followed by the LSB, byte 1.
IICO_MDBUF receives data from the IIC bus when the requested master transfer is a read. The first
byte received is the first byte read by software from IICO_MDBUF.
For halfword reads the first byte received is MSB ,byte 0, and the following byte is LSB, byte 1. When
an empty FIFO is read, the byte (or halfword) most recently read is returned.
Care must be taken not to start a requested master operation while there is data in IICO_MDBUF. If,
for example, a master read transfer is requested and obsolete data is in IICO_MDBUF, the obsolete
data would be presented, to the requesting software, as data read by the requested transfer.
22.3.2 IICO Slave Data Buffer
The IICO Slave Data Buffer (IICO_SDBUF) is a copy of IICO_MDBUF. The data contained in the slave
buffer is either received from the IICbus when the IIC interface is addressed as a slave during a write,
or is written on the IIC bus when the IIC interface is addressed as a slave during a read oper,ation.
IICO_SDBUF works in the same way as IICO_MDBUF, except that IICO_SDBUF is used only to store
data sent or received in slave transfers on the IIC bus. This enables overlapping slave and master
transfers on the IIC bus.
22-4
PPC405GP User's Manual
Preiiminary

Advertisement

Table of Contents
loading

Table of Contents