Texas Instruments TMS320 DSP Computer Hardware User Manual


 
www.ti.com
3.2Algorithms
IALG
IALG_Fxns
FIR_Config FIR;
FIR_init();
FIR_exit();
FIR_Fxcs FIR_IALG;
FIR
Implements
Algorithms
ElementDescriptionRequired
Module'sobjectdefinition;normallynot
structXYZ_Objyes
definedinthemodule'sheader.
Handletoaninstanceobject;synonymfor
XYZ_Handleyes
structXYZ_Obj*
Structuretypeofallmoduleobjectcreation
XYZ_Paramsyes
parameters
Constantstructureofalldefaultobject
XYZ_PARAMSyes
creationparameters
Run-timecreationandinitializationofa
XYZ_create()no
module'sobject
XYZ_delete()Run-timedeletionofamodule'sobjectno
eXpressDSP-compliantalgorithmsaremodulesthatimplementtheabstractinterfaceIALG.Bythis,we
meanthatthemodulemustdeclareandinitializeastructureoftypeIALG_Fxns,thestructuremusthave
globalscope,anditsnamemustbeXYZ_IALG,whereXYZistheuniquemodule-vendorprefixdescribed
above.TheIALGinterfaceallowsalgorithmstodefinetheirmemoryresourcerequirementsandthereby
enabletheefficientuseofon-chipdatamemoriesbyclientapplications.TheIALGinterfaceisdescribedin
detailinChapter1oftheTMS320DSPAlgorithmStandardAPIReference(SPRU360).
NoteverymathematicalfunctionshouldbecastasaneXpressDSP-compliantalgorithm.Inparticular,
many"traditional"mathlibraryoperationssuchasFFTordotproduct,whichdonotmaintainstate
betweenconsecutiveoperationsanddonotrequireinternalworkspacestoperformtheircomputation,are
notgoodeXpressDSP-compliantcandidates.Thesealgorithmsencapsulatelargercomputationsthat
requireinternalworkingmemoryandtypicallyoperateon(conceptually)infinitedatastreams.
Figure3-4.ExampleImplementationofIALGInterface
TheIALGinterfacedefinesa"protocol"betweentheclientandthealgorithmusedtocreateanalgorithm
instanceobjectatrun-time.TheIALGinterfaceisdesignedtoenableclientstousethealgorithmin
virtuallyanyexecutionenvironment;i.e.,preemptiveandnon-preemptive,staticanddynamicsystems.
Thus,itisimportantthateXpressDSP-compliantalgorithmsneveruseanymemoryallocationroutines
(includingthoseprovidedinthestandardCrun-timesupportlibraries).Allmemoryallocationmustbe
performedbytheclient.
Rule12
AllalgorithmsmustimplementtheIALGinterface.
SincealleXpressDSP-compliantalgorithmimplementationsaremodulesthatsupportobjectcreationand
allsuchmodulesshouldsupportdesign-timeobjectcreation,alleXpressDSP-compliantalgorithms
supportbothrun-timeanddesign-timecreationofalgorithmobjects.Inordertoensuresupportfor
design-timeobjectcreation,itisimportantthatallmethodsdefinedbytheIALGinterfacebeindependently
relocatable.
SPRU352GJune2005RevisedFebruary2007AlgorithmComponentModel33
SubmitDocumentationFeedback