Texas Instruments TMS320DM643x DMP Switch User Manual


 
www.ti.com
2.5.5.4BufferLength
2.5.5.5PacketLength
2.5.5.6StartofPacket(SOP)Flag
2.5.5.7EndofPacket(EOP)Flag
2.5.5.8Ownership(OWNER)Flag
2.5.5.9EndofQueue(EOQ)Flag
PeripheralArchitecture
This16-bitfieldisusedfortwopurposes:
Beforethedescriptorisfirstplacedonthereceivequeuebytheapplicationsoftware,thebufferlength
fieldisfirstinitializedbythesoftwaretohavethephysicalsizeoftheemptydatabufferpointedtoby
thebufferpointerfield.
AftertheemptybufferhasbeenprocessedbytheEMACandfilledwithreceiveddatabytes,thebuffer
lengthfieldisupdatedbytheEMACtoreflecttheactualnumberofvaliddatabyteswrittentothe
buffer.
This16-bitfieldspecifiesthenumberofdatabytesintheentirepacket.Thisvalueisinitializedtozeroby
thesoftwareapplicationforemptypacketbuffers.ThevalueisfilledinbytheEMAConthefirstbuffer
usedforagivenpacket.ThisissignifiedbytheEMACsettingastartofpacket(SOP)flag.Thepacket
lengthissetbytheEMAConallSOPbufferdescriptors.
Whenset,thisflagindicatesthatthedescriptorpointstoapacketbufferthatisthestartofanewpacket.
Inthecaseofasinglefragmentpacket,boththeSOPandendofpacket(EOP)flagsareset.Otherwise,
thedescriptorpointingtothelastpacketbufferforthepackethastheEOPflagset.Thisflagisinitially
clearedbythesoftwareapplicationbeforeaddingthedescriptortothereceivequeue.Thisbitissetbythe
EMAConSOPdescriptors.
Whenset,thisflagindicatesthatthedescriptorpointstoapacketbufferthatislastforagivenpacket.In
thecaseofasinglefragmentpacket,boththestartofpacket(SOP)andEOPflagsareset.Otherwise,the
descriptorpointingtothelastpacketbufferforthepackethastheEOPflagset.Thisflagisinitiallycleared
bythesoftwareapplicationbeforeaddingthedescriptortothereceivequeue.ThisbitissetbytheEMAC
onEOPdescriptors.
Whenset,thisflagindicatesthatthedescriptoriscurrentlyownedbytheEMAC.Thisflagissetbythe
softwareapplicationbeforeaddingthedescriptortothereceivedescriptorqueue.Thisflagisclearedby
theEMAConceitisfinishedwithagivensetofdescriptors,associatedwithareceivedpacket.Theflagis
updatedbytheEMAConSOPdescriptoronly.SowhentheapplicationidentifiesthattheOWNERflagis
clearedonanSOPdescriptor,itmayassumethatalldescriptorsuptoandincludingthefirstwiththeEOP
flagsethavebeenreleasedbytheEMAC.(Notethatinthecaseofsinglebufferpackets,thesame
descriptorwillhaveboththeSOPandEOPflagsset.)
Whenset,thisflagindicatesthatthedescriptorinquestionwasthelastdescriptorinthereceivequeuefor
agivenreceivechannel,andthatthecorrespondingreceiverchannelhashalted.Thisflagisinitially
clearedbythesoftwareapplicationpriortoaddingthedescriptortothereceivequeue.Thisbitissetby
theEMACwhentheEMACidentifiesthatadescriptoristhelastforagivenpacketreceived(alsosetsthe
EOPflag),andtherearenomoredescriptorsinthereceivelist(nextdescriptorpointerisNULL).
ThesoftwareapplicationcanusethisbittodetectwhentheEMACreceiverforthecorrespondingchannel
hashalted.Thisisusefulwhentheapplicationappendsadditionalfreebufferdescriptorstoanactive
receivequeue.NotethatthisflagisvalidonEOPdescriptorsonly.
SPRU941AApril2007EthernetMediaAccessController(EMAC)/25
ManagementDataInput/Output(MDIO)
SubmitDocumentationFeedback