Texas Instruments TMS320 DSP manual XAR0

Page 59

www.ti.com

TMS320C28x Rules and Guidelines

5.7.2 Program Models

Only large memory model is supported for the program memory. So no special program memory requirements are needed for this processor. Just to reemphasize the point, all the program code must be completely relocatable and must not necessarily require placement in on-chip memory.

5.7.3 Register Conventions

This section describes the rules and guidelines that apply to the use of the TMS320C28x on-chip registers. Note that any register that is not described here must not be accessed by an algorithm; e.g., IMR, IFR, and peripheral control and status register. The table below describes all the registers that may be accessed by an algorithm.

Register

Use

Type

AL

Expressions, argument passing, and returns 16-bit results from functions

Scratch (local)

AH

Expressions and argument passing

Scratch (local)

XAR0

Pointers and expressions

Scratch (local)

XAR1

Pointers and expressions

Preserve (local)

XAR2

Pointers, expressions, and frame pointers

Preserve (local)

XAR3

Pointers and expressions

Preserve (local)

XAR4

Pointers, expressions, argument passing, and returns 16- and 22-bit

Scratch (local)

 

pointer values from functions

 

XAR5

Pointers, expressions, and arguments

Scratch (local)

XAR6

Pointers and expressions

Scratch (local)

XAR7

Pointers, expressions, indirect calls, and branches

Scratch (local)

SP

Stack pointer

Preserve (local)

T

Multiply and shift expressions

Scratch (local)

TL

Multiply and shift expressions

Scratch (local)

PL

Multiply expressions and Temp variables

Scratch (local)

PH

Multiply expressions and Temp variables

Scratch (local)

DP

Data page pointer

Scratch (local)

5.7.4 Status Registers

The TMS320C28x device contains two-status registers: ST0 and ST1. Each status register is further divided into several distinct fields that may be accessed separately using special instructions like SETC, CLRC, SPM, etc.

ST0 Field Name

Use

Type

OVC/OVCU

Overflow counter

Scratch (local)

PM

Produce shift mode

Init (local)

V

Overflow flag

Scratch (local)

N

Negative flag

Scratch (local)

Z

Zero flag

Scratch (local)

C

Carry flag

Scratch (local)

TC

Test/Control flag

Scratch (local)

OVM

Overflow mode

Scratch (local)

SXM

Sign extension mode

Scratch (local)

SPRU352G –June 2005 –Revised February 2007

DSP-Specific Guidelines

59

Submit Documentation Feedback

 

 

Image 59
Contents Rules and Guidelines Users GuideSubmit Documentation Feedback Contents Use of the DMA Resource Urls List of Figures Document Overview Read This FirstIntended Audience Guideline n Related DocumentationText Conventions Rule nOverview Rules for TMS320C5x Rules for TMS320C6x Scope of the StandardRequirements of the Standard Rules and GuidelinesIntentional Omissions Goals of the StandardFrameworks System ArchitectureCore Run-Time Support AlgorithmsGeneral Programming Guidelines Rule Use of C LanguageThreads and Reentrancy ThreadsReentrancy Preemptive vs. Non-Preemptive MultitaskingExample Data Memory Data MemoryScratch versus Persistent Memory SpacesScratch vs Persistent Memory Allocation Guideline Algorithm versus ApplicationSection Name Purpose Program MemoryROM-ability Use of Peripherals Use of PeripheralsInterfaces and Modules Algorithms Packaging Algorithm Component ModelImplementation Fir.h Interfaces and ModulesExternal Identifiers Module Instance Objects Naming ConventionsModule Initialization and Finalization Run-Time Object Creation and Deletion Design-Time Object CreationExample Module Module ConfigurationMultiple Interface Support Description Required Interface InheritanceSummary ElementAlgorithms AlgorithmsObject Code PackagingDebug Verses Release Header FilesModuleversvendorvariant.1arch Data Memory Program Memory Interrupt Latency Execution Time Algorithm Performance CharacterizationSize Heap MemoryExternal Static Local and Global Data Memory Stack MemoryData Bss Object files Size Operation Interrupt LatencyExecution Time Mips Is Not EnoughExecution Timeline for Two Periodic Tasks Execution Time Model59000 198000 Process198000 Submit Documentation Feedback DSP-Specific Guidelines Register Types CPU Register TypesData Models Use of Floating PointTMS320C6xxx Rules and Guidelines Endian Byte OrderingCSR Field Use Type Register ConventionsStatus Register Register Use TypeProgram Models Interrupt LatencyTMS320C54xx Rules and Guidelines TMS320C54xx Rules and Guidelines ST1 Field Name Use Type Status RegistersST0 Field Name Use Type Pmst Field Name Use Type TMS320C55x Rules and GuidelinesStack Architecture Example RelocatabilitySSP ST3 Field Name Use Type Status BitsST2 Field Name Use Type Homy General TMS320C24xx GuidelinesTMS320C28x Rules and Guidelines TMS320C28x Rules and GuidelinesXAR0 M0M1MAP Submitting DMA Transfer Requests Use of the DMA ResourceAlgorithm and Framework OverviewLogical Channel Requirements for the Use of the DMA ResourceData Transfer Synchronization Data Transfer PropertiesDMA Rule Abstract InterfaceDMA Guideline Average Maximum Resource CharacterizationData Transfers bytes Frequency Strong Ordering of DMA Transfer Requests Runtime APIsDevice Independent DMA Optimization Guideline Submitting DMA Transfer Requests13 C6xxx Specific DMA Rules and Guidelines Cache Coherency Issues for Algorithm Producers14 C55x Specific DMA Rules and Guidelines Supporting Packed/Burst Mode DMA TransfersNon-Preemptive System Minimizing Logical Channel Reconfiguration OverheadAddressing Automatic Endianism Conversion Issues Inter-Algorithm SynchronizationPreemptive System Algorithm B Algorithm a Inter-Algorithm Synchronization Appendix a General Rules DMA Rules Performance Characterization RulesGeneral Guidelines DMA Guidelines Submit Documentation Feedback Core Run-Time APIs DSP/BIOS Run-time Support LibraryTI C-Language Run-Time Support Library DSP/BIOS Run-time Support LibraryBooks BibliographySubmit Documentation Feedback Glossary of Terms GlossaryGlossary of Terms Glossary of Terms Important Notice