A SERVICE OF

logo

www.ti.com
2.11PacketTransmitOperation
2.11.1TransmitDMAHostConfiguration
2.11.2TransmitChannelTeardown
2.12ReceiveandTransmitLatency
Architecture
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.
ThetransmitFIFOcontainstwenty-four64-bytecellsandthereceiveFIFOcontainssixty-eight64-byte
cells.TheEMACbeginstransmissionofapacketonthewireafterTXCELLTHRESHcells(configurable
throughtheFIFOcontrolregister,FIFOCONTROL)oracompletepacketareavailableintheFIFO.
TransmitunderruncannotoccurforpacketsizesofTXCELLTHRESH×64bytes(orless).Forlarger
packetsizes,transmitunderruncanoccurifthememorylatencyisgreaterthanthetimerequiredto
transmita64-bytecellonthewire;thisis0.512msin1Gbitmode,5.12msin100Mbpsmode,and
51.2msin10Mbpsmode.Thememorylatencytimeincludesallbufferdescriptorreadsfortheentirecell
data.TheEMACtransmitFIFOuses24cells;thus,underruncannothappenforanormalsizepacket(less
than1536packetbytes).Celltransmissioncanbeconfiguredtostartonlyafteranentirepacketis
containedintheFIFO;foramaximum-sizepacket,settheTXCELLTHRESHfieldtothemaximum
possiblevalueof24.
50EthernetMediaAccessController(EMAC)/ManagementDataInput/Output(MDIO)SPRUEQ6December2007
SubmitDocumentationFeedback