8-4
MPC8240 Integrated Processor User's Manual
MOTOROLA
PCI Bus Arbitration
8.2 PCI Bus Arbitration
PCI bus arbitration is access-based. Bus masters must arbitrate for each access performed
on the bus. The PCI bus uses a central arbitration scheme where each master has its own
unique request (REQ) output and grant (GNT) input signal. A simple request-grant
handshake is used to gain access to the bus. Arbitration for the bus occurs during the
previous access so that no PCI bus cycles are consumed due to arbitration (except when the
bus is idle).
The MPC8240 provides bus arbitration logic for the MPC8240 and up to Tve other PCI bus
masters. The on-chip PCI arbiter is independent of host or agent mode. The on-chip PCI
arbiter can operate in both host and agent modes or it can be disabled to allow for an
external PCI arbiter.
A conTguration signal (MAA2) sampled at reset (HRST_CTRL), determines if the on-chip
PCI arbiter is enabled (low) or disabled (high). The on-chip PCI arbiter can also be enabled
or disabled by programming bit 15 of the PCI arbitration control register. Note that the
sense of bit 15 is the inverse of the conTguration signal (that is, when bit 15 = 1 the arbiter
is enabled, and when bit 15 = 0 the arbiter is disabled).
If the on-chip PCI arbiter is enabled, a request-grant pair of signals is provided for each
external master (REQ[0D4] and GNT[0D4]) and for the internal master state machine of the
MPC8240. If the on-chip PCI arbiter is disabled, the MPC8240 uses the GNT0 signal as an
output to issue its request to the external arbiter, and uses the REQ0 signal as an input to
receive its grant from the external arbiter.
8.2.1 PCI Bus Arbiter Operation
The following subsections describe the operation of the on-chip PCI arbiter.
The on-chip PCI arbiter uses a programmable two-level, round-robin arbitration algorithm.
Each of the Tve external masters, plus the MPC8240, can be programmed for two priority
levels, high or low, using the appropriate bits in the PCI arbitration control register. Within
each priority group (high or low), the PCI bus grant is asserted to the next requesting device
in numerical order, with the MPC8240 positioned before device 0.
Conceptually, the lowest priority device is the master that is currently using the bus, and the
highest priority device is the device that follows the current master in numerical order and
group priority. This is considered to be a fair algorithm, since a single device cannot prevent
other devices from having access to the bus; it automatically becomes the lowest priority
device as soon as it begins to use the bus. If a master is not requesting the bus, then its
transaction slot is given to the next requesting device within its priority group.
A grant is awarded to the highest priority requesting device as soon as the current master
begins a transaction; however, the granted device must wait until the bus is relinquished by
the current master before initiating a transaction.