www.ti.com
A.1GeneralRules
GeneralRules
RecallthatrulesmustbefollowedinorderforsoftwaretobeeXpressDSP-compliant.Guidelines,onthe
otherhand,arestronglysuggestedguidelinesthatshouldbeobeyedbutmaybeviolatedby
eXpressDSP-compliantsoftware.
Therulesarepartitionedintothreedistinctsections.Thefirsttwosectionsenumeratealloftherulesand
guidelinesthatmustbeobeyedbythealgorithmsandthethirdsectiongathersallperformance
characterizationrules.
Rule1—Allalgorithmsmustfollowtherun-timeconventionsimposedbyTI'simplementationoftheC
programminglanguage.(SeeSection2.1)
Rule2—Allalgorithmsmustbereentrantwithinapreemptiveenvironment(includingtime-sliced
preemption).(SeeSection2.2.3)
Rule3—Allalgorithmdatareferencesmustbefullyrelocatable(subjecttoalignmentrequirements).That
is,theremustbeno"hardcoded"datamemorylocations.(SeeSection2.3.1)
Rule4—Allalgorithmcodemustbefullyrelocatable.Thatis,therecanbenohardcodedprogram
memorylocations.(SeeSection2.4)
Rule5—AlgorithmsmustcharacterizetheirROM-ability;i.e.,statewhethertheyareROM-ableornot.
(SeeSection2.5)
Rule6—Algorithmsmustneverdirectlyaccessanyperipheraldevice.Thisincludesbutisnotlimitedto
on-chipDMAs,timers,I/Odevices,andcachecontrolregisters.Note,however,algorithmscan
utilizetheDMAresourcebyimplementingtheIDMA2interface.(SeeSection2.6)
Rule7—Allheaderfilesmustsupportmultipleinclusionswithinasinglesourcefile.(SeeSection3.1)
Rule8—AllexternaldefinitionsmustbeeitherAPIidentifiersorAPIandvendorprefixed.(See
Section3.1.1)
Rule9—AllundefinedreferencesmustrefereithertotheoperationsspecifiedinAppendixB(asubsetof
CruntimesupportlibraryfunctionsandasubsetoftheDSP/BIOSHWIAPIfunctions)orTI's
DSPLIBorIMGLIBfunctions,orothereXpressDSP-compliantmodules.(SeeSection3.1.1)
Rule10—AllmodulesmustfollowtheeXpressDSP-compliantnamingconventionsforthoseexternal
declarationsdisclosedtotheclient.(SeeSection3.1.2)
Rule11—Allmodulesmustsupplyaninitializationandfinalizationmethod.(SeeSection3.1.3)
Rule12—AllalgorithmsmustimplementtheIALGinterface.(SeeSection3.2)
Rule13—EachoftheIALGmethodsimplementedbyanalgorithmmustbeindependentlyrelocatable.
(SeeSection3.2)
Rule14—AllabstractalgorithminterfacesmustderivefromtheIALGinterface.(SeeSection3.2)
Rule15—EacheXpressDSP-compliantalgorithmmustbepackagedinanarchivewhichhasaname
thatfollowsauniformnamingconvention.(SeeSection3.3.1)
Rule16—EacheXpressDSP-compliantalgorithmheadermustfollowauniformnamingconvention.(See
Section3.3.2)
Rule17—DifferentversionsofaneXpressDSP-compliantalgorithmfromthesamevendormustfollowa
uniformnamingconvention.(SeeSection3.3.3)
Rule18—Ifamodule'sheaderincludesdefinitionsspecifictoa"debug"variant,itmustusethesymbol
_DEBUGtoselecttheappropriatedefinitions;_DEBUGisdefinedfordebugcompilationsandonly
fordebugcompilations.(SeeSection3.3.3)
76RulesandGuidelinesSPRU352G–June2005–RevisedFebruary2007
SubmitDocumentationFeedback