www.ti.com
2.11PacketTransmitOperation
2.11.1TransmitDMAHostConfiguration
2.11.2TransmitChannelTeardown
2.12ReceiveandTransmitLatency
PeripheralArchitecture
ThetransmitDMAisaneightchannelinterface.Prioritybetweentheeightqueuesmaybeeitherfixedor
round-robinasselectedbytheTXPTYPEbitintheMACcontrolregister(MACCONTROL).Ifthepriority
typeisfixed,thenchannel7hasthehighestpriorityandchannel0hasthelowestpriority.Round-robin
priorityproceedsfromchannel0tochannel7.
ToconfigurethetransmitDMAforoperationthehostmustperform:
•WritetheMACsourceaddresslowbytesregister(MACSRCADDRLO)andtheMACsourceaddress
highbytesregister(MACSRCADDRHI)(usedforpauseframesontransmit).
•InitializethetransmitchannelnDMAheaddescriptorpointerregisters(TXnHDP)to0.
•Enablethedesiredtransmitinterruptsusingthetransmitinterruptmasksetregister(TXINTMASKSET)
andthetransmitinterruptmaskclearregister(TXINTMASKCLEAR).
•SettheappropriateconfigurationbitsintheMACcontrolregister(MACCONTROL).
•Setupthetransmitchannel(s)bufferdescriptorsinhostmemory.
•EnablethetransmitDMAcontrollerbysettingtheTXENbitinthetransmitcontrolregister
(TXCONTROL).
•WritetheappropriateTXnHDPwiththepointertothefirstdescriptortostarttransmitoperations.
Thehostcommandsatransmitchannelteardownbywritingthechannelnumbertothetransmitteardown
register(TXTEARDOWN).Whenateardowncommandisissuedtoanenabledtransmitchannel,the
followingoccurs:
•Anyframecurrentlyintransmissioncompletesnormally.
•TheTDOWNCMPLTflagissetinthenextSOPbufferdescriptorinthechain,ifthereisone.
•Thechannelheaddescriptorpointerisclearedto0.
•Atransmitinterruptisissuedtoinformthehostofthechannelteardown.
•Thecorrespondingtransmitchannelncompletionpointerregister(TXnCP)containsthevalue
FFFFFFFCh.
•ThehostshouldacknowledgeateardowninterruptwithanFFFFFFFChacknowledgevalue.
Channelteardownmaybecommandedonanychannelatanytime.Thehostisinformedoftheteardown
completionbythesetteardowncomplete(TDOWNCMPLT)bufferdescriptorbit.TheEMACdoesnot
clearanychannelenablesduetoateardowncommand.Ateardowncommandtoaninactivechannel
issuesaninterruptthatsoftwareshouldacknowledgewithanFFFFFFFChacknowledgevaluetoTXnCP
(notethatthereisnobufferdescriptorinthiscase).Softwaremayreadtheinterruptacknowledgelocation
(TXnCP)todetermineiftheinterruptwasduetoacommandedteardown.ThereadvalueisFFFFFFFCh,
iftheinterruptwasduetoateardowncommand.
ThetransmitandreceiveFIFOseachcontainthree64-bytecells.TheEMACbeginstransmissionofa
packetonthewireafterTXCELLTHRESH(configurablethroughtheFIFOcontrolregister)cells,ora
completepacket,areavailableintheFIFO.
TransmitunderruncannotoccurforpacketsizesofTXCELLTHRESHtimes64bytes(orless).Forlarger
packetsizes,transmitunderrunoccursifthememorylatencyisgreaterthanthetimerequiredtotransmit
a64-bytecellonthewire;thisis5.12µsin100Mbpsmodeand51.2µsin10Mbpsmode.Thememory
latencytimeincludesallbufferdescriptorreadsfortheentirecelldata.
Receiveoverrunispreventedifthereceivememorycelllatencyislessthanthetimerequiredtotransmita
64-bytecellonthewire:5.12µsin100Mbpsmode,or51.2µsin10Mbpsmode.Thelatencytime
includesanyrequiredbufferdescriptorreadsforthecelldata.
44EthernetMediaAccessController(EMAC)/SPRU941A–April2007
ManagementDataInput/Output(MDIO)
SubmitDocumentationFeedback