www.ti.com

EMAC Functional Architecture

2.5Programming Interface

2.5.1Packet Buffer Descriptors

The buffer descriptor is a central part of the EMAC module. It determines how the application software describes ethernet packets to be sent and empty buffers to be filled with incoming packet data.

The basic descriptor format is shown in Figure 7 and described in Table 7.

Figure 7. Basic Descriptor Format

Word Offset

 

Bit Fields

 

 

31

16

15

0

0

 

Next Descriptor Pointer

 

1

 

Buffer Pointer

 

2

Buffer Offset

 

 

Buffer Length

3

Flags

 

 

Packet Length

 

 

Table 7. Basic Descriptors

Word

 

Field Description

Offset

Field

 

0

Next Descriptor

The next descriptor pointer creates a single linked list of descriptors. Each descriptor describes a

 

Pointer

packet or a packet fragment. When a descriptor points to a single buffer packet or the first fragment

 

 

of a packet, the start of packet (SOP) flag is set in the flags field. When a descriptor points to a

 

 

single buffer packet or the last fragment of a packet, the end of packet (EOP) flag is set. When a

 

 

packet is fragmented, each fragment must have its own descriptor and appear sequentially in the

 

 

descriptor linked list.

1

Buffer Pointer

The buffer pointer refers to the memory buffer that either contains packet data during transmit

 

 

operations, or is an empty buffer ready to receive packet data during receive operations.

2

Buffer Offset

The buffer offset is the offset from the start of the packet buffer to the first byte of valid data. This

 

 

field only has meaning when the buffer descriptor points to a buffer that contains data.

2

Buffer Length

The buffer length is the number of valid packet data bytes stored in the buffer. If the buffer is empty

 

 

and waiting to receive data, this field represents the size of the empty buffer.

3

Flags

The flags field contains more information about the buffer, such as whether it is the first fragment in

 

 

a packet (SOP), the last fragment in a packet (EOP), or contains an entire contiguous Ethernet

 

 

packet (both SOP and EOP). Section 2.5.4 and Section 2.5.5 describe the flags.

3

Packet Length

The packet length only has meaning for buffers that both contain data and are the start of a new

 

 

packet (SOP). For SOP descriptors, the packet length field contains the length of the entire Ethernet

 

 

packet, even if it is contained in a single buffer or fragmented over several buffers.

26

Ethernet Media Access Controller (EMAC)/Management Data Input/Output (MDIO)

SPRU975B –August 2006

Submit Documentation Feedback

Page 26
Image 26
Texas Instruments TMS320C645x DSP manual Programming Interface, Packet Buffer Descriptors, Basic Descriptors