09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>RM0090</strong> Ethernet (ETH): media access control (MAC) with DMA controller<br />

Figure 331. Tagged MAC frame format<br />

7 bytes<br />

1 byte<br />

6 bytes<br />

6 bytes<br />

QTag Prefix<br />

4 bytes<br />

2 bytes<br />

42-1500 bytes<br />

4 bytes<br />

Each byte of the MAC frame, except the FCS field, is transmitted low-order bit first.<br />

An invalid MAC frame is defined by one of the following conditions:<br />

● The frame length is inconsistent with the expected value as specified by the length/type<br />

field. If the length/type field contains a type value, then the frame length is assumed to<br />

be consistent with this field (no invalid frame)<br />

● The frame length is not an integer number of bytes (extra bits)<br />

● The CRC value computed on the incoming frame does not match the included FCS<br />

29.5.2 MAC frame transmission<br />

Preamble<br />

SFD<br />

Destination address<br />

Source address<br />

Length/type = 802.1QTagType<br />

Tag control information<br />

MAC client length/type<br />

MAC client data<br />

Pad<br />

Frame check sequence<br />

MSB LSB<br />

Bit transmission order (right to left)<br />

bytes within<br />

frame transmitted<br />

top to bottom<br />

MSB LSB<br />

1 0 0 0 0 0 0 0 1<br />

0 0 0 0 0 0 0 0 0<br />

User priority CFI<br />

VLAN identifier (VID, 12 bits)<br />

ai15630<br />

The DMA controls all transactions for the transmit path. Ethernet frames read from the<br />

system memory are pushed into the FIFO by the DMA. The frames are then popped out and<br />

transferred to the MAC core. When the end-of-frame is transferred, the status of the<br />

transmission is taken from the MAC core and transferred back to the DMA. The Transmit<br />

FIFO has a depth of 2 Kbyte. FIFO-fill level is indicated to the DMA so that it can initiate a<br />

data fetch in required bursts from the system memory, using the AHB interface. The data<br />

from the AHB Master interface is pushed into the FIFO.<br />

When the SOF is detected, the MAC accepts the data and begins transmitting to the MII.<br />

The time required to transmit the frame data to the MII after the application initiates<br />

transmission is variable, depending on delay factors like IFG delay, time to transmit<br />

preamble/SFD, and any back-off delays for Half-duplex mode. After the EOF is transferred to<br />

the MAC core, the core completes normal transmission and then gives the status of<br />

transmission back to the DMA. If a normal collision (in Half-duplex mode) occurs during<br />

transmission, the MAC core makes the transmit status valid, then accepts and drops all<br />

further data until the next SOF is received. The same frame should be retransmitted from<br />

SOF on observing a Retry request (in the Status) from the MAC. The MAC issues an<br />

underflow status if the data are not provided continuously during the transmission. During<br />

the normal transfer of a frame, if the MAC receives an SOF without getting an EOF for the<br />

previous frame, then the SOF is ignored and the new frame is considered as the<br />

continuation of the previous frame.<br />

Doc ID 018909 Rev 3 914/1416

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!