| |||
| Home > ATB Interconnect Components > ATB funnel > Arbitration | |||
The funnel combines trace streams from multiple ATB buses into a single ATB bus. Streams are combined by switching between ATB masters connected to funnel inputs.
The selection of the ATB slave is performed using a priority-based arbitration scheme.
However, the following adverse consequences associated with frequent switching exist:
loss of efficiency in the formatter, therefore losing trace bandwidth downstream of a formatter
loss of bus efficiency in the upsizer.
To alleviate the problems associated with frequent switching, the funnel implements a minimum hold time feature.
When the bus is granted to a particular trace source, an ATB master, it stays granted for a programmed number of sequential transfers. The number of sequential transfers a master can perform without losing ATB bus to higher priority source is the minimum hold time. If there are no more pending transfers, the bus is granted to another master even if the hold time number has not been exceeded. If the other masters do not have valid data after the hold time has expired, the same master is granted again, but the hold counter is not re-loaded with the value from the register. This enables other masters to obtain a grant as soon as they have data.
The minimum hold time is set by the value of the HT field
in the Control Register plus 1. The reset value of the HT field
is 0x3 meaning a minimum hold time of 4.
The maximum value for the minimum hold time is 0xE,
and equates to 15 transactions.
The hold time value in the Control Register can be programmed at any time, without any restriction with regard to the state of the trace system.
The new hold time value takes effect from the next arbitration point after the hold time has been changed.
The hold time value of 0xF is reserved
and programming the hold time with 0xF is considered
to be a programming error.
The following are the funnel configurations:
two ATB slave interfaces
slave port priority, that is, slave port 0 has the higher priority, and slave port 1has the lower priority
minimum hold time is 4.
Figure 5.2 shows the sequence of events.
Table 5.1 shows the sequence of events in Figure 5.2.
Table 5.1. Event sequence
| Time | Event |
|---|---|
| t0 |
|
| t1 |
|
| t2 |
|
| t3 |
|
The funnel implements programmable priority for the attached ATB masters. Priority values for each ATB slave interface are defined in a 3-bit field in the Priority Control register. A port programmed with the value 0 gets the highest priority. A port programmed with the value 7 gets the lowest priority. At reset, the default configuration assigns priority 0 to all ports.
The bandwidth sharing scheme is used when selecting the next funnel input among masters with equal priority. The priority value for the ATB slave interface is only changed when the ATB slave interface is disabled. Programming the priority value for the enabled ATB slave is considered to be a programming error. The funnel takes the newly programmed priority values at the arbitration point.
Frequent funnel switching results in a trace stream with frequent ATID changes leading to inefficiency in the formatter. In the case of cascaded funnels, even with hold time implemented, some unnecessary ATID changes can still be present in the trace stream.
To minimize ATID switching, transfers from a single funnel input are considered sequential only if they have the same ATID.An ID change overrides hold time and causes the funnel to switch to another master with pending transfers.
Funnel implements a round robin arbitration scheme.
A new arbitration is performed at every arbitration point. An arbitration point occurs when no sources were selected on the previous cycle or when the state of the previously selected source is:
its hold time has expired
its ATID has changed from the previous cycle
its ATVALID signal is LOW
its input has been disabled
its flush has been acknowledged after transfer has been completed.
At an arbitration point, first identify all the sources with valid data. If no source has valid data, the following cycle is an arbitration point and no source is selected. Otherwise, the following criteria is used to select the valid source, in decreasing order of priority:
Sources in the flush state.
Sources with a higher programmed priority level.
Sources which were not previously selected.
Sources with a lower source number.
Hold time is reloaded at each arbitration point.
The following are the funnel configurations:
Four ATB slave interfaces.
Slave port priority. Slave port 0 and slave port 1 are the highest priority, slave port 3 is the lowest priority.
Minimum hold time is 2.
Figure 5.3 shows an example waveform for arbitration.
ATIDS1 has changed since the previous cycle.
Table 5.2shows the sequence of events in Figure 5.3.
Table 5.2. Event sequence
| Time | Event |
|---|---|
| t0 |
|
| t1 |
|
| t2 |
|
| t3 |
|
| t4 |
|
| t5 |
|
| t6 |
|
| t7 |
|
| t8 |
|
| t9 |
|
| t10 |
|