Texas Instruments TMS320C645x DSP Network Card User Manual


 
www.ti.com
2.16.1.2ReceivePacketCompletionInterrupts
2.16.1.3StatisticsInterrupt
EMACFunctionalArchitecture
ThereceiveDMAenginehaseightchannels,andeachchannelhasacorrespondinginterrupt
(RXPENDn).ThereceiveinterruptsarelevelinterruptsthatremainasserteduntilclearedbytheCPU.
Eachoftheeightreceivechannelinterruptsmaybeindividuallyenabledbysettingtheappropriatebitin
theRXINTMASKSETregister.Eachoftheeightreceivechannelinterruptsmaybeindividuallydisabledby
clearingtheappropriatebitintheRXINTMASKCLEARregister.Therawandmaskedreceiveinterrupt
statusmaybereadbyreadingtheRXINTSTATRAWandRXINTSTATMASKEDregisters,respectively.
WhentheEMACcompletesapacketreception,theEMACissuesaninterrupttotheCPUbywritingthe
packet’slastbufferdescriptoraddresstotheappropriatechannelqueue’sRXcompletionpointerlocated
inthestateRAMblock.Thewritegeneratestheinterruptwhenenabledbytheinterruptmask,regardless
ofthevaluewritten.
Uponinterruptreception,theCPUprocessesoneormorepacketsfromthebufferchainandthen
acknowledgesoneormoreinterrupt(s)bywritingtheaddressofthelastbufferdescriptorprocessedtothe
queue’sassociatedRXcompletionpointerinthereceiveDMAstateRAM.
Thedatawrittenbythehost(bufferdescriptoraddressofthelastprocessedbuffer)iscomparedtothe
dataintheregisterwrittenbytheEMAC(addressoflastbufferdescriptorusedbytheEMAC).Ifthetwo
valuesarenotequal,indicatingthattheEMAChasreceivedmorepacketsthantheCPUhasprocessed
interruptsfor,thereceivepacketcompletioninterruptsignalremainsasserted.Ifthetwovaluesareequal,
indicatingthatthehosthasprocessedallpacketsthattheEMAChasreceived,thependinginterruptis
de-asserted.ReadingtheRXnCPregisterdisplaysthevaluethattheEMACisexpecting.
TheEMACwritetothecompletionpointerstoresthevalueinthestateRAM.TheCPUwrittenvaluedoes
notchangetheregistervalue.Thehost-writtenvalueiscomparedtotheregistercontent,whichwas
writtenbytheEMAC.Ifthetwovaluesareequal,thentheinterruptisremoved;otherwisetheinterrupt
remainsasserted.Thehostmayprocessmultiplepacketspriortoacknowledginganinterrupt,orthehost
mayacknowledgeinterruptsforeverypacket.
Thestatisticslevelinterrupt(STATPEND)isissuedwhenanystatisticsvalueisgreaterthanorequalto
80000000h,ifithasbeenenabledbytheSTATMASKbitintheMACINTMASKSETregister.Thestatistics
interruptisremovedbywritingtodecrementanystatisticsvaluegreaterthan80000000h.Theinterrupt
remainsassertedaslongasthemost-significant-bitofanystatisticsvalueisset.
SPRU975BAugust2006EthernetMediaAccessController(EMAC)/ManagementDataInput/Output(MDIO)61
SubmitDocumentationFeedback