
2.8.2EMACModuleOperationalOverview
Architecture
Afterreset,initialization,andconfiguration,theapplicationsoftwarerunningonthehostmayinitiate
transmitoperations.Transmitoperationsareinitiatedbyhostwritestotheappropriatetransmitchannel
headdescriptorpointercontainedinthestateRAMblock.ThetransmitDMAcontrollerthenfetchesthe
firstpacketinthepacketchainfrommemory.TheDMAcontrollerwritesthepacketintothetransmitFIFO
inburstsof64-bytecells.Whenthethresholdnumberofcells,configurableusingtheTXCELLTHRESHbit
intheFIFOcontrolregister(FIFOCONTROL),havebeenwrittentothetransmitFIFO,oracomplete
packet,whicheverissmaller,theMACtransmittertheninitiatesthepackettransmission.TheSYNCblock
transmitsthepacketovertheMIIinterfacesinaccordancewiththe802.3protocol.Transmitstatisticsare
countedbythestatisticsblock.
Receiveoperationsareinitiatedbyhostwritestotheappropriatereceivechannelheaddescriptorpointer
afterhostinitializationandconfiguration.TheSYNCsubmodulereceivespacketsandstripsoffthe
Ethernetrelatedprotocol.ThepacketdataisinputtotheMACreceiver,whichchecksforaddressmatch
andprocesseserrors.AcceptedpacketsarethenwrittentothereceiveFIFOinburstsof64-bytecells.
ThereceiveDMAcontrollerthenwritesthepacketdatatomemory.Receivestatisticsarecountedbythe
statisticsblock.
TheEMACmoduleoperatesindependentlyoftheCPU.Itisconfiguredandcontrolledbyitsregisterset
mappedintodevicememory.Informationaboutdatapacketsiscommunicatedbyuseof16-byte
descriptorsthatareplacedinan8K-byteblockofRAMintheEMACcontrolmodule.
Fortransmitoperations,each16-bytedescriptordescribesapacketorpacketfragmentinthesystem's
internalorexternalmemory.Forreceiveoperations,each16-bytedescriptorrepresentsafreepacket
bufferorbufferfragment.Onbothtransmitandreceive,anEthernetpacketisallowedtospanoneor
morememoryfragments,representedbyone16-bytedescriptorperfragment.Intypicaloperation,thereis
onlyonedescriptorperreceivebuffer,buttransmitpacketsmaybefragmented,dependingonthe
softwarearchitecture.
AninterruptisissuedtotheCPUwheneveratransmitorreceiveoperationhascompleted.However,itis
notnecessaryfortheCPUtoservicetheinterruptwhilethereareadditionalresourcesavailable.Inother
words,theEMACcontinuestoreceiveEthernetpacketsuntilitsreceivedescriptorlisthasbeen
exhausted.Ontransmitoperations,thetransmitdescriptorsneedonlybeservicedtorecovertheir
associatedmemorybuffer.Thus,itispossibletodelayservicingoftheEMACinterruptifthereare
real-timetaskstoperform.
Eightchannelsaresuppliedforbothtransmitandreceiveoperations.Ontransmit,theeightchannels
representeightindependenttransmitqueues.TheEMACcanbeconfiguredtotreatthesechannelsasan
equalpriority"round-robin"queueorasasetofeightfixed-priorityqueues.Onreceive,theeightchannels
representeightindependentreceivequeueswithpacketclassification.Packetsareclassifiedbasedonthe
destinationMACaddress.EachoftheeightchannelsisassigneditsownMACaddress,enablingthe
EMACmoduletoactlikeeightvirtualMACadapters.Also,specifictypesofframescanbesenttospecific
channels.Forexample,multicast,broadcast,orother(promiscuous,error,etc.),caneachbereceivedon
aspecificreceivechannelqueue.
TheEMACkeepstrackof36differentstatistics,pluskeepsthestatusofeachindividualpacketinits
correspondingpacketdescriptor.
EthernetMediaAccessController(EMAC)/ManagementDataInput/Output(MDIO) 40SPRUEQ6–December2007
SubmitDocumentationFeedback