![](http://datasheet.mmic.net.cn/230000/79RC32438-200BB_datasheet_15568909/79RC32438-200BB_171.png)
IDT Bus Arbitration
Theory of Operation
79RC32438 User Reference Manual
5 - 3
November 4, 2002
Notes
Theory of Operation
The IPBus has four priorities. Zero is the lowest and three is the highest.
Each IPBus priority has an associated IPBus Arbiter Priority Configuration (IPAPxC) register. The
IPAPxC register contains a Priority Transaction Count (PTC) and Current Priority Transaction Count
(CPTC) field. Each bus master index has a corresponding IPBus Arbiter Bus Master Configuration
(IPABMxC) register. The CMTC field in IPABMxC indicates the current transaction count for the corre-
sponding bus master, while MTC indicates the transaction count. The MSK field in IPABMxC allows bus
ownership requests to be masked from the corresponding bus master index. CPU bus ownership requests
cannot be masked. The P field in IPABMxC contains the IPBus priority for the bus master.
The arbiter should be initialized in the following manner. First, the MTC field of all bus masters should be
configured. Next, the PTC field of all priorities should be configured. Since the arbiter only looks at the
CPTC and CMTC fields, the configuration will take affect in the next epoch (i.e., when CPTC reaches zero).
The configuration of the arbiter may be modified when the system is running.
The IPBus arbiter implements an enhanced Weighted Round Robin arbitration scheme that supports
priorities and full resource utilization.
Figure 5.1 shows a graphical view of the bus arbitration algorithm. In this example, bus masters with
indices 4, 8, and 11 are assigned a priority of three (the highest). Bus masters with indices 3 and 15 are
assigned a priority of two. Bus masters with indices 1, 5, and 14 are assigned a priority of one. Finally, bus
masters with indices 2, 9, 13, and 16 are assigned a priority of zero (the lowest). Arbitration requests from
the other bus masters are masked.
Figure 5.1 Illustration of IPbus Arbitration Algorithm
The circumference of the circles represent the number of IPBus transactions required before the arbitra-
tion epoch for that priority restarts. When an arbitration epoch restarts, the CMTC field of all bus masters
with that priority is set to the corresponding MTC, and the CPTC field of the priority is set to the PTC field.
The algorithm looks at the highest priority. If there is a bus master requesting service whose CMTC is
non-zero, then the bus is granted to that master. If multiple masters exist, then the bus is granted to the
master that currently owns the bus. If none of the masters currently own the bus, then the bus is granted to
the master with the lowest index. The CMTC for the bus master that was granted the bus and the CPTC of
all priorities higher than or equal to the master priority are decremented. If no such bus master was granted
the bus, then the algorithm repeats for the next highest priority.
Because priority is given to the master which currently has the bus, the arbiter will tend to cause trans-
actions to the same bus master to be clustered. This feature is desired to allow IPBus transaction merging.
If the CMTC field for a bus master reaches zero, then the bus master is not granted ownership until the
CPTC of the corresponding priority reaches zero and the arbitration epoch for the priority restarts. Thus, the
MTC field of a bus master can be viewed as limiting the percentage of bus bandwidth allocated to the bus
master. The MTC fields of all bus masters with a given priority are normally less than or equal to the PTC
field of the priority. If the sum is less than the PTC field, then the remaining transfers for the priority are allo-
cated to lower priorities.
M
11
M
8
M
4
M
15
M
3
M
1
M
14
M
5
M
13
M
2
M
9
M
16
Priority 3
Priority 1
Priority 2
Priority 0