5 programming interface, 1 packet buffer descriptors – Texas Instruments TMS320TCI6486 User Manual
Page 31

www.ti.com
EMAC Functional Architecture
2.5
Programming Interface
2.5.1
Packet 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
and described in
.
Figure 10. 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 13. 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).
and
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.
31
SPRUEF8F – March 2006 – Revised November 2010
C6472/TCI6486 EMAC/MDIO
Copyright © 2006–2010, Texas Instruments Incorporated