4.8 Physical Layer Collision Avoidance (PLCA)
PLCA operates in conjunction with a CSMA/CD MAC to actively avoid collisions among half-duplex stations (known as PLCA nodes) allowing for greater network utilization. Each node on the network segment (i.e., collision domain) is assigned a unique Local ID. Transmit opportunities are then granted to each node in sequence based on their Local ID. The node configured as Local ID = 0 is known as the PLCA coordinator. The role of the PLCA coordinator is to transmit a periodic synchronizing BEACON onto the physical media. All other nodes are referred to as a PLCA follower as they follow the synchronization of the coordinator. Once the BEACON has been received on the segment, all nodes begin counting transmit opportunities beginning with zero. Nodes detect their assigned transmit opportunity by counting the number of opportunities that have passed since the transmission of the BEACON by the PLCA coordinator. Each node may transmit when the number of transmit opportunities counted since the BEACON matches the Local ID assigned to the node. Within each transmit opportunity, the node assigned the current opportunity may either transmit a packet or yield. Once the node has transmitted a packet (or yielded), each node increments the transmit opportunity counter and the transmit opportunity goes to the next node. The first transmit opportunity of zero allows node with Local ID = 0 to transmit. Once a fixed number of transmit opportunities has been provided, the PLCA coordinator will transmit another BEACON starting the cycle over again. A BEACON followed by a fixed number of transmit opportunities is known as a PLCA bus cycle.
On multidrop topologies with multiple nodes connected to a shared media mixing segment, PLCA enables a fairness in opportunity to transmit such that one node cannot transmit more than one frame without each of the other nodes also being granted an opportunity to transmit. There are 2 exceptions that can be useful on multidrop segments where one or more nodes transmit more often than other nodes. PLCA allows individual nodes to be configured to transmit a burst of frames within a single transmit opportunity. The LAN8670/1/2 can also assign individual nodes multiple transmit opportunities within the bus cycle.
PLCA is enabled by setting the PLCA Enable bit in the PLCA Control 0 (PLCA_CTRL0) register. The node Local ID is configured within the PLCA Local ID (ID) field of the PLCA Control 1 (PLCA_CTRL1) register and must be unique within the PLCA network segment to successfully avoid collisions. Additionally, the Local ID must be less than the number of transmit opportunities in each bus cycle in order to be granted a transmit opportunity (see the Node Count field of the PLCA Control 1 register). When the node is configured as the PLCA coordinator, then the number of transmit opportunities within each PLCA bus cycle (period between successive BEACON transmissions) is configured in the Node Count (NCNT) field of the PLCA Control 1 register.
The time for each transmit opportunity is configured within the PLCA Transmit Opportunity Timer (PLCA_TOTMR) register. The transmit opportunity timer must be set equal among all nodes in the PLCA collision domain to maintain synchronization among the nodes. The default transmit opportunity timer value, 3.2 μs, is appropriate for segments specified in IEEE 802.3 Clause 147 and should only be changed in special circumstances.
When PLCA has been enabled on a node, the PLCA Status (PST) bit in the PLCA Status (PLCA_STS) register will indicate if the node is actively receiving a periodic PLCA BEACON. When the PST bit changes state, the PLCA Status Changed (PSTC) bit in the Status 1 (STS1) register will be set and, optionally, may assert the IRQ_N pin. This may be useful for diagnosing a misbehaving PLCA network segment.