Texas Instruments TMS320 DSP Computer Hardware User Manual


 
www.ti.com
5.5.3ProgramModels
5.5.4Relocatability
TMS320C55xRulesandGuidelines
Rule32
AllC55xalgorithmsmustaccessallstaticandglobaldataasfardata;also,thealgorithmsshouldbe
instantiableinalargememorymodel.
Onlythelargememorymodelissupportedfortheprogrammemory.Sotherearenospecialprogram
memoryrequirementsforthisprocessor.Justtoreemphasizethepoint,alltheprogramcodemustbe
completelyrelocatableandmustnotnecessarilyrequireplacementinon-chipmemory.
Rule33
C55xalgorithmsmustneverassumeplacementinon-chipprogrammemory;i.e.,theymustproperly
operatewithprogrammemoryoperatedininstructioncachemode.
Theaboverulecanbeinterpretedastothealgorithmcodemustnothaveanyassumptionsonthetiming
informationtoguaranteethefunctionality.
SomeoftheC55XdeviceshaveaconstraintthatthedataaccessedwiththeB-bus(coefficient
addressing)mustcomefromon-chipmemory.ThedatathatisaccessedbyB-buscanbestatic-dataor
heap-data.AllC55xalgorithmsthataccessdata(staticorheap)withtheB-busmustadheretothe
followingrule.
Rule34
AllC55xalgorithmsthataccessdatabyB-busmustdocument:
theinstancenumberoftheIALG_MemRecstructurethatisaccessedbytheB-bus(heap-data),
and
thedata-sectionnamethatisaccessedbytheB-bus(static-data).
Example1
IntalgAlloc(IALG_Params*algParams,
IALG_Fxns**p,
IALG_MemRecmemTab[])
{
EncoderParams*params=(EncoderParams*)algParams;
If(params==NULL){
params=&ENCODERATTRS;
}
memTab[0].size=sizeof(EncoderObj);
...
memTab[1].size=params->frameDuration*8*sizeof(int);
...
memTab[3].size=params->sizeInBytes;
...
return(2);
}
Suppose,intheaboveexample,thememTab[1]andmemTab[3]areaccessedbytheB-bus.Thenthis
mustbedocumentedaspertheRule34asfollows:
NumberofmemTabblocksthatareaccessedbyB-busBlocknumbers
21,3
SPRU352GJune2005RevisedFebruary2007DSP-SpecificGuidelines53
SubmitDocumentationFeedback