www.ti.com
2.4.2Ethernet’sMultipleAccessProtocol
2.5ProgrammingInterface
2.5.1PacketBufferDescriptors
PeripheralArchitecture
NodesinanEthernetLocalAreaNetworkareinterconnectedbyabroadcastchannel,asaresult,when
anEMACporttransmitsaframe,alltheadaptersonthelocalnetworkreceivetheframe.CarrierSense
MultipleAccesswithCollisionDetection(CSMA/CD)algorithmsareusedwhentheEMACoperatesin
half-duplexmode.Whenoperatinginfull-duplexmode,thereisnocontentionforuseofasharedmedium,
sincethereareexactlytwoportsonthelocalnetwork.
EachportrunstheCSMA/CDprotocolwithoutexplicitcoordinationwiththeotherportsontheEthernet
network.Withinaspecificport,theCSMA/CDprotocolworksasfollows:
1.Theportobtainsdatafromupperlayersprotocolsatitsnode,preparesanEthernetframe,andputs
theframeinabuffer.
2.Iftheportsensesthatthemediumisidleitstartstotransmittheframe.Iftheportsensesthatthe
transmissionmediumisbusy,itwaitsuntilitsensesnosignalenergy(plusanInter-PacketGaptime)
andthenstartstotransmittheframe.
3.Whiletransmitting,theportmonitorsforthepresenceofsignalenergycomingfromotherports.Ifthe
porttransmitstheentireframewithoutdetectingsignalenergyfromotherEthernetdevices,theportis
donewiththeframe.
4.Iftheportdetectssignalenergyfromotherportswhiletransmitting,itstopstransmittingitsframeand
insteadtransmitsa48-bitjamsignal.
5.Aftertransmittingthejamsignaltheportentersanexponentialbackoffphase.Specifically,when
transmittingagivenframe,afterexperiencinganumberofcollisionsinarowfortheframe,theport
choosesarandomvaluethatisdependentonthenumberofcollisions.Theportthenwaitsanamount
oftimethatismultipleofthisrandomvalue,andreturnstostep2.
ThebufferdescriptorisacentralpartoftheEMACmoduleandishowtheapplicationsoftwaredescribes
Ethernetpacketstobesentandemptybufferstobefilledwithincomingpacketdata.Thebasicdescriptor
formatisshowninFigure4anddescribedinTable3.
Forexample,considerthreepacketstobetransmitted,PacketAisasinglefragment(60bytes),PacketB
isfragmentedoverthreebuffers(1514bytestotal),andPacketCisasinglefragment(1514bytes).The
linkedlistofdescriptorstodescribethesethreepacketsisshowninFigure5.
Figure4.BasicDescriptorFormat
BitFields
Word
Offset3116150
0NextDescriptorPointer
1BufferPointer
2BufferOffsetBufferLength
3FlagsPacketLength
16EthernetMediaAccessController(EMAC)/SPRU941A–April2007
ManagementDataInput/Output(MDIO)
SubmitDocumentationFeedback