The controller supports PFC priority-based pause transmission and reception. Before PFC pause frames can be received, bit [16] of the network control register must be set. The start of a PFC pause frame includes:
- Destination address:
0x0180C2000001
- Source address: 6 bytes
- Type (MAC control frame):
0x8808
- Pause opcode:
0x0101
- Priority enable vector: 2 bytes
- Pause times: 8 x 2 bytes
Pause Frame Reception
The ability to receive and decode priority-based pause frames is enabled by setting bit [16] of the network control register. When this bit is set, the controller matches either classic IEEE Std 802.3 pause frames or PFC priority-based pause frames. After a priority-based pause frame is received and matched, the controller only matches on priority-based pause frames (this is an IEEE Std 802.1Qbb requirement, known as PFC negotiation). After a priority-based pause is negotiated, any received IEEE Std 802.3x format pause frames are not acted upon. The state of PFC negotiation is identified using the output pfc_negotiate. If a valid priority-based pause frame is received, then the controller decodes the frame and determines which, if any, of the eight priorities are require to be paused. Up to eight pause time registers are then updated with the eight pause times extracted from the frame, regardless of whether a previous pause operation is active or not. When a pause frame is received, an interrupt is triggered in the APB_Misc_ISR register (bits [12] or [13]), but only if the interrupt is enabled in the APB_Misc_IMR mask register when the pause frame is receive.
Pause frames received with non-zero quantum are indicated through the ISR interrupt bit [12]. Pause frames received with zero quanta are indicated on ISR bit [13]. The state of the eight pause time counters are indicated through the outputs rx_pfc_paused. These outputs remain High for the duration of the pause time quanta. The loading of a new pause time only occurs when the controller is configured for full-duplex operation.
If the controller is configured for half-duplex operation, the pause
time counters are not loaded, but the pause frame received interrupt is still
triggered. A valid pause frame is defined as having a destination address that
matches either the address stored in specific address register 1 or if it matches
the reserved address of 0x0180C2000001
. It must
also have the MAC control frame type ID of 0x8808
and have the pause opcode of 0x0101
.
Pause frames that have FCS or other errors are treated as invalid and are discarded. Valid pause frames received increment the pause frames received statistic register.
The pause time registers decrement every 512-bit times immediately following the PFC frame reception. For test purposes, the retry test bit can be set ( Network_Config register bit [12]).
After transmission, a pause frame transmitted interrupt is generated (ISR bit [14]) and the only statistics register that is incremented is the pause frames transmitted register.
PFC pause frames can also be transmitted by the MAC using normal frame transmission methods.