DDR memory controller (MPMC)
RM0082
124/844
Doc ID 018672 Rev 1
For this system, port 0 will be processed 1/(1+2+3+4) = 1/10 of the time and Port 3 will be
processed 4/ (1+2+3+4) = 4/10 of the time. However, if Port 2 is not actively requesting, then
port 0 will be processed 1/(1+2+4) = 1/7 of the time and port 3 will be processed 4/(1+2+4)
= 4/7 of the time.
In order to warrant that relative priorities are maintained, there is a weight counter for each
port within each priority group. These counters track the number of transactions accepted
for that port in that priority group. When any counter value reaches the programmed relative
port priority, the scan order for that priority group will be internally modified. The port
matching its relative priority will be dynamically positioned to the bottom of the scan order
and its counter reset, allowing other ports to get a preferential position.
For ports that are not expected to issue requests at a given priority level, the associated
relative priority parameter should be programmed to 0x1. This allows to minimum allocation
avoiding the risk of lock out in case a command appears.
10.5.5
Understanding port ordering
With simple round-robin arbitration, the ports are scanned following their port number in
incrementing order inside the system. Assuming that the command queue is not full, the
port referenced by the counter is examined for valid incoming transactions. If there is an
active request, it will be accepted. Otherwise, the next port in the scan order will be checked.
For Memory Controller performing weighted round-robin arbitration, the user can sort the
order in which the ports are scanned. This is a useful feature either requests from some
ports are more critical or specific order could reduce contention among ports.
The three bit ahbX_port_ordering parameters are used to set this new scan order. A value
of 3'b000 sets the highest listing in the scan order as a value of 3'b111 is the lowest as well.
If the 5 ahbX_port_ordering parameters are set with unique values, the scan order will be
modified to proceed sequentially following this new order.
If any of the port ordering parameters have the same value, those ports will still be equal in
the arbitration test. In this case, the port number will select between these ports, with the
lower-numbered port automatically being selected first.
For instance, let us consider a system with 8 ports and two port orders as shown in
.
For System B, the port ordering parameters contain different values, so the resulting order is
entirely based on the values of the parameters.
For System C, three ports have the same value set as port order. For these three ports, the
port number settles the order. Remaining ports follow the port ordering parameters.
Table 60.
Relative priority example
Parameter
System A
ahb0_priority0_relative_priority
1
ahb1_priority0_relative_priority
2
ahb2_priority0_relative_priority
3
ahb3_priority0_relative_priority
4