www.ti.com
2.5.4.1NextDescriptorPointer
2.5.4.2BufferPointer
2.5.4.3BufferOffset
2.5.4.4BufferLength
2.5.4.5PacketLength
2.5.4.6StartofPacket(SOP)Flag
PeripheralArchitecture
Thenextdescriptorpointerpointstothe32-bitwordalignedmemoryaddressofthenextbufferdescriptor
inthetransmitqueue.Thispointerisusedtocreatealinkedlistofbufferdescriptors.Ifthevalueofthis
pointeriszero,thenthecurrentbufferisthelastbufferinthequeue.Thesoftwareapplicationmustset
thisvaluepriortoaddingthedescriptortotheactivetransmitlist.ThispointerisnotalteredbytheEMAC.
ThevalueofpNextshouldneverbealteredoncethedescriptorisinanactivetransmitqueue,unlessits
currentvalueisNULL.IfthepNextpointerisinitiallyNULL,andmorepacketsneedtobequeuedfor
transmit,thesoftwareapplicationmayalterthispointertopointtoanewlyappendeddescriptor.The
EMACwillusethenewpointervalueandproceedtothenextdescriptorunlessthepNextvaluehas
alreadybeenread.Inthislattercase,thetransmitterwillhaltonthetransmitchannelinquestion,andthe
softwareapplicationmayrestartitatthattime.Thesoftwarecandetectthiscasebycheckingforanend
ofqueue(EOQ)conditionflagontheupdatedpacketdescriptorwhenitisreturnedbytheEMAC.
Thebufferpointeristhebyte-alignedmemoryaddressofthememorybufferassociatedwiththebuffer
descriptor.Thesoftwareapplicationmustsetthisvaluepriortoaddingthedescriptortotheactivetransmit
list.ThispointerisnotalteredbytheEMAC.
This16-bitfieldindicateshowmanyunusedbytesareatthestartofthebuffer.Forexample,avalueof
0000hindicatesthatnounusedbytesareatthestartofthebufferandthatvaliddatabeginsonthefirst
byteofthebuffer,whileavalueof000Fhindicatesthatthefirst15bytesofthebufferaretobeignoredby
theEMACandthatvalidbufferdatastartsonbyte16ofthebuffer.Thesoftwareapplicationmustsetthis
valuepriortoaddingthedescriptortotheactivetransmitlist.ThisfieldisnotalteredbytheEMAC.
Notethatthisvalueisonlycheckedonthefirstdescriptorofagivenpacket(wherethestartofpacket
(SOP)flagisset).Itcannotbeusedtospecifytheoffsetofsubsequentpacketfragments.Also,sincethe
bufferpointermaypointtoanybyte–alignedaddress,thisfieldmaybeentirelysuperfluous,dependingon
thedevicedriverarchitecture.
Therangeoflegalvaluesforthisfieldis0to(BufferLength–1).
This16-bitfieldindicateshowmanyvaliddatabytesareinthebuffer.Onsinglefragmentpackets,this
valueisalsothetotallengthofthepacketdatatobetransmitted.Ifthebufferoffsetfieldisused,theoffset
bytesarenotcountedaspartofthislength.Thislengthcountsonlyvaliddatabytes.Thesoftware
applicationmustsetthisvaluepriortoaddingthedescriptortotheactivetransmitlist.Thisfieldisnot
alteredbytheEMAC.
This16-bitfieldspecifiesthenumberofdatabytesintheentirepacket.Anyleadingbufferoffsetbytesare
notincluded.Thesumofthebufferlengthfieldsofeachofthepacket’sfragments(ifmorethanone)must
beequaltothepacketlength.Thesoftwareapplicationmustsetthisvaluepriortoaddingthedescriptorto
theactivetransmitlist.ThisfieldisnotalteredbytheEMAC.Thisvalueisonlycheckedonthefirst
descriptorofagivenpacket(wherethestartofpacket(SOP)flagisset).
Whenset,thisflagindicatesthatthedescriptorpointstoapacketbufferthatisthestartofanewpacket.
Inthecaseofasinglefragmentpacket,boththeSOPandendofpacket(EOP)flagsareset.Otherwise,
thedescriptorpointingtothelastpacketbufferforthepacketsetstheEOPflag.Thisbitissetbythe
softwareapplicationandisnotalteredbytheEMAC.
SPRU941A–April2007EthernetMediaAccessController(EMAC)/21
ManagementDataInput/Output(MDIO)
SubmitDocumentationFeedback