IDT Ethernet Interfaces
Input and Output FIFOs
79RC32438 User Reference Manual
11 - 2
November 4, 2002
Notes
Since both Ethernet interfaces are nearly identical, the remainder of this chapter describes the function-
ality of a single interface. It should be understood that there are two copies of all Ethernet registers, one for
Ethernet interface zero (denoted by the prefix ETH0 or MII0) and one for interface one (denoted by the
prefix ETH1 or MII1).
As illustrated in Figure 11.1, an Ethernet interface consists of five major blocks:
–
An Ethernet MAC (medium access controller), which includes a CSMA/CD MAC, a management
interface, and a MII pin level interface
A 512 byte input FIFO connected to the MAC
A 512 byte output FIFO connected to the MAC
Address recognition logic, which determines if an Ethernet frame received on the MII should be
passed to the input FIFO
DMA interface, which allows the input and output FIFOs to be read and written by the DMA
Controller.
The Ethernet interface is enabled by setting the EN bit in the Ethernet interface control (ETH[0|1]INTFC)
register.
–
–
–
–
Input and Output FIFOs
The input and output FIFOs are not intended to hold entire packets, but merely to compensate for
latency in accessing data by the DMA Controller. Each 512 byte FIFO is organized as 128 32-bit words.
During boot configuration, the system may be configured to operate in either big endian or little endian
mode. Although Ethernet packet data is packed into words in the FIFOs, packet data is referenced as bytes
(also called octets) by the CPU core and Ethernet MAC. Data is always stored in big endian format within
FIFO data words, with endianness conversion taking place as data is transferred between the IPBus and
the FIFOs. Thus, data stored in the FIFOs always appears to the programmer in the endianness selected
during boot configuration.
Packet data to be transmitted is written by the DMA Controller into the output FIFO. When the amount of
packet data in the output FIFO exceeds the threshold programmed in the transmit threshold (TTH) field of
the Ethernet FIFO transmit threshold register (ETH[0|1]FIFOTT), or when the last byte of a packet is written
to the output FIFO, the MAC will check if the line is busy. If the line is not busy, the MAC will begin transmit-
ting the preamble, start of frame delimiter, and the packet data.
If a collision is detected during the collision window, the MAC will back off and attempt to retransmit the
frame. Attempts are made to retransmit the frame until the collision threshold specified in the maximum
retransmissions (MAXRET) field of the ETH[0|1]CLRT register is reached. When this occurs, the excessive
collisions (EC) bit is set in the DEVCS field of the DMA descriptor.
For correct operation, the transmit threshold (TTH) must be set to a value equal to or greater than the
value selected for the collision window size in the COLWIN field of the Ethernet collision window and retry
(ETH[0|1]CLRT) register minus two words or eight bytes (the collision window size includes the preamble
and SFD which are generated by the MAC and are not part of a packet).
Ethernet Register Description
Register Offset
1
Register Name
Register Function
Size
0x05_8000
ETH0INTFC
Ethernet 0 interface control
32-bit
0x05_8004
ETH0FIFOTT
Ethernet 0 FIFO transmit threshold
32-bit
0x05_8008
ETH0ARC
Ethernet 0 address recognition control
32-bit
0x05_800C
ETH0HASH0
Ethernet 0 hash table 0
32-bit
0x05_8010
ETH0HASH1
Ethernet 0 hash table 1
32-bit
0x05_8014 through 0x05_8020
Reserved
Table 11.1 Ethernet Register Map (Part 1 of 4)