IDT PCI Bus Interface
Use of Decoupled PCI Transactions
79RC32438 User Reference Manual
10 - 2
November 4, 2002
Notes
Use of Decoupled PCI Transactions
The PCI portion of the system controller sits on the IPBus. Therefore, read and write transactions to and
from this block consume some of the available IPBus bandwidth and must be factored into the overall
system bus utilization for a given system. To maximize performance, the number of local IPBus cycles
consumed for a given transaction should be minimized. The PCI system controller is designed to automati-
cally do this for most types of transactions.
In the case of DMA operations to or from the PCI, the transaction is initiated by the DMA. Prior to taking
control of the IPBus, the DMA automatically waits for the data to become available in the master read case
or for space to be available in the output FIFO for the master write case. This prevents the DMA from
wasting bandwidth sitting on the IPBus waiting for data to become available. In the case of target reads and
target writes from an external PCI master to the RC32438 as a PCI target, data is fetched or queued effi-
ciently. No user intervention is required.
However, in the case where the CPU core rather than the DMA controller initiates a master read or a
master write, users must be careful not to monopolize the IPBus which will reduce available bandwidth. The
RC32438 contains the following mechanism for decoupling both CPU master reads and CPU master writes.
In the master write case, the CPU core can check the status of the master write FIFO prior to beginning
the write via the OFE (Output FIFO Empty) bit, bit[3], of the PCI Decoupled Access Status Register
(PCIDAS). If this bit is set, the FIFO is empty. Then the CPU core can safely initiate a master write or a
burst of 4 writes, since enough space is guaranteed for the transaction to be queued immediately without
stalling the IPBus.
In the master read case, the user can enable the Decoupled Access Mode via the DEN bit in the PCI
Decoupled Access Control Register (PCIDAC). When the DEN bit is set, any master read to the PCI
memory space will return a "0" immediately. The program can then either rely on polling or use an interrupt
generated from the PCI Decoupled Access Status Register (PCIDAS) Done bit (D) to indicate that the read
has been completed. Upon completion, the data will be available in the PCI Decoupled Access Data
Register (PCIDAD).
If the user opts not to enable this mode, some amount of efficiency will be lost waiting for CPU-initiated
master reads to complete. In most applications, this is probably acceptable as the number of CPU-initiated
master reads is generally small. However, in the case of PCI bridges, failure to use the decoupled master
read mechanism could result in the read timing out and causing a bus error. This error occurs when the
CPU core attempts a master read while the bridge has data queued in its write FIFO and is attempting to
initiate target writes to the RC32438 device to clear the queue. The bridge will pass the read to the device
on the other side, but when that target PCI device returns the requested read data to the bridge, the bridge
will hold the data until the bridge manages to clear its write FIFO. However, since the CPU core is not using
decoupled reads, the CPU holds the IPBus until the transaction completes. As long as the CPU is sitting on
the IPBus, the bridge can only do writes until the target write FIFO fills up on the RC32438. When the target
write FIFO is full, the RC32438 refuses to take any further target writes. The RC32438 cannot empty the
target write FIFO — the IPBus must do that — and the CPU continues to wait for the read to complete.
Because the RC32438 will not take any more target writes and the bridge will not pass the read data
through until it completes its writes, the RC32438 and the bridge are now "deadlocked".
The deadlock will only be broken when the RC32438 PCI master transaction retry counter is exceeded.
At that point, the system will generate a bus error. The interrupt handler must correct the problem. This
obviously imposes a significant performance penalty.
Therefore, IDT strongly recommends the use of decoupled master reads and checking the status of the
output FIFO empty bit prior to generating CPU-initiated master reads or master writes, especially when the
RC32438 is being used with a PCI bridge.
IPBus Access
Access to the IPBus is determined by the IPBus arbiter.