www.ti.com
2.3.2DisplayEDMAEventGeneration
2.3.3EDMASizeandThresholdRestrictions
EDMAOperation
DisplayEDMAeventsaregeneratedbasedontheamountofroomavailableintheFIFO.TheVDTHRLDn
valueindicatesthelevelatwhichtheFIFOhasroomtoreceiveanotherEDMA.IftheFIFOhasatleast
VDTHRLDnlocationsavailable,aEDMAeventisgenerated.OnceanEEDMAeventhasbeen
requested,anotherEDMAeventmaynotbegenerateduntiltheservicingofthefirstEDMAeventhas
begun(asindicatedbythefirstwritetotheFIFObytheEDMAeventservice).Ifthereisatleast2xthe
thresholdspacestillavailableintheFIFOafterthefirstEDMAserviceisbegun(andthedisplayevent
counterhasnotexpired)thenanotherEDMAeventmaybegenerated.Thus,uptooneEDMArequest
maybeoutstanding.
AnincomingdatacounterisloadedwiththeVDTHRLDn(orVDTHRLDn/2forCbandCrFIFOs)valueat
thebeginningofeachEDMAeventserviceandcountsdowntheincomingEDMAdoublewordsWhenthe
counterreaches0,theEDMAeventiscomplete.
AnEDMAeventcounterisusedtotrackthenumberofEDMAeventsgeneratedineachfieldas
programmedintheVDDISPEVTregister.TheDISPEVT1orDISPEVT2value(dependingonthecurrent
displayfield)isloadedatthestartofeachfield.TheeventcounterthendecrementswitheachEDMA
eventgenerationuntilitreaches0,atwhichpointnomoreEDMAeventsaregenerateduntilthenextfield
begins.Oncethelastlineofdataforafieldhasbeenrequested,theEDMAlogicstopsgeneratingevents
untilthefieldiscompleteincasetheCPUneedstomodifytheEDMAaddresspointers.
ForBT.656andY/Cmodes,therearethreeFIFOs,oneforeachoftheY,Cb,andCrcolorcomponents.
EachFIFOgeneratesitsownEDMAevent;therefore,theEDMAeventstateandFIFOthresholdsforeach
FIFOaretrackedindependently.(TheCbandCrFIFOsuseathresholdvalueof1/2VDTHRLD).
ThevideoportFIFOsare64-bitswideandalwaysreadorwrite64bitsatatime.Forthisreason,EDMA
accessesmustalwaysbeanevennumberofwordsinlength.Itisexpectedthatinmostcasesthe
thresholdsizeissettothelinelength(roundeduptothenextdoubleword).Thisalwaysworksbecause
differentlinesarenotpackedtogetherwithinadoublewordandtheCbandCrthresholds
(1/2VCTHRLDx/VDTHRLD)arealwaysroundeduptothedoubleword.
Forexample,in8-bitBT.656capturemodewithalinelengthof712(Y),settingthethresholdtotheline
lengthresultsinaVCTHRLDof712pixelsx1bytes/pixelxdoubleword/8bytes=89doublewords.The
CbandCrFIFOscontainhalfthedata(44.5doublewords)sotheirthresholdsaresetto45doublewords.
Therefore,theCbandCrEDMAseachtransmitanextra4bytesattheendofeachline.
Ifamulti-horizontallinelengththresholdisdesired(2lines,forexample)thenthechosenlinelengthmust
rounduptoanevennumberofdoublewordssothatitisevenlydivisibleby2.Ifthisisnotthecase,then
theCbandCrFIFOtransfersarecorrupted.Forthemultilinecase,considerthesame8-bitBT.656
capturemodewithalinelengthof712(Y).Ifthethresholdissetfor2lines,thisresultsinaVCTHRLD
valueof2x89=178doublewords.TheactualCb/Crlinelengthis44.5doublewordsthatrequiresa
lengthof45.Totransfer2linesrequires2x45=90doublewords.However,forthisVCTHRLD,the
EDMAlogicwouldcalculatetheCb/Crthresholdsizeas178/2=89doublewords,whichis1doubleword
off.Thiscanbecorrectedbyincreasingthelinelengthto720pixels(andignoringtheextracaptured
pixels)ordecreasingitto704pixels.
Similarlyifasub-horizontallinelengthisdesired(1/2line,forexample),thenthelinelengthandthreshold
mustbechosensuchthatthethresholdisdivisibleby2.(Thiscanalsobestatedasthelinelengthmust
beanevenmultipleof#EDMAs/linex8).Forthesublinecase,considerthe8-bitBT.656capturemode
withalinelengthof624(Y).Ifthethresholdissetfor1/2thelinelength,thisresultsinVCTHRLD=
(624/2)/8=39doublewords.TheEDMAlogicwouldcalculatetheCb/Crthresholdas39/2=20double
words.However,twosuchCb/CrEDMAeventswouldresultinatransferof40doublewords,whichis
largerthantheactualCb/Crlinelengthof(624/2)/8=39doublewords.Thiscanbecorrectedbychanging
thelinesizeto640pixelsor608pixels,orbychangingthethresholdtobe1/3thelinelength(VCTHRLD
=(624/3)/8=26doublewordsandtheCb/Crthresholdis26/2=13doublewords.3x13=39double
words,whichisexactlytheCb/Crlinelength.)
SPRUEM1–May2007VideoPort33
SubmitDocumentationFeedback