Texas Instruments TMS320C645x DSP Benutzerhandbuch

Seite von 148
www.ti.com
2.8.1.12
Clock and Reset Logic
2.8.2
EMAC Module Operational Overview
EMAC Functional Architecture
The clock and reset sub-module generates all the clocks and resets for the EMAC peripheral.
After reset, initialization, and configuration of the EMAC, the application software running on the host may
initiate transmit operations. Transmit operations are initiated by host writes to the appropriate transmit
channel head descriptor pointer contained in the state RAM block. The transmit DMA controller then
fetches the first packet in the packet chain from memory. The DMA controller writes the packet into the
transmit FIFO in bursts of 64-byte cells. The MAC transmitter initiates the packet transmission when either
the threshold number of cells (configurable via TXCELLTHRESH in the FIFOCONTROL register) have
been written to the transmit FIFO, or a complete packet has been written, whichever is smaller. The SYNC
block transmits the packet over one of the MII interfaces in accordance with the 802.3 protocol. The
statistics block counts transmit statistics.
Receive operations are initiated by host writes to the appropriate receive channel head descriptor pointer
after host initialization and configuration. The SYNC sub-module receives packets and strips off the
Ethernet related protocol. The packet data is input to the MAC receiver, which checks for address match
(in conjunction with the receive address block) and processes errors. Accepted packets are written to the
receive FIFO in bursts of 64-byte cells. The receive DMA controller then writes the packet data to memory.
The statistics block counts receive statistics.
The EMAC module operates independently of the CPU. It is configured and controlled by its register set
mapped into device memory. Information about data packets is communicated using 16-byte descriptors
that are placed in an 8K-byte block of RAM in the EMAC control module.
For transmit operations, each 16-byte descriptor describes a packet or packet fragment in the system’s
internal or external memory. For receive operations, each 16-byte descriptor represents a free packet
buffer or buffer fragment. On both transmit and receive, an Ethernet packet is allowed to span one or
more memory fragments, represented by one 16-byte descriptor per fragment. In typical operation, there is
only one descriptor per receive buffer, but transmit packets may be fragmented, depending on the
software architecture.
An interrupt is issued to the CPU whenever a transmit or receive operation has completed. However, it is
not necessary for the CPU to service the interrupt while there are additional resources available. In other
words, the EMAC continues to receive Ethernet packets until its receive descriptor list has been
exhausted. On transmit operations, the transmit descriptors need only be serviced to recover their
associated memory buffer. Thus, it is possible to delay servicing of the EMAC interrupt if there are real
time tasks to perform.
Eight channels are supplied for both transmit and receive operations. On transmit, the eight channels
represent eight independent transmit queues. The EMAC can be configured to treat these channels as an
equal priority round-robin queue, or as a set of eight fixed-priority queues. On receive, the eight channels
represent eight independent receive queues with packet classification. Packets are classified based on the
destination MAC address. Each of the eight channels is assigned its own MAC address, enabling the
EMAC module to act like eight virtual MAC adapters. Also, specific types of frames can be sent to specific
channels. For example, multicast, broadcast, or other (promiscuous, error, etc.) frames can each be
received on a specific receive channel queue.
The EMAC tracks 36 different statistics, as well as recording the status of each individual packet in its
corresponding packet descriptor.
SPRU975B – August 2006
Ethernet Media Access Controller (EMAC)/Management Data Input/Output (MDIO)
45