www.ti.com
2.5.5ReceiveBufferDescriptorFormat
2.5.5.1NextDescriptorPointer
2.5.5.2BufferPointer
PeripheralArchitecture
Areceive(RX)bufferdescriptor(Figure7)isacontiguousblockoffour32-bitdatawordsalignedona
32-bitboundarythatdescribesapacketorapacketfragment.Example2showsthereceivebuffer
descriptordescribedbyaCstructure.
Thispointerpointstothe32–bitwordalignedmemoryaddressofthenextbufferdescriptorinthereceive
queue.Thispointerisusedtocreatealinkedlistofbufferdescriptors.Ifthevalueofthispointeriszero,
thenthecurrentbufferisthelastbufferinthequeue.Thesoftwareapplicationmustsetthisvaluepriorto
addingthedescriptortotheactivereceivelist.ThispointerisnotalteredbytheEMAC.
ThevalueofpNextshouldneverbealteredoncethedescriptorisinanactivereceivequeue,unlessits
currentvalueisNULL.IfthepNextpointerisinitiallyNULL,andmoreemptybufferscanbeaddedtothe
pool,thesoftwareapplicationmayalterthispointertopointtoanewlyappendeddescriptor.TheEMAC
willusethenewpointervalueandproceedtothenextdescriptorunlessthepNextvaluehasalreadybeen
read.Inthislattercase,thereceiverwillhaltthereceivechannelinquestion,andthesoftwareapplication
mayrestartitatthattime.Thesoftwarecandetectthiscasebycheckingforanendofqueue(EOQ)
conditionflagontheupdatedpacketdescriptorwhenitisreturnedbytheEMAC.
Thebufferpointeristhebyte-alignedmemoryaddressofthememorybufferassociatedwiththebuffer
descriptor.Thesoftwareapplicationmustsetthisvaluepriortoaddingthedescriptortotheactivereceive
list.ThispointerisnotalteredbytheEMAC.
Figure7.ReceiveBufferDescriptorFormat
Word0
310
NextDescriptorPointer
Word1
310
BufferPointer
Word2
3116150
BufferOffsetBufferLength
Word3
3130292827262524
SOPEOPOWNEREOQTDOWNCMPLTPASSCRCJABBEROVERSIZE
2322212019181716
FRAGMENTUNDERSIZEDCONTROLOVERRUNCODEERRORALIGNERRORCRCERRORNOMATCH
150
PacketLength
SPRU941A–April2007EthernetMediaAccessController(EMAC)/23
ManagementDataInput/Output(MDIO)
SubmitDocumentationFeedback