
2.10PacketReceiveOperation
2.10.1ReceiveDMAHostConfiguration
2.10.2ReceiveChannelEnabling
Architecture
ToconfigurethereceiveDMAforoperationthehostmust:
•Initializethereceiveaddresses.
•InitializethereceivechannelnDMAheaddescriptorpointerregisters(RXnHDP)to0.
•WritetheMACaddresshashnregisters(MACHASH1andMACHASH2),ifhashmatchingmulticast
addressingisdesired.
•Ifflowcontrolistobeenabled,initialize:
–thereceivechannelnfreebuffercountregisters(RXnFREEBUFFER)
–thereceivechannelnflowcontrolthresholdregister(RXnFLOWTHRESH)
–thereceivefilterlowpriorityframethresholdregister(RXFILTERLOWTHRESH)
•Enablethedesiredreceiveinterruptsusingthereceiveinterruptmasksetregister(RXINTMASKSET)
andthereceiveinterruptmaskclearregister(RXINTMASKCLEAR).
•SettheappropriateconfigurationbitsintheMACcontrolregister(MACCONTROL).
•Writethereceivebufferoffsetregister(RXBUFFEROFFSET)value(typicallyzero).
•Setupthereceivechannel(s)bufferdescriptorsandinitializeRXnHDP.
•EnablethereceiveDMAcontrollerbysettingtheRXENbitinthereceivecontrolregister
(RXCONTROL).
•Configureandenablethereceiveoperation,asdesired,inthereceive
multicast/broadcast/promiscuouschannelenableregister(RXMBPENABLE)andbyusingthereceive
unicastsetregister(RXUNICASTSET)andthereceiveunicastclearregister(RXUNICASTCLEAR).
Eachoftheeightreceivechannelshasanenablebit(RXCHnEN)inthereceiveunicastenableset
register(RXUNICASTSET)thatiscontrolledusingRXUNICASTSETandthereceiveunicastclearregister
(RXUNICASTCLEAR).TheRXCHnENbitsdeterminewhetherthegivenchannelisenabled(setto1)to
receiveframeswithamatchingunicastormulticastdestinationaddress.
TheRXBROADENbitinthereceivemulticast/broadcast/promiscuouschannelenableregister
(RXMBPENABLE)determinesifbroadcastframesareenabledorfiltered.Ifbroadcastframesare
enabled,thentheyarecopiedtoonlyasinglechannelselectedbytheRXBROADCHfieldin
RXMBPENABLE.
TheRXMULTENbitinRXMBPENABLEdeterminesifhashmatchingmulticastframesareenabledor
filtered.Incomingmulticastaddresses(groupaddresses)arehashedintoanindexinthehashtable.Ifthe
indexedbitisset,theframehashwillmatchanditwillbetransferredtothechannelselectedbythe
RXMULTCHfieldinRXMBPENABLEwhenmulticastframesareenabled.Themulticasthashbitsareset
intheMACaddresshashnregisters(MACHASH1andMACHASH2).
TheRXPROMCHbitsinRXMBPENABLEselectthepromiscuouschanneltoreceiveframesselectedby
theRXCMFEN,RXCSFEN,RXCEFEN,andRXCAFENbits.ThesefourbitsallowreceptionofMAC
controlframes,shortframes,errorframes,andallframes(promiscuous),respectively.
TheaddressRAMcanbeconfiguredtosetmultipleunicastand/ormulticastaddressestoagivenchannel
(ifthematchbitissetintheRAM).MulticastaddressesintheRAMareenabledbyRXUNICASTSETand
notbytheRXMULTENbitinRXMBPENABLE,theRXMULTENbitenablesthehashmulticastmatchonly.
TheaddressRAMtakesprecedenceoverthehashmatch.
Ifamulticastpacketisreceivedthathashmatches(multicastpacketsenabled),butisfilteredintheRAM,
thenthepacketisfiltered.Ifamulticastpacketdoesnothashmatch,regardlessofwhetherornothash
matchingisenabled,butmatchesanenabledmulticastaddressintheRAM,thenthepacketwillbe
transferredtotheassociatedchannel.
SPRUEQ6–December2007EthernetMediaAccessController(EMAC)/ManagementDataInput/Output(MDIO)45
SubmitDocumentationFeedback