![background image](http://html1.mh-extra.com/html/texas-instruments/tms320c6472/tms320c6472_user-manual_1095288038.webp)
EMAC Functional Architecture
www.ti.com
2.5.5.1
Next Descriptor Pointer
The next descriptor pointer indicates the 32-bit word aligned memory address of the next buffer descriptor
in the receive queue. The pointer creates a linked list of buffer descriptors. If the value of the pointer is
zero, then the current buffer is the last buffer in the queue. The software application must set this value
prior to adding the descriptor to the active receive list. This pointer is not altered by the EMAC.
The value of pNext should never be altered once the descriptor is in an active receive queue, unless its
current value is NULL. If the pNext pointer is initially NULL, and more empty buffers can be added to the
pool, the software application may alter this pointer to indicate a newly appended descriptor. The EMAC
will use the new pointer value and proceed to the next descriptor unless the pNext value has already been
read. If the pNext value has already been read, the receiver will halt the receive channel in question, and
the software application may restart it at that time. The software can detect this case by searching for an
end-of-queue (EOQ) condition flag on the updated packet descriptor when it is returned by the EMAC.
2.5.5.2
Buffer Pointer
The buffer pointer is the byte-aligned memory address of the memory buffer associated with the buffer
descriptor. The software application must set this value prior to adding the descriptor to the active receive
list. This pointer is not altered by the EMAC.
2.5.5.3
Buffer Offset
This 16-bit field must be initialized to zero by the software application before adding the descriptor to a
receive queue.
This field will be updated depending on the RXBUFFEROFFSET register setting. When the offset register
is set to a non-zero value, the received packet is written to the packet buffer at an offset given by the
value of the register, and this value is also written to the buffer offset field of the descriptor.
When a packet is fragmented over multiple buffers because it does not fit in the first buffer supplied, the
buffer offset only applies to the first buffer in the list, which is where the start-of-packet (SOP) flag is set in
the corresponding buffer descriptor. In other words, the buffer offset field is only updated by the EMAC on
SOP descriptors.
The range of legal values for the BUFFEROFFSET register is 0 to (Buffer Length - 1) for the smallest
value of buffer length for all descriptors in the list.
2.5.5.4
Buffer Length
This 16-bit field has two functions:
•
Before the descriptor is first placed on the receive queue by the application software, the software
initializes the buffer length field with the physical size of the empty data buffer specified by the buffer
pointer field.
•
After the empty buffer has been processed by the EMAC and filled with received data bytes, the EMAC
updates the buffer length field to reflect the actual number of valid data bytes written to the buffer.
2.5.5.5
Packet Length
This 16-bit field specifies the number of data bytes in the entire packet. The software application initializes
this value to zero for empty packet buffers. The EMAC fills in the value on the first buffer used for a given
packet, as signified by the EMAC setting a start-of-packet (SOP) flag. The EMAC sets the packet length
on all SOP buffer descriptors.
2.5.5.6
Start-of-Packet (SOP) Flag
When set, this flag indicates that the descriptor points to the starting packet buffer of a new packet. For a
single fragment packet, both the SOP and end-of-packet (EOP) flags are set. Otherwise, the descriptor
pointing to the last packet buffer for the packet has the EOP flag set. The software application initially
clears this flag before adding the descriptor to the receive queue. The EMAC sets this bit on SOP
descriptors.
38
C6472/TCI6486 EMAC/MDIO
SPRUEF8F – March 2006 – Revised November 2010
Submit Documentation Feedback
Copyright © 2006–2010, Texas Instruments Incorporated