A SERVICE OF

logo

www.ti.com
2.10.6ReceiveChannelTeardown
2.10.7ReceiveFrameClassification
Architecture
totheappropriatereceivechannelnfreebuffercountregisters(RXnFREEBUFFER).TheEMAC
decrementstheappropriatechannel’sfreebuffervalueforeachbufferused.Whenthehostreclaimsthe
framebuffers,thehostshouldwritethechannelfreebufferregisterwiththenumberofreclaimedbuffers
(writetoincrement).Thereareamaximumof65,535freebuffersavailable.RXnFREEBUFFERonly
needstobeupdatedbythehostifreceiveQOSorflowcontrolisused.
Thehostcommandsareceivechannelteardownbywritingthechannelnumbertothereceiveteardown
register(RXTEARDOWN).Whenateardowncommandisissuedtoanenabledreceivechannel,the
followingoccurs:
Anycurrentframeinreceptioncompletesnormally.
TheTDOWNCMPLTflagissetinthenextbufferdescriptorinthechain,ifthereisone.
Thechannelheaddescriptorpointerisclearedto0.
Areceiveinterruptforthechannelisissuedtothehost.
Thecorrespondingreceivechannelncompletionpointerregister(RXnCP)containsthevalue
FFFFFFCh.
Channelteardownmaybecommandedonanychannelatanytime.Thehostisinformedoftheteardown
completionbythesetteardowncomplete(TDOWNCMPLT)bufferdescriptorbit.TheEMACdoesnot
clearanychannelenablesduetoateardowncommand.Ateardowncommandtoaninactivechannel
issuesaninterruptthatsoftwareshouldacknowledgewithanFFFFFFFChacknowledgevaluetoRXnCP
(notethatthereisnobufferdescriptorinthiscase).SoftwaremayreadRXnCPtodetermineifthe
interruptwasduetoacommandedteardown.ThereadvalueisFFFFFFFCh,iftheinterruptwasduetoa
teardowncommand.
Receivedframesareproper(good)frames,iftheyarebetween64bytesandthevalueinthereceive
maximumlengthregister(RXMAXLEN)bytesinlength(inclusive)andcontainnocode,align,orCRC
errors.
Receivedframesarelongframes,iftheirframecountexceedsthevalueinRXMAXLEN.TheRXMAXLEN
reset(default)valueis5EEh(1518indecimal).Longreceivedframesareeitheroversizedorjabber
frames.Longframeswithnoerrorsareoversizedframes;longframeswithCRC,code,oralignment
errorsarejabberframes.
Receivedframesareshortframes,iftheirframecountislessthan64bytes.Shortframesthataddress
matchandcontainnoerrorsareundersizedframes;shortframeswithCRC,code,oralignmenterrorsare
fragmentframes.Iftheframelengthislessthanorequalto20,thentheframeCRCispassed,regardless
ofwhethertheRXPASSCRCbitissetorclearedinthereceivemulticast/broadcast/promiscuouschannel
enableregister(RXMBPENABLE).
AreceivedlongpacketalwayscontainsRXMAXLENnumberofbytestransferredtomemory(ifthe
RXCEFENbitissetinRXMBPENABLE),regardlessofthevalueoftheRXPASSCRCbit.Followingisan
examplewithRXMAXLENsetto1518:
Iftheframelengthis1518,thenthepacketisnotalongpacketandthereare1514or1518bytes
transferredtomemorydependingonthevalueoftheRXPASSCRCbit.
Iftheframelengthis1519,thereare1518bytestransferredtomemoryregardlessofthe
RXPASSCRCbitvalue.ThelastthreebytesarethefirstthreeCRCbytes.
Iftheframelengthis1520,thereare1518bytestransferredtomemoryregardlessofthe
RXPASSCRCbitvalue.ThelasttwobytesarethefirsttwoCRCbytes.
Iftheframelengthis1521,thereare1518bytestransferredtomemoryregardlessofthe
RXPASSCRCbitvalue.ThelastbyteisthefirstCRCbyte.
Iftheframelengthis1522,thereare1518bytestransferredtomemory.Thelastbyteisthelastdata
byte.
SPRUEQ6December2007EthernetMediaAccessController(EMAC)/ManagementDataInput/Output(MDIO)47
SubmitDocumentationFeedback