Texas Instruments TMS320C645x DSP Benutzerhandbuch

Seite von 148
www.ti.com
2.9
Media Independent Interfaces
2.9.1
Data Reception
2.9.1.1
Receive Control
2.9.1.2
Receive Inter-Frame Interval
2.9.1.3
Receive Flow Control
EMAC Functional Architecture
The EMAC supports four physical interfaces to external devices: Media Independent Interface (MII),
Reduced Media Independent Interface (RMII), Gigabit Media Independent Interface (GMII), and Reduced
Gigabit Media Independent Interface (RGMII). The physical interface used depends on the MACSEL pins.
The basic operation of all four interfaces is the same, with some minor differences.
The following sections discuss the operation of these interfaces in 10/100 Mbps mode (MII, RMII, GMII
and RGMII), and 1000 Mbps mode (GMII and RGMII). An IEEE 802.3 compliant Ethernet MAC controls
these interfaces.
Data received from the PHY is interpreted and output to the EMAC receive FIFO. Interpretation involves
detection and removal of the preamble and start of frame delimiter, extraction of the address and frame
length, data handling, error checking and reporting, cyclic redundancy checking (CRC), and statistics
control signal generation. Receive address detection and frame filtering of the frames that do not
address-match is performed outside the Media Independent interface.
The 802.3 required inter-packet gap (IPG) is 24 receive data clocks (96 bit times). However, the EMAC
can tolerate a reduced IPG (2 receive clocks in 10/100 Mbps mode and 5 receive clocks in 1000 Mbps
mode) with a correct preamble and start frame delimiter. This interval between frames must comprise (in
the following order):
1. An Inter-Packet Gap (IPG).
2. A seven bytes preamble (all bytes 55h).
3. A one byte start of frame delimiter (5Dh).
When enabled and triggered, receive flow control is initiated to limit the EMAC from further frame
reception. Two forms of receive flow control are implemented on the C645x device:
Receive buffer flow control
Receive FIFO flow control
When enabled and triggered, receive buffer flow control prevents further frame reception based on the
number of free buffers available. Receive buffer flow control issues flow control collisions in half-duplex
mode and IEEE 802.3X pause frames for full-duplex mode.
Receive buffer flow control is triggered when the number of free buffers in any enabled receive channel
(RXnFREEBUFFER) is less than or equal to the channel flow control threshold register
(RXnFLOWTHRESH) value. Receive flow control is independent of receive QOS, except that both use the
free buffer values.
When enabled and triggered, receive FIFO flow control prevents further frame reception based on the
number of cells currently in the receive FIFO. Receive FIFO flow control may be enabled only in
full-duplex mode (FULLDUPLEX bit is set in the MACCONTROL register). Receive flow control prevents
reception of frames on the port until all of the triggering conditions clear, at which time frames may again
be received by the port.
Receive FIFO flow control is triggered when the occupancy of the FIFO is greater than or equal to the
RXFIFOFLOWTHRESH value in the FIFOCONTROL register. The RXFIFOFLOWTHRESH value must be
greater than or equal to 1h and less than or equal to 42h (decimal 66). The RXFIFOFLOWTHRESH reset
value is 2h.
Receive flow control is enabled by the RXBUFFERFLOWEN bit and the RXFIFOFLOWEN bit in the
MACCONTROL register. The FULLDUPLEX bit in the MACCONTROL register configures the EMAC for
collision or IEEE 802.3X flow control.
Ethernet Media Access Controller (EMAC)/Management Data Input/Output (MDIO)
46
SPRU975B – August 2006