Texas Instruments TMS320 DSP Computer Hardware User Manual


 
www.ti.com
5.6.5StatusRegisters
5.6.6InterruptLatency
5.7TMS320C28xRulesandGuidelines
5.7.1DataModels
TMS320C28xRulesandGuidelines
RegisterUseType
AR6-AR7CcompilerRegistervariablesYes
AccumulatorExpressionanalysis/returnvaluesfromaCfunctionPreserve(local)
PResultingProductfromaMultiplyScratch(local)
TMultiplyandshiftoperandScratch(local)
TheC24xxcontainstwostatusregisters:ST0andST1.Eachstatusregisterisfurtherdividedintoseveral
distinctfields.Althougheachfieldisoftenthoughtofasaseparateregister,itisnotpossibletoaccess
thesefieldsindividually.Inordertosetonefielditisnecessarytosetallfieldsinthesamestatusregister.
Therefore,itisnecessarytotreatthestatusregisterswithspecialcare.Forexample,ifanyfieldsofa
statusregisterisoftypePreserve,theentireregistermustbetreatedasaPreserveregister.
ST0FieldNameUseType
ARPAuxiliary-registerpointerInit(local)
OVOverflowflagScratch(local)
OVMOverflowmodeInit(local)
INTMInterruptmodePreserve(global)
DPDatapageScratch(local)
ST1FieldNameUseType
ARBAuxiliary-registerpointerbufferInit(local)
CNFOn-chipDARAMconfigurationRead-only(global)
TCTest/controlflagScratch(local)
SXMSign-extensionmodeScratch(local)
CCarryScratch(local)
XFXFpinstatusRead-only(global)
PMProductshiftmodeInit(local)
TheC24xxCPUhasonlyonenon-interruptibleloopinstruction,namelyRPT.Oncestarted,theRPT
instructionblocksinterruptsuntiltheentirenumberofrepeatsarecompleted.Thus,thelengthofthese
loopscanhaveasignificanteffectontheworstcaseinterruptlatencyofanalgorithm.
ThissectionpresentstherulesandguidelinesthatarespecifictotheTMS320C28xfamilyofDSPs.
TheTMS320C28xcompilersupportsasmallmemorymodelandalargememorymodel.Thesememory
modelsaffecthowdataisplacedinmemoryandaccessed.Theuseofsmallmemorymodelresultsin
codesizethatisslightlysmallerthanwhenusingthelargememorymodel.Howeverthisimposescertain
constraintsonthememoryplacementofdata.Inthesmallmemorymodel,alldatainanapplicationmust
fitwithinthetop64Kwords.Sincethealgorithmsareagnosticofwheretheyaregoingtobeinstantiated,
allglobalandstaticdatareferencesshouldbeimplementedassumingthelargememorymodel.
Rule35
AllTMS320C28xxalgorithmsmustaccessallstaticandglobaldataasfardata;also,thealgorithm
shouldbeinstantiableinalargememorymodel.
DSP-SpecificGuidelines 58SPRU352GJune2005RevisedFebruary2007
SubmitDocumentationFeedback