5.2.4. 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:

To alleviate the problems associated with frequent switching, the funnel implements a minimum hold time feature.

Minimum hold time

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.

Example minimum hold time waveform

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.

Figure 5.2. ATB funnel minimum hold time example

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


Table 5.1 shows the sequence of events in Figure 5.2.

Table 5.1. Event sequence

TimeEvent
t0
  • slave port 1 is currently selected

  • higher priority slave port 0 has a pending transfer

  • slave port 1 remains selected because the minimum hold time has not expired.

t1
  • Slave port 1 remains selected because the minimum hold time has not expired.

t2
  • Minimum hold time expires for slave port 1 and funnel switches to slave port 0.

t3
  • Slave port 0 has no more data to transfer and the funnel switches back to slave port 1.


Priority setting

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.

Additional consideration for ATID changes

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.

Arbitration scheme

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:

  1. Sources in the flush state.

  2. Sources with a higher programmed priority level.

  3. Sources which were not previously selected.

  4. Sources with a lower source number.

Note

Hold time is reloaded at each arbitration point.

Example arbitration waveform

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.

Figure 5.3. ATB funnel arbitration example

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


Note

ATIDS1 has changed since the previous cycle.

Table 5.2shows the sequence of events in Figure 5.3.

Table 5.2. Event sequence

TimeEvent
t0
  • slave port 2 is currently selected.

t1
  • funnel switches to high priority slave port 1.

t2
  • high priority slave port 0 asserts ATVALIDS0

  • lowest priority slave port 3 asserts ATVALIDS3.

t3
  • Minimum hold time expires for slave port 1 and the next highest priority port, slave port 0 is selected.

t4
  • Minimum hold time expires for slave port 0 and the next highest priority port, slave port 1 is selected.

t5
  • ATID changes for slave port 1, minimum hold time is overridden so the next highest priority port, slave port 0 is selected.

t6
  • slave port 0 finishes

  • funnel switches to the next highest priority port, that is, back to slave port 1.

t7
  • Minimum hold time expires for slave port 1, but being highest priority it remains selected.

t8
  • slave port 1 finishes

  • funnel switches to next highest priority port that is slave port 2.

t9
  • Minimum hold time expires for slave port 2, but being higher priority than slave port 3, it remains selected.

t10
  • slave port 3 finishes

  • funnel switches to the last remaining port, slave port 3.


Copyright © 2011-2012 ARM. All rights reserved.ARM DDI 0480B
Non-ConfidentialID042612