May 2005
19
KS8993
Micrel
Back off Algorithm
The KS8993 implements the IEEE Std 802.3 binary exponential back-off algorithm, and optional “aggressive mode” back off.
After 16 collisions, the packet will be optionally dropped depending on the chip configuration.
Late Collision
If a transmit packet experiences collisions after 512-bit times of the transmission, the packet will be dropped.
Illegal Frames
The KS8993 will discard illegal size frames defined by the IEEE Std 802.3u, including short frames (less than 64 bytes), long
frames (greater than 1522 bytes), and FCS error frames. The KS8993 treats VLAN tagged frames as regular frames and does
not perform any VLAN related functions. Switches built with the KS8993’s should be treated as a single VLAN domain. KS8993
will drop VLAN frames if the size is larger than 1522 bytes and drop non-VLAN frames if the size is larger than 1518 bytes.
Note that in a special mode, frame lengths of up to 1536 bytes are accepted. This is controlled by MODESEL[3:0]. See
“I/O
Descriptions” section for more details.
Flow Control
KS8993 supports standard 802.3x flow control frames for full-duplex mode and back-pressure for half-duplex.
Full-Duplex Flow Control (IEEE 802.3x standard)
The flow control capabilities of the KS8993 are enabled based upon the results of the auto-negotiation. During the auto-
negotiation, 10/100BaseTX port of KS8993 will advertise this feature to the Link Partner. KS8993 will only establish flow control
if the Link Partner has the flow control capability. Since 100BaseFX does not support auto-negotiation, 100BaseFX port will
not advertise flow control to the Link Partner.
On the receive side, if the KS8993 receives a pause control frame, the KS8993 will not transmit the next normal frame until
the timer, specified in the pause control frame, expires. If another pause frame is received before the current timer expires,
the timer will be updated with the new value in the second pause frame. During this period (being flow controlled), only flow
control packets from the KS8993 will be transmitted.
On the transmit side, the KS8993 has intelligent and efficient ways to determine when to invoke flow control. The flow control
is based on availability of the system resources, including available buffers, available transmit queues and available receive
queues.
The KS8993 will flow control a port, which just received a packet, if the destination port resource is being used up. The KS8993
will issue a flow control frame (XOFF), containing the maximum pause time defined in IEEE standard 802.3x. Once the
resource is freed up, the KS8993 will send out the other flow control frame (XON) with zero pause time to turn off the flow control
(turn on transmission to the port). A hysterisis feature is provided to prevent flow control mechanism from being activated and
deactivated too many times.
The KS8993 will flow control all ports if the receive queue becomes full.
Take a special note that flow control for 100BaseFX or 10/100BaseTX full-duplex can be forced regardless of auto-negotiation
result. This force flow control feature on port 1, 2 or 3 can be enabled and disabled via external pin FFLOW#1, FFLOW#2
and LED[1][2] respectively.
Half-Duplex Back Pressure
Half-duplex Back Pressure option (Note: not in 802.3 standards) is also provided. The activation and deactivation conditions
are the same as the above in full-duplex mode. If back pressure is required, the KS8993 will send preambles to defer other
stations’ transmission (carrier sense deference). To avoid jabber and excessive deference defined in 802.3 standard, after a
certain time it will discontinue the carrier sense but it will raise the carrier sense quickly. This short silent time (no carrier sense)
is to prevent other stations from sending out packets and keeps other stations in carrier sense deferred state. If the port has
packets to send during a back pressure situation, the carrier sense type back pressure will be interrupted and those packets
will be transmitted instead. If there are no more packets to send, carrier sense type back pressure will be active again until
switch resources free up. If a collision occurs, the binary exponential back-off algorithm is skipped and carrier sense is
generated immediately, reducing the chance of further colliding and maintaining carrier sense to prevent reception of packets.
This scheme is better than collision based back pressure.
VLAN Support
Each port is associated with a 3-bit Port VLAN mask register (PV) (P1_V: (PV13, PV12, 1), P2_V: (PV23, 1, PV21), P3_V: (1,
PV32, PV31)). Based on the receiving port’s PV, a broadcast packet will be sent to all the ports that have their mask bit set
to one, excluding the source port. In other words, broadcast packets will be confined in the VLAN specified in the PV. A unicast
packet, which is destined to a port not specified in the PV, could be optionally filtered (depends on the strapped in value during
power up, VLAN Mismatch DIScard). The following is a typical set up for a router/switch combo application, in which port 3
is a router port: