www.ti.com
A.4GeneralGuidelines
GeneralGuidelines
DMARule3—EachoftheIDMA2methodsimplementedbyanalgorithmmustbeindependently
relocateable.(SeeSection6.7)
DMARule4—AllalgorithmsmuststatethemaximumnumberofconcurrentDMAtransfersforeach
logicalchannel.(SeeSection6.8)
DMARule5—Allagorithmsmustcharacterizetheaverageandmaximumsizeofthedatatransfersper
logicalchannelforeachoperation.Also,allalgorithmsmustcharacterizetheaverageand
maximumfrequencyofdatatransfersperlogicalchannelforeachoperation.(SeeSection6.8)
DMARule6—C6000algorithmsmustnotissueanyCPUread/writestobuffersinexternalmemorythat
areinvolvedinDMAtransfers.Thisalsoappliestotheinputbufferspassedtothealgorithmthrough
itsalgorithminterface.(SeeSection6.13.1)
DMARule7—IfaC6000algorithmhasimplementedtheIDMA2interface,allinputandoutputbuffers
residinginexternalmemoryandpassedtothisalgorithmthroughitsfunctioncalls,shouldbe
allocatedonacachelineboundaryandbeamultipleofthecachelinelengthinsize.The
applicationmustalsocleanthecacheentriesforthesebuffersbeforepassingthemtothe
algorithm.(SeeSection6.13.1)
DMARule8—ForC6000algorithms,allbuffersresidinginexternalmemoryinvolvedinaDMAtransfer
shouldbeallocatedonacachelineboundaryandbeamultipleofthecachelinelengthinsize.
(SeeSection6.13.1)
DMARule9—C6000Algorithmsshouldnotusestackallocatedbuffersasthesourceordestinationof
anyDMAtransfer.(SeeSection6.13.1)
DMARule10—C55xalgorithmsmustrequestalldatabuffersinexternalmemorywith32-bitalignment
andsizesinmultiplesof4(bytes).(SeeSection6.14.3)
DMARule11—C55xalgorithmsmustusethesamedatatypes,accessmodesandDMAtransfer
settingswhenreadingfromorwritingtodatastoredinexternalmemory,orinapplication-passed
databuffers.(SeeSection6.14.3)
Guideline1—Algorithmsshouldminimizetheirpersistentdatamemoryrequirementsinfavorofscratch
memory.(SeeSection2.3.2)
Guideline2—Eachinitializationandfinalizationfunctionshouldbedefinedinaseparateobjectmodule;
thesemodulesmustnotcontainanyothercode.(SeeSection2.4)
Guideline3—Allmodulesthatsupportobjectcreationshouldsupportdesign-timeobjectcreation.(See
Section3.1.5)
Guideline4—Allmodulesthatsupportobjectcreationshouldsupportrun-timeobjectcreation.(See
Section3.1.6)
Guideline5—Algorithmsshouldkeepstacksizerequirementstoaminimum.(SeeSection4.1.2)
Guideline6—Algorithmsshouldminimizetheirstaticmemoryrequirements.(SeeSection4.1.3)
Guideline7—Algorithmsshouldneverhaveanyscratchstaticmemory.(SeeSection4.1.3)
Guideline8—Algorithmcodeshouldbepartitionedintodistinctsectionsandeachsectionshouldbe
characterizedbytheaveragenumberofinstructionsexecutedperinputsample.(SeeSection4.2)
Guideline9—Interruptlatencyshouldneverexceed10µs.(SeeSection4.3)
Guideline10—Algorithmsshouldavoidtheuseofglobalregisters.(SeeSection5.1)
Guideline11—Algorithmsshouldavoidtheuseofthefloatdatatype.(SeeSection5.2)
78RulesandGuidelinesSPRU352G–June2005–RevisedFebruary2007
SubmitDocumentationFeedback