Texas Instruments TMS320 DSP Computer Hardware User Manual


 
www.ti.com
A.1GeneralRules
GeneralRules
RecallthatrulesmustbefollowedinorderforsoftwaretobeeXpressDSP-compliant.Guidelines,onthe
otherhand,arestronglysuggestedguidelinesthatshouldbeobeyedbutmaybeviolatedby
eXpressDSP-compliantsoftware.
Therulesarepartitionedintothreedistinctsections.Thefirsttwosectionsenumeratealloftherulesand
guidelinesthatmustbeobeyedbythealgorithmsandthethirdsectiongathersallperformance
characterizationrules.
Rule1Allalgorithmsmustfollowtherun-timeconventionsimposedbyTI'simplementationoftheC
programminglanguage.(SeeSection2.1)
Rule2Allalgorithmsmustbereentrantwithinapreemptiveenvironment(includingtime-sliced
preemption).(SeeSection2.2.3)
Rule3Allalgorithmdatareferencesmustbefullyrelocatable(subjecttoalignmentrequirements).That
is,theremustbeno"hardcoded"datamemorylocations.(SeeSection2.3.1)
Rule4Allalgorithmcodemustbefullyrelocatable.Thatis,therecanbenohardcodedprogram
memorylocations.(SeeSection2.4)
Rule5AlgorithmsmustcharacterizetheirROM-ability;i.e.,statewhethertheyareROM-ableornot.
(SeeSection2.5)
Rule6Algorithmsmustneverdirectlyaccessanyperipheraldevice.Thisincludesbutisnotlimitedto
on-chipDMAs,timers,I/Odevices,andcachecontrolregisters.Note,however,algorithmscan
utilizetheDMAresourcebyimplementingtheIDMA2interface.(SeeSection2.6)
Rule7Allheaderfilesmustsupportmultipleinclusionswithinasinglesourcefile.(SeeSection3.1)
Rule8AllexternaldefinitionsmustbeeitherAPIidentifiersorAPIandvendorprefixed.(See
Section3.1.1)
Rule9AllundefinedreferencesmustrefereithertotheoperationsspecifiedinAppendixB(asubsetof
CruntimesupportlibraryfunctionsandasubsetoftheDSP/BIOSHWIAPIfunctions)orTI's
DSPLIBorIMGLIBfunctions,orothereXpressDSP-compliantmodules.(SeeSection3.1.1)
Rule10AllmodulesmustfollowtheeXpressDSP-compliantnamingconventionsforthoseexternal
declarationsdisclosedtotheclient.(SeeSection3.1.2)
Rule11Allmodulesmustsupplyaninitializationandfinalizationmethod.(SeeSection3.1.3)
Rule12AllalgorithmsmustimplementtheIALGinterface.(SeeSection3.2)
Rule13EachoftheIALGmethodsimplementedbyanalgorithmmustbeindependentlyrelocatable.
(SeeSection3.2)
Rule14AllabstractalgorithminterfacesmustderivefromtheIALGinterface.(SeeSection3.2)
Rule15EacheXpressDSP-compliantalgorithmmustbepackagedinanarchivewhichhasaname
thatfollowsauniformnamingconvention.(SeeSection3.3.1)
Rule16EacheXpressDSP-compliantalgorithmheadermustfollowauniformnamingconvention.(See
Section3.3.2)
Rule17DifferentversionsofaneXpressDSP-compliantalgorithmfromthesamevendormustfollowa
uniformnamingconvention.(SeeSection3.3.3)
Rule18Ifamodule'sheaderincludesdefinitionsspecifictoa"debug"variant,itmustusethesymbol
_DEBUGtoselecttheappropriatedefinitions;_DEBUGisdefinedfordebugcompilationsandonly
fordebugcompilations.(SeeSection3.3.3)
76RulesandGuidelinesSPRU352GJune2005RevisedFebruary2007
SubmitDocumentationFeedback