![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/d/b7/db742270-ca8c-4749-a876-e49802fee529/db742270-ca8c-4749-a876-e49802fee529-bg14.png)
2.4.2Ethernet’sMultipleAccessProtocol
2.5ProgrammingInterface
2.5.1PacketBufferDescriptors
Architecture
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
formatisshowninFigure5anddescribedinTable4.
Forexample,considerthreepacketstobetransmitted,PacketAisasinglefragment(60bytes),PacketB
isfragmentedoverthreebuffers(1514bytestotal),andPacketCisasinglefragment(1514bytes).The
linkedlistofdescriptorstodescribethesethreepacketsisshowninFigure6.
Figure5.BasicDescriptorFormat
BitFields
Word
Offset3116150
0NextDescriptorPointer
1BufferPointer
2BufferOffsetBufferLength
3FlagsPacketLength
EthernetMediaAccessController(EMAC)/ManagementDataInput/Output(MDIO) 20SPRUEQ6–December2007
SubmitDocumentationFeedback