Texas Instruments TMS320C645x DSP Network Card User Manual


 
www.ti.com
2.11PacketTransmitOperation
2.11.1TransmitDMAHostConfiguration
2.11.2TransmitChannelTeardown
2.12ReceiveandTransmitLatency
EMACFunctionalArchitecture
ThetransmitDMAisaneightchannelinterface.Prioritybetweentheeightqueuesmaybeeitherfixedor
roundrobinasselectedbytheTXPTYPEbitintheMACCONTROLregister.Iftheprioritytypeisfixed,
thenchannel7hasthehighestpriorityandchannel0hasthelowestpriority.Roundrobinpriority
proceedsfromchannel0tochannel7.
ToconfigurethetransmitDMAforoperation,thehostmustperformthefollowing:
WritetheMACSRCADDRLOandMACSRCADDRHIregisters(usedforpauseframesontransmit).
InitializetheTXnHDPregisterstozero.
EnablethedesiredtransmitinterruptsusingtheTXINTMASKSETandTXINTMASKCLEARregisters.
SettheappropriateconfigurationbitsintheMACCONTROLregister.
Setupthetransmitchannel(s)bufferdescriptorsinhostmemory.
EnablethetransmitDMAcontrollerbysettingtheTXENbitintheTXCONTROLregister.
WritetheappropriateTXnHDPregisterswiththepointertothefirstdescriptortostarttransmit
operations.
ThehostcommandsatransmitchannelteardownbywritingthechannelnumbertotheTXTEARDOWN
register.Whenateardowncommandisissuedtoanenabledtransmitchannel,thefollowingoccurs:
Anyframecurrentlyintransmissioncompletesnormally.
TheTDOWNCMPLTflagissetinthenextSOPbufferdescriptorinthechain,ifthereisone.
Thechannelheaddescriptorpointeriscleared.
Atransmitinterruptisissued,informingthehostofthechannelteardown.
ThecorrespondingTXnCPregistercontainsthevalueFFFFFFFCh.
ThehostshouldacknowledgeateardowninterruptwithanFFFFFFFChacknowledgevalue.
Channelteardownmaybecommandedonanychannelatanytime.Thehostisinformedoftheteardown
completionbythesetteardowncompletebufferdescriptorbit(TDOWNCMPLT).TheEMACdoesnot
clearanychannelenablesduetoateardowncommand.Ateardowncommandtoaninactivechannel
issuesaninterruptthatsoftwareshouldacknowledgewithanFFFFFFFChacknowledgevaluetoTXnCP
(notethatthereisnobufferdescriptor).Softwaremayreadtheinterruptacknowledgelocation(TXnCP)to
determineiftheinterruptwasduetoacommandedteardown.ThereadvalueisFFFFFFFChifthe
interruptwasduetoateardowncommand.
ThetransmitFIFOcontainstwentyfour64-bytecells,andthereceiveFIFOcontainssixtyeight64-byte
cells.TheEMACbeginstransmissionofapacketonthewireafterTXCELLTHRESHcells(configurable
throughtheFIFOCONTROLregister)oracompletepacketareavailableintheFIFO.
Transmitunder-runcannotoccurforpacketsizesofTXCELLTHRESHtimes64bytes(orless).Forlarger
packetsizes,transmitunder-runcanoccurifthememorylatencyisgreaterthanthetimerequiredto
transmita64-bytecellonthewire;thisis0.512µsin1Gbitmode,5.12µsin100Mbpsmode,and51.2
µsin10Mbpsmode.Thememorylatencytimeincludesallbufferdescriptorreadsfortheentirecelldata.
TheEMACtransmitFIFOuses24cells;thus,under-runcannothappenforanormalsizepacket(less
than1536packetbytes).Celltransmissioncanbeconfiguredtostartonlyafteranentirepacketis
containedintheFIFO;foramaximum-sizepacket,settheTXCELLTHRESHfieldtothemaximum
possiblevalueof24.
Receiveoverrunispreventedifthereceivememorycelllatencyislessthanthetimerequiredtotransmita
64-bytecellonthewire(0.512µsin1Gbpsmode,5.12µsin100Mbpsmode,or51.2µsin10Mbps
mode).Thelatencytimeincludesanyrequiredbufferdescriptorreadsforthecelldata.
SPRU975BAugust2006EthernetMediaAccessController(EMAC)/ManagementDataInput/Output(MDIO)55
SubmitDocumentationFeedback