Академический Документы
Профессиональный Документы
Культура Документы
PRELIMINARY VERSION
May 2005
-1
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications,
enhancements, improvements, and other changes to its products and services at any time and to discontinue
any product or service without notice. Customers should obtain the latest relevant information before placing
orders and should verify that such information is current and complete. All products are sold subject to TI’s terms
and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in
accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI
deems necessary to support this warranty. Except where mandated by government requirements, testing of all
parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible for
their products and applications using TI components. To minimize the risks associated with customer products
and applications, customers should provide adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right,
copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process
in which TI products or services are used. Information published by TI regarding third-party products or services
does not constitute a license from TI to use such products or services or a warranty or endorsement thereof.
Use of such information may require a license from a third party under the patents or other intellectual property
of the third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of information in TI data books or data sheets is permissible only if reproduction is without
alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction
of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for
such altered documentation.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that
product or service voids all express and any implied warranties for the associated TI product or service and
is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.
Following are URLs where you can obtain information on other Texas Instruments products and application
solutions:
Products Applications
Amplifiers amplifier.ti.com Audio www.ti.com/audio
Data Converters dataconverter.ti.com Automotive www.ti.com/automotive
DSP dsp.ti.com Broadband www.ti.com/broadband
Interface interface.ti.com Digital Control www.ti.com/digitalcontrol
Logic logic.ti.com Military www.ti.com/military
Power Mgmt power.ti.com Optical Networking www.ti.com/opticalnetwork
Microcontrollers microcontroller.ti.com Security www.ti.com/security
Low Power Wireless www.ti.com/lpw Telephony www.ti.com/telephony
Video & Imaging www.ti.com/video
Wireless www.ti.com/wireless
Preface
Stack modes: the ’Ryujin’ revision introduces the linear−stack mode. All
information on the stack mode is in chapter 4.
This chapter describes the unified data/program space and the I/O space in
the TMS320C55x DSP in word−pointer mode.
Chapter 4 Stack Operation
This chapter describes the modes available for addressing the data space
(including CPU registers) and the I/O space of the TMS320C55x
(C55x) DSP in word−pointer mode.
Chapter 7 Byte−pointer Addressing Mode
Notational Conventions
In most cases, hexadecimal numbers are shown with the suffix h. For
example, the following number is a hexadecimal 40 (decimal 64):
40h
Similarly, binary numbers usually are shown with the suffix b. For example,
the following number is the decimal number 4 shown in binary form:
0100b
iv
TI Internal Data − Signed NDA Required for Distribution
Related Documentation From Texas Instruments
Bits and signals are sometimes referenced with the following notations:
LSByte Least significant byte In AC0(15−0), bits 7−0 are the LSByte.
MSByte Most significant byte In AC0(15−0), bits 15−8 are the MSByte.
LSW Least significant word In AC0(31−0), bits 15−0 are the LSW.
MSW Most significant word In AC0(31−0), bits 31−16 are the MSW.
The following books describe the TMS320C55x devices and related support
tools. To obtain a copy of any of these TI documents, call the Texas
Instruments Literature Response Center at (800) 477-8924. When ordering,
please identify the book by its title and literature number.
Trademarks
Contents
vii
TI Internal Data − Signed NDA Required for Distribution
Contents
viii
TI Internal Data − Signed NDA Required for Distribution
Contents
Contents ix
TI Internal Data − Signed NDA Required for Distribution
Contents
7 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index-1
x
TI Internal Data − Signed NDA Required for Distribution
Figures
Figures
1−1 CPU Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
1−2 Instruction Buffer Unit (I Unit) Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
1−3 Program Flow Unit (P Unit) Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8
1−4 Address-Data Flow Unit (A Unit) Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11
1−5 Data Computation Unit (D Unit) Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
1−6 First Segment of the Pipeline (Fetch Pipeline) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-25
1−7 Second Segment of the Pipeline (Execution Pipeline) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-26
2−1 Accumulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15
2−2 Transition Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
2−3 Temporary Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
2−4 Extended Auxiliary Registers and Their Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19
2−5 Extended Coefficient Data Pointer and Its Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21
2−6 Circular Buffer Start Address Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21
2−7 Circular Buffer Size Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
2−8 Extended Data Page Register and Its Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23
2−9 Peripheral Data Page Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24
2−10 Extended Stack Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-25
2−11 Interrupt Vector Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-29
2−12 Interrupt Flag Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-31
2−13 Interrupt Enable Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-34
2−14 Debug Interrupt Enable Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-37
2−15 Interrupt ID Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-39
2−16 Single-Repeat Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-42
2−17 Status Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-46
3−1 -Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
4−1 Extended Stack Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
4−2 Return Address and Loop Context Passing During Slow-Return Process . . . . . . . . . . . . . 4-8
4−3 Use of RETA and CFCT in Fast-Return Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
5−1 Standard Process Flow for Maskable Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10
5−2 Process Flow for Time-Critical Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12
5−3 Standard Process Flow for Nonmaskable Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15
6−1 k16 Absolute Addressing Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5
6−2 k24 Absolute Addressing Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6
6−3 I/O Absolute Addressing Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6
6−4 DP Direct Addressing Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9
6−5 SP Direct Addressing Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11
Contents xi
TI Internal Data − Signed NDA Required for Distribution
Figures
xii
TI Internal Data − Signed NDA Required for Distribution
Tables
T ables
1−1 Instructions Performed in D-Unit BIT Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17
1−2 Functions of the Address and Data Buses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
1−3 Bus Usage By Access Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21
1−4 Examples to Illustrate Execution Pipeline Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-29
2−1 Alphabetical Summary of Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
2−2 Memory-Mapped Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
2−3 Extended Auxiliary Registers and Their Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19
2−4 Extended Coefficient Data Pointer and Its Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21
2−5 Circular Buffer Start Address Registers and The Associated Pointers . . . . . . . . . . . . . . . 2-22
2−6 Circular Buffer Size Registers and The Associated Pointers . . . . . . . . . . . . . . . . . . . . . . . 2-23
2−7 Extended Data Page Register and Its Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24
2−8 Stack Pointer Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26
2−9 Program Flow Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27
2−10 Vectors and the Formation of Vector Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-30
2−11 Block-Repeat Register Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-44
2−12 Categories of Branch Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-70
2−13 Minimum Number of Instruction Cycles Required Between an MPNMC-Update Instruction
and a Branch Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-70
3−1 Byte Load and Byte Store Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
4−1 Stack Pointer Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
4−2 Stack and Mode Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
5−1 Interrupt Vectors Sorted By ISR Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
5−2 Interrupt Vectors Sorted By Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6
5−3 Steps in the Standard Process Flow for Maskable Interrupts . . . . . . . . . . . . . . . . . . . . . . 5-11
5−4 Steps in the Process Flow for Time-Critical Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13
5−5 Steps in the Standard Process Flow for Nonmaskable Interrupts . . . . . . . . . . . . . . . . . . . 5-16
5−6 Effects of a Reset on CPU Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-17
6−1 Syntax Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
6−2 Absolute Addressing Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
6−3 DSP Mode Operands for the AR Indirect Addressing Mode . . . . . . . . . . . . . . . . . . . . . . . 6-17
6−4 Dual AR Indirect Operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-25
6−5 *abs16(#k16) Used For Data-Memory Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-30
6−6 *abs16(#k16) Used For Memory-Mapped Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-30
6−7 (#k24) Used For Data-Memory Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-30
6−8 (#k24) Used For Memory-Mapped Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-30
6−9 @Daddr Used For Data-Memory Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-31
Contents xiii
TI Internal Data − Signed NDA Required for Distribution
Tables
xiv
Chapter 1
CPU Architecture
Topic Page
1-1
Overview of the CPU Architecture
CPU
External Data
Buses
Program Data
Instruction Address-
Flow Unit Computation
Memory Buffer Unit Data
(P Unit) Unit
Interface Unit (I Unit) Flow Unit
(D Unit)
(A Unit)
External
Program Buses
Data-Write Data Buses (EB, FB). These two buses carry 16-bit data from
functional units of the CPU to data space or I/O space.
The EB and FB buses receive data from the P unit, the A unit, and the D
unit. Instructions that write two 16-bit values to memory at once use both
EB and FB buses. Instructions that perform single 16-bit write operations
use the EB bus.
Data-Write Address Buses (EAB, FAB). These two buses carry 24-bit
addresses to the memory interface unit, which then receives the values
driven on the data-write data buses. All data-space addresses are
generated in the A unit.
The EAB bus carries addresses for data that is carried to memory on only
the EB bus or both EB and FB buses.
The FAB bus carries addresses for data that is carried to memory on the
FB bus.
For example, the IU IBQ content is flushed whenever the CPU branches to a
new location. The IU IBQ is loaded with a maximum of code fetch advance
when executing a single repeat or local repeat structure (but not necessarily
completely full: 256 bytes).
Once an instruction (or two parallel instructions) are decoded, the I unit passes
data to the P unit, the A unit, and the D unit for the execution of instructions.
For example, any constants that were encoded in instructions (for loading
registers, providing shift counts, identifying bit numbers, etc.) are isolated in
the I unit and passed to the appropriate unit.
A bit manipulation unit (DU BIT) that performs specific bit manipulation
operations.
64-Bit
Memory
Interface
Unit
I Unit
128-Bit
Instruction Decoder
Instruction 1 Instruction 2
loop. This fully benefits from C55x+ parallelism: up to 16 bytes per cycle
can be decoded while 8 bytes per cycle are fetched. The size of the local
repeat instruction must not exceed the IU IBQ size; that is, 256 bytes.
Identifies instruction boundaries so that it can decode 8-, 16-, 24-, 32-, 40-,
48-, 56-, 64-, 72-, 80-, 88-, 96-, 104-, 112-, 120-, or 128-bit instructions.
Memory P Unit
Interface
Unit
I Unit Program-Address
Generation and
A Unit Program-Control
Logic
D Unit
P-Unit Registers
The program control logic accepts immediate values from the I unit and test
results from the A unit or the D unit, and performs the following actions:
Access to the program flow registers is limited. You cannot read from or
write to PC. However, you can access the RETA and CFCT registers to
save and restore the return address and the control flow execution context
flags of the calling routine. You can access RETA and CFCT only with the
following instructions:
dbl(Smem) = RETA
RETA = dbl(Smem)
All the other registers can be loaded with immediate values (from the I unit)
and can be saved to (or loaded from) memory, I/O space, or A-unit
registers.
Program Flow Registers
PC Program counter
RETA Return address register
CFCT Control flow context register
Block-Repeat Registers
BRC0, BRC1 Block-repeat counters 0 and 1
BRS1 BRC1 save register
RSA0, RSA1 Block-repeat start address registers 0 and 1
REA0, REA1 Block-repeat end address registers 0 and 1
Single-Repeat Registers
RPTC Single-repeat counter
CSR Computed single-repeat register
Interrupt Registers
IFR0, IFR1 Interrupt flag registers 0 and 1
IER0, IER1 Interrupt enable registers 0 and 1
DBIER0, DBIER1 Debug interrupt enable registers 0 and 1
BER Bus error register
IIR Interrupt ID register
Status Registers
ST0_55–ST3_55 Status registers 0, 1, 2, and 3
Memory
Interface A Unit
Unit
Data-Address Two Constant Buses KA1, KA2
Generation Units I Unit
Two Constant Buses KX1, KX2
(DAGEN X, Y ,C)
P Unit
Within one cycle, two independent 16-bit data memory operands can be
read in parallel with one 32-bit data memory operand. In the example
below, the two Xmem and Ymem 16-bit data memory operands are read
in parallel with a single 32-bit data memory read operand formed by
HI/LO(coef).
ACa = m40(rnd(frct(uns(Xmem)*uns(LO(coef))))),
ACb = m40(rnd(frct(uns(Ymem)*uns(HI(coef)))))
Within one cycle, one 32-bit data memory operand can be read in parallel
with the writing to memory of a 32-bit data memory operand. In the
example below, the first instruction dbl(Smem) 32-bit data memory
operand is read in parallel with the write of the second instruction
dbl(Smem) 32-bit data memory operand.
ALLa = dbl(Smem)
||dbl(Smem) = ALLa
Within one cycle, two independent 32-bit data memory operands can be
read in parallel with the writing to memory of a 32-bit data memory
operand. In the example below, HI/LO(Smem) forms the first 32-bit data
memory read operand and HI/LO(coef) forms the second 32-bit data
memory read operand. These two 32-bit data memory reads occur in
parallel with the write of the second instruction dbl(Smem) 32-bit data
memory operand.
ACa = m40(rnd(frct(uns(LO(Smem))*uns(LO(coef))))),
ACb = m40(rnd(frct(uns(HI(Smem))*uns(HI(coef)))))
|| dbl(Smem) = ALLa
Within one cycle, the DAGEN units can accept two 24-bit immediate
values from the I unit through the two constant buses used in address
phase by instruction slots 1 and 2 (KA1, KA2). In the example below, two
A-unit registers can be initialized when using the following instructions in
parallel:
mar(XDAa = k24)
|| mar(XDAa = k24)
The three DAGEN units (X, Y, and C) can be configured to use linear or
circular addressing modes for an instruction using an indirect addressing
mode.
See Chapter 6 for more details on addressing modes and memory operands.
Pointers
XSP (SPH SP), XSSP(SSPH: SSP) Stack pointer registers
XAR0–XAR15 Auxiliary registers
Previous coefficient data pointer register
(XCDP) has been mapped to the XAR15
register
AR8−AR14 cannot be used as circular
pointers
AR8−AR14 are not mapped in the
memory-mapped register (MMR) space
Data-Read Data Buses BB (32 Bits of Data), CB, DB (16 Bits of Data)
D Unit
P Unit
D Unit
Registers
Memory
Interface
DU SALU2 DU SALU1
Unit
MAC1 MAC2
DU BIT
A Unit
1.5.1 Shifter and D-Unit Arithmetic Logic Units (DU SALU1, DU SALU2)
The C55x+ revision introduces some changes in the D-unit modules. The
previous D-unit arithmetic logic unit (DU ALU) has been merged with the
previous D-unit shifter (DU SFT), and duplicated to form the two identical DU
SALU1 and DU SALU2 units. These two units, when operated in parallel, can
generate up to 12 results per cycle.
For example, in using the following instruction, you can perform four 16-bit
elements (low and high parts of accumulators) maximum search in parallel in
one cycle. When the following two instructions are executed in parallel:
max_diff(AC0, AC1, AC2, AC3, pair(TRN0))
|| max_diff(AC4, AC5, AC6, AC7, pair(TRN2))
AC3.H, AC3.L, AC7.H, and AC7.L contain the result of the following four
differences: AC1.H−AC0.H, AC1.L−AC0.L, AC5.H−AC4.H,
AC5.L−AC4.L, respectively.
AC2.H, AC2.L, AC6.H, and AC6.L contain the maximums of each of the
following four pairs: AC1.H−AC0.H, AC1.L−AC0.L, AC5.H−AC4.H,
AC5.L−AC4.L, respectively.
TRN1, TRN0, TRN2, and TRN3 track which of the AC1.H, AC0.H, AC1.L,
AC0.L, AC5.H, AC4.H, AC5.L, AC4.L source registers, respectively, were
found as the maximum of the above comparisons.
Each DU SALU unit accepts its own immediate values from the I-unit (through
the KX1 and KX2 buses) and the A-unit registers. It also communicates
bidirectionally with memory and I/O space.
For C54x DSP-compatible mode (C54CM = 1), the overflow detection is only
performed for the final operation of a calculation. For C55x-DSP-native mode
(C54CM = 0), the overflow detection is performed on each operation (shifting,
rounding, and addition/subtraction).
For each of the two MACs, the multiplier operand can be:
A 16-bit immediate value from the I unit (through the KX1 or KX2 internal
bus)
A 17-bit value extracted from the D-unit 40-bit accumulators (bits 16 to 32)
For each of the two MACs, the accumulation input operand can be any of the
16 D-unit 40-bit accumulator registers. All MAC results are stored in the D-unit
accumulators. The P-unit status registers bits are affected by the MAC
operations when an overflow is reported during a multiply and accumulate (or
subtract) operation.
Please see the C55x+ instructions set guide (TI Lit SWPU###) for more details
on instructions description.
AC13 = #-1
|| AC7 = #0a8f7h
The number of transition registers has been also increased in the C55x+
revision from two to eight. These registers can be used in compare and select
extremum instructions for hard decision tracking in the Viterbi Algorithm.
In the C55x+ revision, the transition registers are mapped to the low and high
part of four accumulators (see details in the D-unit table) in order to enable their
efficient storage in all standard instructions operating on accumulators. (See
the C55x+ instructions set guide, Lit number ### for more details on compare
and select extremum instruction descriptions.)
During cycle #1 in X2 phase (see Section 1.7 for pipeline phases description),
six ACx accumulators are written: AC10, AC11, AC12, and AC13 as standard
SALUx output; AC14 and AC15 for TRNx registers update.
Also, six ACx accumulators are read: AC0, AC1, AC3, AC4, AC7, and AC9.
max_diff(AC10, AC11, AC10, AC11, pair(TRN0))
|| max_diff(AC12, AC13, AC12, AC13, pair(TRN2)) ;cycle #1
AC0 = AC0 + (AC1 <<AC2.L)
|| AC3 = AC3 + (AC4 << AC5.L) ;cycle #2
AC6 = AC6 + (AC6 << AC7.L)
|| AC8 = AC8 +(AC8 << AC9.L) ;cycle #3
D-unit registers
Accumulators
AC0–AC15 Accumulators 0−15, with high and low part of accumula-
tors accessible independently.
Transition Registers
TRN0−TRN7 Transition registers 0−7 are mapped to the low and high
parts of the following accumulators:
TRN0 mapped to AC15_H
TRN1 mapped to AC15_L
TRN2 mapped to AC14_H
TRN3 mapped to AC14_L
TRN4 mapped to AC13_H
TRN5 mapped to AC13_L
TRN6 mapped to AC12_H
TRN7 mapped to AC12_L
Note:
In the event of a dual data write to the same address, the result is undefined.
PAB 24 bits The program-read address bus (PAB) carries a 24-bit byte address for a read from
program space.
PB 64 bits The program-read data bus (PB) carries 8 bytes (64 bits) of program code from program
memory to the CPU.
CAB, DAB 24 bits Each of these data-read address buses carries a 24-bit byte address. DAB carries an
each address for a read from data space or I/O space. CAB carries a second address during
dual data reads (see Table 1−3).
CB, DB 16 bits The CB data-read bus carries a 16-bit data value and the DB data read bus carries a 16-bit
data value to the CPU. The DB bus carries a value from data space or from I/O-space.
The CB bus carries a second value during long data reads and dual data reads (see
Table 1−3).
BAB 24 bits This data-read address bus carries a 24-bit byte address for a coefficient read. All
instructions that use the coefficient indirect addressing mode Cmem use the BAB bus to
reference coefficient data values and use the BB bus to carry the data values. Only
multiply (and accumulate/subtract) instructions use Cmem addressing modes.
BB 32 bits This data-read data bus carries a 16-bit or 32-bit coefficient data value from internal or
external memory to the DU MAC1 or MAC2. Data carried by the BB bus is addressed
using the BAB bus.
Specific dual MAC instructions use the 3 data-read buses BB, CB, and DB to provide, in
one cycle, three or four 16-bit operands to the DU MAC1 and DU MAC2. In the example
below, AR1 and AR2 registers fetch two 16-bit data values through the CB and DB buses,
and AR10 register fetches one 32-bit value through the BB bus:
AC0 = *AR1 * LO(*AR10), AC3 = *AR2 * HI(*AR10)
More flexible parallelism combines specific dual MAC instructions with other standard
instructions to distribute the four 16-bit operands across various CPU units. In the
example below, AR1 register fetches one 32-bit data value through the CB and DB buses,
and AR10 fetches a second 32-bit data value through the BB bus:
AC0 = AC1.L * LO(AR10), AC3 = AC1.H * HI(*AR10)
||AC4 = AC4 + dbl(*AR1)
EAB, FAB 24 bits Each of these data-write address buses carries a 24-bit byte address. The EAB bus
each carries an address for a write to data space or I/O space. The FAB bus carries a second
address during dual data writes (see Table 1−3).
EB, FB 16 bits Each of these data-write data buses carries a 16-bit data value from the CPU. The EB bus
each carries a value to data space or to I/O-space. The FB bus carries a second value during
long data writes and dual data writes (see Table 1−3).
Single byte data read DAB DB 8-bit read from data memory in byte-pointer mode
Single MMR read DAB DB 16-bit read from a memory-mapped register (MMR) in
word-pointer mode. (If there is no MMR read in byte-
pointer mode, then see Chapter 7 for byte-pointer
mode details.)
Single byte I/O read DAB DB 8-bit read from I/O space in byte-pointer mode
Single (or long) coefficient BAB BB 16-bit (or 32-bit) read from internal memory with the
read coefficient (or double coefficient) indirect addressing
mode using the BAB and BB buses.
Single (or long) data read DAB CB, DB 32-bit read from data memory
Single (or long) MMR read DAB CB, DB 32-bit read from one 32-bit MMR or two adjacent 16-bit
MMRs in word-pointer mode. (If there is no MMR read
in byte-pointer mode, then see Chapter 7 for byte-
pointer mode details.)
Single byte data write EAB EB 8-bit write to data memory in byte-pointer mode
Single byte I/O write EAB EB 8-bit write to I/O space in byte-pointer mode
Single (or long) data write EAB EB, FB 32-bit write to data memory
Single (or long) MMR write EAB EB, FB 32-bit write to one 32-bit MMR or two adjacent 16-bit
MMRs in word-pointer mode. (If there is no MMR read
in byte-pointer mode, then see Chapter 7 for byte-
pointer mode details.)
Single byte data read CAB, DAB CB, DB Two simultaneous 8-bit reads from data space in byte-
|| Single byte data read pointer mode:
The first operand read uses the DAB and DB buses.
This read can be from data memory or from I/O
space.
The second operand read uses the CAB and CB
buses. This read must be from data memory.
Single byte data read CAB, DAB CB, DB The following two operations happen in parallel in byte-
|| Single data read pointer mode:
Single byte data read: 8-bit read from data memory
using the DAB and DB buses.
Single data read: 16-bit read from data memory us-
ing the CAB and CB buses.
Single byte data read DAB, BAB DB, BB The following two operations happen in parallel in byte-
|| Long coefficient read pointer mode:
Single byte data read: 8-bit read from data memory
using the DAB and DB buses.
Long coefficient read: 32-bit read from internal
memory with the double coefficient indirect address-
ing mode using the BAB and BB buses.
Single byte data read DAB, EAB DB, EB The following two operations happen in parallel in byte-
|| Single byte data write pointer mode:
Single byte data read: 8-bit read from data memory
using the DAB and DB buses.
Single byte data write: 8-bit write to data memory us-
ing the EAB and EB buses.
Single byte data read DAB, EAB DB, EB, The following two operations happen in parallel in byte-
|| Single (long) data write (FB) pointer mode:
Single byte data read: 8-bit read from data memory
using the DAB and DB buses.
Single data write: 16-bit (or 32-bit) write to data
memory using the EAB and EB (and FB) buses.
Single byte data write EAB, FAB EB, FB Two simultaneous 8-bit writes to data space in byte-
|| Single byte data write pointer mode:
The first operand write uses the FAB and FB buses.
This write must be to data memory.
The second operand write uses the EAB and EB
buses. This write must be to data memory or I/O
space.
Single byte data write EAB, FAB EB, FB The following two operations happen in parallel in byte-
|| Single data write pointer mode:
Single byte data write: 8-bit write to data memory us-
ing the FAB and FB buses.
Single data write: 16-bit write to data memory using
the EAB and EB buses.
Single data write EAB, FAB EB, FB Two simultaneous 16-bit writes to data space.
|| Single data write
The first operand write uses the FAB and FB buses.
This write must be to data memory.
The second operand read uses the EAB and EB
buses. This write can be to data memory, an MMR,
or I/O space.
Single data read CAB, DAB CB, DB Two simultaneous 16-bit reads from data space.
|| Single data read
The first operand read uses the DAB and DB buses.
This read can be from data memory, an MMR, or I/O
space.
The second operand read uses the CAB and CB
buses. This read must be from data memory.
Single (or long) data read DAB, BAB (CB), The following two operations happen in parallel:
|| Long coefficient read DB, BB
Single (or long) data read: 16-bit (or 32-bit) read from
data memory using the DAB and DB (and CB) buses.
Long coefficient read: 32-bit read from internal
memory with the double coefficient indirect address-
ing mode using the BAB and BB buses.
Single (or long) data read DAB, EAB (CB), The following two operations happen in parallel in byte-
|| Single byte data write DB, EB pointer mode:
Single (or long) data read: 16-bit (or 32-bit) read from
data memory using the DAB and DB (and CB) buses.
Single byte data write: 8-bit write to data memory us-
ing the EAB and EB buses.
Single (or long) data read DAB, (CB), The following two operations happen in parallel:
|| Single (or long) data write EAB, DB, EB,
Single (or long) data read: 16-bit (or 32-bit) read from
(FB)
data memory using the DAB and DB (and CB) buses.
Single (or long) data write: 16-bit (or 32-bit) write to
data memory using the EAB and EB (and FB) buses.
Long coefficient read BAB, EAB BB, EB The following two operations happen in parallel in byte-
|| Single byte data write pointer mode:
Long coefficient read: 32-bit read from internal
memory with the double coefficient indirect address-
ing mode using the BAB and BB buses.
Single byte data write: 8-bit write to data memory us-
ing the EAB and EB buses.
Long coefficient read BAB, EAB BB, EB The following two operations happen in parallel in:
|| Single (or long) data write
Long coefficient read: 32-bit read from internal
memory with the double coefficient indirect address-
ing mode using the BAB and BB buses.
Single (or long) data write: 16-bit (or 32-bit) write to
data memory using the EAB and EB (and FB) buses.
Single data read CAB, DAB, CB, DB, The following operations happen in parallel:
|| Single data read BAB BB
Dual data read: Two simultaneous 16-bit reads
|| Single (or long) coefficient
from data space. The first operand read uses the
data read
DAB and DB buses. The second operand read
uses the CAB and CB buses.
Single (or long) coefficient data read: 16-bit (or
32-bit) read from internal memory with the coeffi-
cient (or double coefficient) indirect addressing
mode using the BAB and BB buses.
Single data read CAB, DAB, CB, DB, The following operations happen in parallel in byte-
|| Long coefficient read BAB BB pointer mode:
|| Single byte data read
Dual data read: Simultaneous single data read
(16-bit read from data memory using the DAB and
DB buses) and long coefficient data read (32-bit
read from internal memory with the double coeffi-
cient indirect addressing mode using the BAB and
BB buses).
Single byte data read: 8-bit read from data memory
using the CAB and CB buses.
Single (or long) data read || DAB, BAB, (CB), DB, The following operations happen in parallel in byte
Long coefficient read EAB BB, EB pointer mode:
|| Single byte data write
Dual data read: Simultaneous single (or double)
data read (16-bit (or 32-bit) read from data memory
using the DAB and DB (and CB) buses) and long
coefficient data read (32-bit read from internal
memory with the double coefficient indirect ad-
dressing mode using the BAB and BB buses).
Single byte data write: 8-bit write to data memory
using the EAB and EB buses.
Single (or long) data read DAB, BAB, (CB), DB, The following operations happen in parallel:
|| Long coefficient read EAB, BB, EB,
Dual data read: Simultaneous single (or long) data
|| Single (or long) data write (FB)
read (16-bit (or 32-bit) read from data memory us-
ing the DAB and DB (and CB) buses) and long co-
efficient data read (32-bit read from internal
memory with the double coefficient indirect ad-
dressing mode using the BAB and BB buses).
Single (or long) data write:16-bit (or 32-bit) write to
data memory using the EAB and EB (and FB)
buses.
The first segment, referred to as the program fetch pipeline, fetches 64-bit
instruction packets from memory, places them in the IU IBQ, and then
feeds the second pipeline segment with 128-bit instruction packets. The
program fetch pipeline is illustrated in Figure 1−6.
Time
F I unit Store the fetched instruction packet from memory into the IU
IBQ.
Predecode Predecode2 Decode Address1 Address2 Access1 Access2 Read Execute1 Execute2 Write1 Write2 Write3
PD1 PD2 D AD1 AD2 AC1 AC2 RD X1 X2 W1 W2 W3
Instructions Decoding Phases Data Memory Read Access Phases Data Memory Write Access Phases
Time
NOTE: Only for actual memory accesses (AC2 for reads, W3 for writes)
AD1 AU DAGEN Read STx_55 bits associated with data address generation:
ST1_55(C54CM), ST2_55(ARnLC), ST2_55(CDPLC).
Read register or load address constant involved in the address
calculation.
Detect address phase resource conflicts.
Conditional Executions Read and evaluate the condition of the execute (AD-unit) in-
struction.
Special Instructions Read, process, and write back TAx registers in the case of
swap instructions.
AC1 Memory Access Issue requests and data memory address for operand read,
and send them on the appropriate data buses.
AC2 Memory Access Allow one cycle for physical memory to read the data
RD Memory Access Capture memory operand from the relevant data read bus.
RD LOAD/STORE No activity
Common to all proc- Read STx_55 bits that affects AU and DU instructions.
essing units
ACx are read in the RD phase. However, the data forwarding
mechanism considers these reads to be accomplished in the
X1 phase as described below.
Exceptions include:
− DU SALUs, exp(), −exp(), mant() instructions.
− Other exceptions are listed in Table 1−4.
AU ALU No activity
Special Instructions Read ACx in case of: exp(), −exp(), mant() instructions.
Read TCx in case of adsc() or ads2c() instructions.
Conditional Executions Read and evaluate the condition of the execute (D_unit)
instruction.
W1 Memory Access Issue request and data memory address to the appropriate
CPU write buses.
W2 Memory Access Present the data to write on the relevant write bus.
W3 Memory Access Allow one cycle to the physical memory to write the data.
Table 1−7 lists some exceptional cases where ACx accumulator read data for-
warding from R phase to X1 phase does not occur.
ACx register read data forwarding rule does not apply when swap() instruction is used. This instruction se-
quence is executed in 4 cycles:
swap (ACx, ACy) ; Writes to ACx and ACy in X2 phase
ACx = ACx +#k ; Read ACx in RD phase with no data forwarding in X1 phase
Register data forwarding does not apply when AC12 to AC15 registers are read after TRN0 through TRN8
have been updated by min/max_diff[_dbl()] instructions. This instruction sequence is executed in
4 cycles:
min/max_diff(ACa, ACb, ACc, ACd, TRN0) ; Write AC15_H(TRN0) in X2 phase
AC15 = AC15 +#k ; Read AC15 in RD phase with no data forwarding in
; X1 phase
ACx register read data forwarding rule does not apply, as ACx is updated with an MMR write operation. This
instruction sequence is executed in 5 cycles:
mmap(@ACx_L) = #k ; Write ACx in W1 phase
ACx = ACx +#k ; Read ACx in RD phase with no data forwarding in X1 phase
Table 1−8 illustrates the pipeline activity with some instructions execution ex-
amples.
mar(XARx = #k23) XARx is initialized with a constant and is updated in AD2 phase.
mar(ARx + #k) With this special instruction, ARx is added with a constant and
is updated in AD2 phase.
AC0 = *ARx+ ARx is read in the AD1 phase, and is updated in the AD2 phase.
AC0 is loaded with the data memory location pointed by ARx
in the X2 phase.
ARx = ARx + #k ARx is read at the beginning of the X1 phase and is modified
at the end of the X2 phase.
ACx = ACy + ACx ACx and ACy are read in the X1 phase. ACx is updated in the
X2 phase.
ACx = @ARx || mmap() ARx is MMR-addressed and is read in the R phase. ACx is
modified in the X2 phase.
ACx = ARx ARx is not MMR-addressed and is read in the R phase. ACx
is modified in the X2 phase.
push(), pop(), return, SP is read in the AD1 phase and is modified in the AD2
mar(SP + #k8) phase. SSP is also affected if the 32-bit stack mode is se-
lected.
Note:
The pipeline-protection mechanism cannot prevent pipeline conflicts
between two instructions that are executed in parallel.
accumulators) increments the AR1 register by reading its content in the AD1
phase and writing it back in the AD2 phase, the data forwarding mechanism
of the AU DAGEN module executes this sequence of instructions without any
pipeline stalls. Similarly, although each of the max instructions reads AC1
accumulator content in the X1 phase and writes to AC1 accumulator in the X2
phase, the data forwarding mechanism of the DU SALU executes this
sequence of instructions without any pipeline stalls as well.
Finally, although each of the max instructions reads AC0 and AC1 accumula-
tors content in the X1 phase and each of the load instructions writes to AC0
or AC1 accumulator in the X2 phase, the data forwarding mechanism occur-
ring between DU register files module, and DU SALU units, executes this se-
quence of instructions without any pipeline stalls occurring in the D unit.
See the C55x+ instructions set TI document (LIT ####) for more details about
the data forwarding mechanism.
CPU Registers
This chapter describes the main registers in the C55x+ DSP CPU. Section 2.1
lists the registers in alphabetical order, and Section 2.2 shows the register IDs,
and their corresponding memory-mapped addresses (when available). The
other sections contain additional details about the CPU registers.
Topic Page
2-1
Alphabetical Summary of Registers
BK03, BK47, BKC Circular buffer size registers 16 bits each 2.6.4
BSA01, BSA23, BSA45, Circular buffer start address registers 16 bits each 2.6.3
BSA67, BSAC
DBIER0, DBIER1 Debug interrupt enable registers 0 and 1 16 bits each 2.8.4
REA0, REA1 Block-repeat end address registers 0 and 1 24 bits each 2.9.2
RSA0, RSA1 Block-repeat start address registers 0 and 1 24 bits each 2.9.2
The C55x+ DSP introduces the register ID concept to support the increased
number of registers of the architecture. This concept enables to access all
C55x+ DSP registers with the same flexibility as standard MMR access.
Table 2−2 shows the correspondence between the standard MMR addresses
and the global register ID of all CPU registers.
Notes:
1) Registers ST0_55, ST1_55, and ST3_55 are each accessible at two ad-
dresses. At one address, all the C55x+ DSP bits are available. At the oth-
er address (the protected address), certain bits cannot be modified. The
protected address is provided to support C54x DSP code that writes to
ST0, ST1, and PMST (the C54x DSP counterpart of ST3_55).
2) Registers T3, RSA0L, REA0L, and SP are each accessible at two ad-
dresses. For accesses using the DP direct addressing mode memory-
mapped register accesses, the assembler substitutes the higher of the
two addresses: T3 = 23h (not 0Eh), RSA0L = 3Dh (not 1Bh),
REA0L = 3Fh (not 1Ch), SP = 4Dh (not 18h).
3) Any C55x+ DSP instruction that loads BRC1 also loads the same value
to BRS1.
10h to − − − Reserved − −
1Fh Do not use these addresses
3Ch to − − − Reserved − −
3Fh Do not use these addresses
4Fh AC15.H/ 0Fh TRN0_L High part of accumulator 15/ 31−16 2.3 / 2.4
TRN0 Transition register 0
50h to − − − Reserved − −
5Fh Do not use these addresses
6Fh AC15.L/ 38h TRN1_L Low part of accumulator 15/ 15−0/ 2.3 / 2.4
TRN1 Transition register 1 15−0
70h to − − − Reserved − −
7Fh Do not use these addresses
90h to − − − Reserved − −
93h Do not use these addresses
9Ch to − − − Reserved − −
9Eh Do not use these addresses
A0h XAR0.H − − High part of the extended auxiliary reg- 7−0 2.6.1
ister 0
A1h XAR1.H − − High part of the extended auxiliary reg- 7−0 2.6.1
ister 1
A2h XAR2.H − − High part of the extended auxiliary reg- 7−0 2.6.1
ister 2
A3h XAR3.H − − High part of the extended auxiliary reg- 7−0 2.6.1
ister 3
A4h XAR4.H − − High part of the extended auxiliary reg- 7−0 2.6.1
ister 4
A5h XAR5.H − − High part of the extended auxiliary reg- 7−0 2.6.1
ister 5
A6h XAR6.H − − High part of the extended auxiliary reg- 7−0 2.6.1
ister 6
A7h XAR7.H − − High part of the extended auxiliary reg- 7−0 2.6.1
ister 7
A8h XAR8.H − − High part of the extended auxiliary reg- 7−0 2.6.1
ister 8
A9h XAR9.H − − High part of the extended auxiliary reg- 7−0 2.6.1
ister 9
AAh XAR10.H − − High part of the extended auxiliary reg- 7−0 2.6.1
ister 10
ABh XAR11.H − − High part of the extended auxiliary reg- 7−0 2.6.1
ister 11
ACh XAR12.H − − High part of the extended auxiliary reg- 7−0 2.6.1
ister 12
ADh XAR13.H − − High part of the extended auxiliary reg- 7−0 2.6.1
ister 13
AEh XAR14.H − − High part of the extended auxiliary reg- 7−0 2.6.1
ister 14
AFh XAR15.H 4Fh CDP_H High part of the extended auxiliary reg- 7−0 2.6.1/
ister 15 2.6.2
(High part of the extended coefficient
data pointer)
B0h to − − − Reserved − −
B3h Do not use these addresses
B4h XSSP.H 4Eh − High part of the extended system stack 7−0 2.6.7
pointer
B5h XSP.H 4Eh SP_H High part of the extended data stack 7−0 2.6.7
pointer
B6h XDP.H 2Bh DP_H High part of the extended data page 7−0 2.6.5
pointer
B7h PDP 2Fh PDP_L Peripheral data page register 8−0 2.6.6
B8h BSA01 32h BSA01_L Circular buffer start address register for 15−0 2.6.3
XAR0 and XAR1
B9h BSA23 33h BSA23_L Circular buffer start address register for 15−0 2.6.3
XAR2 and XAR3
BAh BSA45 34h BSA45_L Circular buffer start address register for 15−0 2.6.3
XAR4 and XAR5
BBh BSA67 35h BSA67_L Circular buffer start address register for 15−0 2.6.3
XAR6 and XAR7
BCh BSAC 36h BSAC_L Circular buffer start address register for 15−0 2.6.3
XAR15
BDh BKC 31h BKC_L Circular buffer size register for XAR15 15−0 2.6.4
BEh BK03 19h BK03_L Circular buffer size register for 15−0 2.6.4
XAR0−XAR3
Note: In the C54x−DSP compatible mode (C54CM = 1), BK03 is used for the auxiliary registers AR0 through
AR7. C54CM is a bit in a status register 1 (ST1_55). The status registers are described in Section 2.10.
BFh BK47 30h BK47_L Circular buffer size register for 15−0 2.6.4
XAR4−XAR7
D0h to − − − Reserved − −
DFh Do not use these addresses
E0h ST0 06h ST0P_L Status register 0 (For C54 DSP code) 15−0 2.10.1
Note: Address 06h is the protected address of ST0_55. This address is for C54x DSP code that was written to
access ST0. Native C55x/C55x+ DSP code must use address 02h to access ST0_55.
E1h ST1 07h ST1P_L Status register 1 (For C54x DSP code) 15−0 2.10.2
Note: Address 07h is the protected address of ST1_55. This address is for C54x DSP code that was written to
access ST1. Native C55x/C55x+ DSP code must use address 03h to access ST1_55.
E3h ST3 1Dh ST3P_L Status register 3 (For C54x DSP code) 15−0 2.10.4
(PMST_L)
Note: Address 1Dh is the protected address of ST3_55. This address is for C54x DSP code that was written to
access the processor mode status register (PMST). Native C55x/C55x+ DSP code must use address 04h to ac-
cess ST3_55.
E4h ST0_55 02h ST0_L Status register 0 (For C54x DSP code) 15−0 2.10.1
Note: Address 02h is for native C55x/C55x+ DSP code that accesses ST0_55. C54x DSP code that was written
to access ST0 must use address 06h to access ST0_55.
E5h ST1_55 03h ST1_L Status register 1 (For C54x DSP code) 15−0 2.10.2
Note: Address 03h is for native TMS320C55x+ DSP code that accesses ST1_55. TMS320C54x DSP code that
was written to access ST1 must use address 07h to access ST1_55.
Note: Address 04h is for native C55x/C55x+ DSP code that accesses ST3_55. C54x DSP code that was written
to access the processor mode status register (PMST) must use address 1Dh to access ST3_55.
ECh DBGIER0 47h DBIER0_L Debug interrupt enable register 0 15−0 2.8.4
EDh DBGIER1 48h DBIER1_L Debug interrupt enable register 1 15−0 2.8.4
EEh IVPD 49h IVPD_L Interrupt vector pointer for vectors 0−31 15−0 2.8.1
F0h RSA0.H 3Ch RSA0_H High part of the block-repeat start ad- 15−0 2.9.2
dress register 0
F1h RSA1.H 40h RSA1_H High part of the block-repeat start ad- 15−0 2.9.2
dress register 1
F2h REA0.H 3Eh REA0_H High part of the block-repeat end ad- 15−0 2.9.2
dress register 0
F3h REA1.H 42h REA1_H High part of the block-repeat end ad- 15−0 2.9.2
dress register 1
F8h RSA0.L 3Dh or RSA0_L Low part of the block-repeat start ad- 15−0 2.9.2
1Bh dress register 0
F9h RSA1.L 41h RSA1_L Low part of the block-repeat start ad- 15−0 2.9.2
dress register 1
FAh REA0.L 3Fh or REA0_L Low part of the block-repeat end ad- 15−0 2.9.2
1Ch dress register 0
FBh REA1.L 43h REA1_L Low part of the block-repeat end ad- 15−0 2.9.2
dress register 1
FCh to − − − Reserved − −
FFh Do not use this address
Accumulators AC12 to AC15 low and high parts are mapped to the eight
transition registers (TRN0−TRN7)
For source code migration purpose, the assembler maps C54x accumulators
A and B to C55x+ AC0 and AC1 accumulators, respectively.
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Figure 2−1. Accumulators and Transition Registers
ÁÁÁÁÁÁÁÁÁÁÎÎÎÎÎÎÎÎÎÎÎ
ÁÁÁÁÁÁÁÁÁÁÁÉÉÉÉÉÉÉÉÉÉÉÉ
ÁÁÁÁÁÁÁÁÁÁÁÁÁ
39−32 31−16 15−0
ÁÁÁ
AC0
ÎÎÎÎÎÎÎÎÎÎÎÉÉÉÉÉÉÉÉÉÉÉÉÁ
AC0.G AC0.H AC0.L
ÁÁÁ
AC1
ÁÁÁ ÎÎÎÎÎÎÎÎÎÎÎ
AC1.G
ÎÎÎÎÎÎÎÎÎÎÎÉÉÉÉÉÉÉÉÉÉÉÉ
ÉÉÉÉÉÉÉÉÉÉÉÉÁ
Á
AC1.H AC1.L
ÁÁÁ ÎÎÎÎÎÎÎÎÎÎÎÉÉÉÉÉÉÉÉÉÉÉÉÁ
AC2 AC2.G AC2.H AC2.L
ÁÁÁ ÎÎÎÎÎÎÎÎÎÎÎÉÉÉÉÉÉÉÉÉÉÉÉÁ
AC3 AC3.G AC3.H AC3.L
ÁÁÁ
AC4
ÎÎÎÎÎÎÎÎÎÎÎÉÉÉÉÉÉÉÉÉÉÉÉÁ
AC4.G AC4.H AC4.L
ÁÁÁ
AC5
ÁÁÁ ÎÎÎÎÎÎÎÎÎÎÎ
AC5.G
ÎÎÎÎÎÎÎÎÎÎÎÉÉÉÉÉÉÉÉÉÉÉÉ
ÉÉÉÉÉÉÉÉÉÉÉÉÁ
Á
AC5.H AC5.L
ÁÁÁ ÎÎÎÎÎÎÎÎÎÎÎÉÉÉÉÉÉÉÉÉÉÉÉÁ
AC6 AC6.G AC6.H AC6.L
ÁÁÁ ÎÎÎÎÎÎÎÎÎÎÎÉÉÉÉÉÉÉÉÉÉÉÉÁ
AC7 AC7.G AC7.H AC7.L
ÁÁÁ
AC8
ÎÎÎÎÎÎÎÎÎÎÎÉÉÉÉÉÉÉÉÉÉÉÉÁ
AC8.G AC8.H AC8.L
ÁÁÁ
AC9
ÁÁÁ ÎÎÎÎÎÎÎÎÎÎÎ
AC9.G
ÉÉÉÉÉÉÉÉÉÉÉÉ
ÎÎÎÎÎÎÎÎÎÎÎÉÉÉÉÉÉÉÉÉÉÉÉÁ
ÉÉÉÉÉÉÉÉÉÉÉÉÁ
AC9.H AC9.L
ÁÁÁ ÎÎÎÎÎÎÎÎÎÎÎ Á
AC10 AC10.G AC10.H AC10.L
ÁÁÁ ÎÎÎÎÎÎÎÎÎÎÎÉÉÉÉÉÉÉÉÉÉÉÉÁ
AC11 AC11.G AC11.H AC11.L
ÁÁÁ
AC12
ÎÎÎÎÎÎÎÎÎÎÎÉÉÉÉÉÉÉÉÉÉÉÉÁ
AC12.G AC12.H / TRN6 AC12.L / TRN7
ÁÁÁ
AC13
ÁÁÁ ÎÎÎÎÎÎÎÎÎÎÎ
AC13.G
ÎÎÎÎÎÎÎÎÎÎÎÉÉÉÉÉÉÉÉÉÉÉÉ
ÉÉÉÉÉÉÉÉÉÉÉÉÁ
Á
AC13.H / TRN4 AC13.L / TRN5
ÁÁÁ ÎÎÎÎÎÎÎÎÎÎÎÉÉÉÉÉÉÉÉÉÉÉÉÁ
AC14 AC14.G AC14.H / TRN2 AC14.L / TRN3
ÁÁÁ
AC15
ÁÁÁ ÎÎÎÎÎÎÎÎÎÎÎ
AC15.G
ÉÉÉÉÉÉÉÉÉÉÉÉÁ
ÎÎÎÎÎÎÎÎÎÎÎÉÉÉÉÉÉÉÉÉÉÉÉÁ
AC15.H / TRN0 AC15.L / TRN1
Note:
The transition registers are physically part of the accumulators from AC12
to AC15, as described in Figure 2−1. For that reason do not use instructions
involving accumulators AC12 to AC15 in parallel with instructions reading
from or writing to the corresponding TRNx registers. For example, the follow-
ing instruction pair is illegal:
AC15 = AC0 || max_diff(AC1, AC2, AC3, AC4, pair(TRN0))
Keep track of more buffer element index values by swapping the contents
of the auxiliary registers (AR4–AR7) and the temporary registers by using
a swap instruction
Hold the transition metric of a Viterbi butterfly for dual 16-bit operations
performed in the D-unit ALU
Note:
If C54CM = 1 (the TMS320C54x DSP-compatible mode is on), then T2 is
tied to the ASM bits of status register ST1_55 and cannot be used as a
general-purpose register. For details, see Section 2.10.2.1.
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Figure 2−2. Temporary Registers
ÁÁÁ
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ
ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ Á
15−0
ÁÁÁ
ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁ
T0
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁ
T1
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ
T2
Á
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
T3
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
2.6 Registers Used to Address Data Space and I/O − xI/O Spaces
This section describes the following registers:
See
Register(s) Function Section
XAR0−XAR15 Point to a value in data, I/O − xI/O spaces for ac- 2.6.1
AR0−AR15 cesses made with indirect addressing modes
XDP Specify the start address for accesses made with 2.6.5
the XDP direct addressing mode
The XARn registers can be used to address any objects allocated in the
8-Mword data space.
XAR0−XAR15 are used in the XAR indirect addressing mode and the dual
XAR indirect addressing mode
The C55x+ DSP has a 24-bit flat data addressing mechanism. The data
address generation (AU DAGEN) units have a full 24-bit arithmetic unit.
This allows address generation to cross or span the 64-Kword data page
boundaries which allows data tables that are greater than 64 Kwords to
be addressed efficiently.
A bit address (in instructions that access individual bits or bit pairs)
ÁÁÁÁÁÁÁÁ Á
Figure 2−3. Extended Auxiliary Registers and Their Parts
ÁÁÁÁÁÁÁÁ XAR0
Á AR0H AR0
ÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁ
XAR1
Á
Á
AR1H AR1
ÁÁÁÁÁÁÁÁ Á
XAR2 AR2H AR2
ÁÁÁÁÁÁÁÁ Á
XAR3 AR3H AR3
ÁÁÁÁÁÁÁÁ XAR4
Á AR4H AR4
ÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁ
XAR5
Á
Á
AR5H AR5
ÁÁÁÁÁÁÁÁ Á
XAR6 AR6H AR6
ÁÁÁÁÁÁÁÁ Á
XAR7 AR7H AR7
ÁÁÁÁÁÁÁÁ XAR8
Á AR8H AR8
ÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁ
XAR9
Á
Á
AR9H AR9
ÁÁÁÁÁÁÁÁ Á
XAR10 AR10H AR10
ÁÁÁÁÁÁÁÁ XAR11
Á AR11H AR11
ÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁ
XAR12
Á
Á
AR12H AR12
ÁÁÁÁÁÁÁÁ Á
XAR13 AR13H AR13
ÁÁÁÁÁÁÁÁ Á
XAR14 AR14H AR14
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
XAR15
Á
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
AR15H AR15
ARnH High part of extended auxiliary ARnH is not memory mapped (except
register n AR15H for source code compatibility
with C55x+ DSP generations)
Note:
XAR0−XAR7 can be configured for circular addressing mode (see Section
6.12 for more detail on the circular addressing mode). XAR8−XAR15 cannot
be configured for the circular addressing mode.
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Figure 2−4. Circular Buffer Start Address Registers
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁÁ 15−0
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁÁ
BSA01
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁÁ
BSA23
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ
BSA45
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁÁ
ÁÁ
ÁÁÁ
ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ
ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁÁ
BSA67
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
BSAC
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
CPU Registers 2-19
Registers Used to Address Data Space and I/O − xI/O Spaces
Each buffer start address register is associated with a particular extended aux-
iliary register (see Table 2−4). A buffer start address is only added to the regis-
ter value when the register is configured for circular addressing in status regis-
ter ST2_55, or if circular() qualifier is being applied to the instruction.
Table 2−4. Circular Buffer Start Address Registers and the Associated XARn
In this example, with XAR6 configured for circular addressing, the generated
address is of the following form:
(AR6H:BSA67) + (00:AR6)
The start address of the circular buffer is composed of the 8 MSBs of the ex-
tended auxiliary register XAR6 (AR6H), and the 16 bits of its associated buffer
start address (BSA67). The 16 LSBs of XAR6 (AR6) contain the index of the
referenced element inside that circular buffer.
When you run TMS320C54x DSP code in the compatible mode (C54CM = 1),
make sure that the buffer start address registers contain 0.
Three 16-bit circular buffer size registers (see Figure 2−5) specify the number
of words (up to 65535) in a circular buffer. Each buffer size register is associat-
ed with a particular extended address register (see Table 2−5).
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Figure 2−5. Circular Buffer Size Registers
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ 15−0
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁÁ
BK03
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁÁ
BK47
ÁÁÁ
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ
ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ ÁÁ
ÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
BKC
Table 2−5. Circular Buffer Size Registers and the Associated XARn
Register XARn
BKC XAR15
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ
ÁÁÁÁÁÁÁÎÎÎÎÎÎÎÎÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
23−16 15−0
ÁÁÁÁÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
XDP DPH
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
DP
Note that in the XDP direct addressing mode, XDP specifies a 24-bit address;
while in the k16 absolute addressing mode, only DPH is used and is concate-
nated with a 16-bit instruction defined constant to form a 24-bit address.
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÉÉÉÉÉÉÉÉÉÉÉÉÉ
ÁÁÎÎÎÎÎÎÎÎÎÎÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
15−9 8−0
ÁÁÎÎÎÎÎÎÎÎÎÎÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÉÉÉÉÉÉÉÉÉÉÉÉÉÁ
Reserved PDP
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
2.6.7 Extended Stack Pointers (XSP/SP, XSSP/SSP)
The CPU contains two 24-bit XSP and XSSP stack registers to access the data
stack and the system stack, respectively. When accessing the data stack, the
XSP register contains the address of the value last pushed onto the data stack.
Similarly, when accessing the system stack, the XSSP register contains the
address of the value last pushed onto the system stack.
XSP register is composed of the SPH part (8 higher bits of XSP) and the SP
register (16 lower bits of XSP). Similarly, the XSSP register is composed of the
SSPH part (8 higher bits of XSSP) and the SSP register (16 lower bits of
XSSP).
You can allocate the data stack and the system stack independently from each
other anywhere in the data space. For example:
mar(XSP = #010012h)
mar(XSSP = #020AE0h)
As mentioned in Section 2.6.1, the C55x+ DSP has a 24-bit flat data address
mechanism. The data address generation (AU DAGEN) units have a full 24-bit
arithmetic unit. This allows each stack to span over the 64-Kword data page
boundary.
To ensure source code compatibility with C55x+ DSP generations, C55x+
DSP features the paged-stack mode where SPH and SSPH are tied to each
other. (See Section 4.2.1 for more details on stack configurations.)
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Figure 2−8. Extended Stack Pointers
ÁÁÁÁÁÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ
ÁÁÁÁÁÁÁÎÎÎÎÎÎÎÎÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ 23−16 15−0
ÁÁÁÁÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁÁ
XSP SPH SP
ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
XSSP SSPH SSP
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Table 2−7. Extended Stack Pointer Registers
XSP is used in the XSP direct addressing mode. The following instructions
read or modify the XSP and XSSP registers:
Software interrupt, software trap, software These instructions push data onto the data stack and the sys-
reset, conditional call, unconditional call tem stack. XSP and XSSP are decremented before each pair
of data values is pushed.
Push This instruction pushes data onto the data stack only. XSP is de-
cremented before the data is pushed.
Conditional return, unconditional return, re- These instructions pop data from the data stack and the system
turn from interrupt stack. XSP and XSSP are incremented after each pair of data
values is popped.
Pop This instruction pops data from the data stack only. XSP is in-
cremented after the data is popped.
Table 2−8 describes three registers used by the CPU to maintain proper
program flow.
Register Description
CFCT Control-flow context register. The CPU keeps a record of active re-
peat loops (the loop context). If the selected stack configuration
(see Section 4.2) uses the fast-return process, then CFCT is a tem-
porary holding place for the 8-bit loop context while a subroutine is
being executed. CFCT, along with RETA, enables the efficient exe-
cution of multiple layers of subroutines. You can read from or write
to RETA and CFCT as a pair with dedicated, 32-bit load and store
instructions.
Note:
RETA and CFCT are cleared to 0 by a DSP hardware reset, and are not
affected by push/pop instructions or by a software reset.
The CPU has internal bits for storing the loop context—the status (active or
inactive) of repeat loops in a routine. When the CPU follows an interrupt or a
call, the loop context is stored in CFCT. When the CPU returns from an inter-
rupt or a called subroutine, the loop context is restored from CFCT. The loop
context bits have the following form in the 8-bit CFCT.
Bit(s) Description
5 Reserved.
4 BPTR bit: this bit reflects whether the CPU is in byte or word pointer ad-
dressing mode.
0 = Word-pointer mode
1 = Byte-pointer mode
3–0 This 4-bit code reflects the status of the two possible levels of block-re-
peat loops, the outer (level 0) loop and the inner (level 1) loop. Depend-
ing on which type of block-repeat instruction you choose, an active loop
is local (all its code is repeatedly executed from within the instruction buff-
er queue) or external (its code is repeatedly fetched and transferred
through the buffer queue to the CPU).
IFR0, IFR1 Indicate which maskable interrupts have been re- 2.8.2
quested
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Figure 2−9. Interrupt Vector Pointer
ÁÁÁ
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ
ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ Á
15−0
ÁÁÁ
ÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Á
IVPD
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Before you modify IVPD, make sure that:
Maskable interrupts are globally disabled (INTM = 1). This prevents a
maskable interrupt from occurring before IVPD is modified to point to new
vectors.
Each hardware nonmaskable interrupt has a vector and an interrupt ser-
vice routine for the old IVPD value and for the new IVPD value. This pre-
vents fetching of an illegal instruction code if a hardware nonmaskable
interrupt occurs during the process of modifying the IVPD.
Table 2−9 shows how the vector addresses are formed for the different inter-
rupt vectors. The CPU concatenates the IVPD with a vector number coded on
5 bits (for example, 00001 for IV1 and 10000 for IV16) and shifted left by 3 bits.
Vector Address
The 16-bit interrupt flag registers, IFR1 and IFR0, contain flag bits for all the
maskable interrupts. When a maskable interrupt request reaches the CPU, the
corresponding flag is set to 1 in one of the IFRs. This indicates that the interrupt
is pending or waiting for acknowledgement from the CPU. Figure 2−10 is a
general representation of the C55x+ DSP IFRs. To see which interrupts are
mapped to these bits, see the applicable C55x+ DSP data manual.
You can read the IFRs to identify pending interrupts, and write to the IFRs to
clear pending interrupts. To clear an interrupt request (and clear its IFR bit to
0), write a 1 to the corresponding IFR bit. For example:
All pending interrupts can be cleared by writing the current contents of the IFR
back into the IFR. Acknowledgement of a software or hardware interrupt re-
quest also clears the corresponding IFR bit. A device reset clears all IFR bits.
7 6 5 4 3 2 1 0
IF23 IF22 IF21 IF20 IF19 IF18 IF17 IF16
R/W1C−0 R/W1C−0 R/W1C−0 R/W1C−0 R/W1C−0 R/W1C−0 R/W1C−0 R/W1C−0
IFR0
15 14 13 12 11 10 9 8
IF15 IF14 IF13 IF12 IF11 IF10 IF9 IF8
R/W1C−0 R/W1C−0 R/W1C−0 R/W1C−0 R/W1C−0 R/W1C−0 R/W1C−0 R/W1C−0
7 6 5 4 3 2 1 0
IF7 IF6 IF5 IF4 IF3 IF2 Reserved
R/W1C−0 R/W1C−0 R/W1C−0 R/W1C−0 R/W1C−0 R/W1C−0 R−0
Legend: R = Read access; W1C = Writing a 1 to this bit causes the CPU to clear this bit to 0; -n = Value after DSP hardware reset;
Reserved = A write to this bit has no effect, and the bits in this field always appear as 0s during read operations.
To clear this flag bit to 0 (and clear its corresponding interrupt request), write
a 1 to the bit.
To clear this flag bit to 0 (and clear its corresponding interrupt request), write
a 1 to the bit.
To clear this flag bit to 0 (and clear its corresponding interrupt request), write
a 1 to the bit.
When you read these bits, interpret them as follows (x is a number from 16 to
23):
IFx Description
0 The interrupt associated with interrupt vector x is not pending.
1 The interrupt associated with interrupt vector x is pending.
To clear a flag bit to 0 (and clear its corresponding interrupt request), write a
1 to the bit.
When you read these bits, interpret them as follows (x is a number from 2 to
15):
IFx Description
0 The interrupt associated with interrupt vector x is not pending.
1 The interrupt associated with interrupt vector x is pending.
To clear a flag bit to 0 (and clear its corresponding interrupt request), write a
1 to the bit.
Note:
IER1 and IER0 are not affected by a software reset instruction. Initialize
these registers before globally enabling (INTM = 0) the maskable interrupts.
IER1
15 11 10 9 8
Reserved RTOSINTE DLOGINTE BERRINTE
R−0 R/W−0 R/W−0 R/W−0
7 6 5 4 3 2 1 0
IE23 IE22 IE21 IE20 IE19 IE18 IE17 IE16
R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0
IER0
15 14 13 12 11 10 9 8
IE15 IE14 IE13 IE12 IE11 IE10 IE9 IE8
R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0
7 6 5 4 3 2 1 0
IE7 IE6 IE5 IE4 IE3 IE2 Reserved
R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R−0
The 16-bit debug interrupt enable registers, DBIER1 and DBIER0, are used
only when the CPU is halted in the real-time emulation mode of the debugger.
If the CPU is running in real-time mode, then the standard interrupt-handling
process is used and the DBIERs are ignored.
Read the DBIERs to identify time-critical interrupts. Write to the DBIERs to en-
able or disable time-critical interrupts. To enable an interrupt, set its corre-
sponding bit. To disable an interrupt, clear its corresponding bit. Figure 2−12
is a general representation of the C55x+ DSP DBIERs. To see which interrupts
are mapped to these bits, see the applicable C55x+ DSP data manual.
Note:
DBIER1 and DBIER0 are not affected by a software reset instruction. Initial-
ize these registers before you use the real-time emulation mode.
All DBIER bits are cleared to 0 by a DSP hardware reset, disabling all time-
critical interrupts.
DBIER1
15 11 10 9 8
Reserved RTOSINTD DLOGINTD BERRINTD
R−0 R/W−0 R/W−0 R/W−0
7 6 5 4 3 2 1 0
DBIE23 DBIE22 DBIE21 DBIE20 DBIE19 DBIE18 DBIE17 DBIE16
R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0
DBIER0
15 14 13 12 11 10 9 8
DBIE15 DBIE14 DBIE13 DBIE12 DBIE11 DBIE10 DBIE9 DBIE8
R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0
7 6 5 4 3 2 1 0
DBIE7 DBIE6 DBIE5 DBIE4 DBIE3 DBIE2 Reserved
R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R−0
15 5 4 3 2 1 0
Reserved Interrupt ID
You can read, and save the IIR register content with the following instructions:
;the content of the IIR register is copied to the memory
;location pointed by XSP register
push (mmap(@IIR))
A software interrupt or a trap instruction update the IIR register as well. A hard-
ware reset clears the IIR register content.
Bit(s) Description
0 When set to 1, this bit reflects whether an indirect access to address zero
has been made. Otherwise, it is set to 0.
1 When set to 1, this bit reflects whether a byte access to MMR space (ad-
dress 00h−5Fh) has been made in word-pointer CPU mode. Otherwise, it
is set to 0.
2 When set to 1, this bit reflects whether a stack access to MMR space
(address 00h−5Fh) has been made in word-pointer CPU mode. Other-
wise, it is set to 0.
3 When set to 1, this bit reflects whether a BAB bus access to MMR space
(address 00h−5Fh) has been made in word-pointer CPU mode. Other-
wise, it is set to 0.
4 When set to 1, this bit reflects whether a dual write to MMR space (ad-
dress 00h−5Fh) has been made in word-pointer CPU mode. Otherwise, it
is set to 0.
5 When set to 1, this bit reflects whether a word/long access has been
made at unaligned address in byte-pointer CPU mode. Otherwise, it is set
to 0.
6 When set to 1, this bit reflects whether a decode program bus error has
occurring. Otherwise, it is set to 0.
7 When set to 1, this bit reflects whether the megacell has detected an er-
ror condition. Otherwise, it is set to 0.
8−15 Reserved.
You can read the BER bits to identify the bus error interrupt sources, and write
to the BER register to clear the bus error interrupt sources. To clear a bus error
interrupt source (and clear its BER bit to 0), write a 1 to the corresponding BER
bit. For example:
; Clear bit #2 of BER:
mmap(@BER) = #0000000000000100b
A software interrupt or a trap instruction does not affect the BER bits (BER-
RINTF bits in the IFR1 register are affected in this case). A hardware or soft-
ware reset clears all BER bits.
Note:
When the CPU is detecting a bus error, it sets:
1) The corresponding bit of BER register.
2) The CPU bus error flag (CBERR bit in ST3_55 register).
3) The bus error interrupt flag (BERRINT bit in IFR1 register).
Note:
When the BER, ST3_55, or IFR1 registers are updated by a bus error, these
register accesses are not pipeline protected against any read or write opera-
tions involving these registers.
This section describes registers that control the execution of repeat loops.
Single-repeat registers are used for the repetition of a single instruction or two
parallel instructions. Block-repeat registers are used for the repetition of
blocks of instructions.
The 16-bit single-repeat instruction registers, RPTC and CSR, enable the rep-
etition of a single-cycle instruction (or two single-cycle instructions that are ex-
ecuted in parallel). The number of repetitions, N, is loaded into the single-re-
peat counter (RPTC) before the first execution. After the first execution, the
instruction is executed N more times; therefore, total number of executions is
N+1 times.
As shown in Figure 2−14, RPTC and CSR have 16 bits, enabling up to 65536
consecutive executions of an instruction (the first execution plus 65535
repetitions).
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ 15−0
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ
RPTC
ÁÁ
ÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
CSR
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
2.9.2 Block-Repeat Registers (BRC0–1, BRS1, RSA0–1, REA0–1)
The block-repeat instructions enable you to form loops that repeat blocks of
instructions. You can have one block-repeat loop nested inside another creat-
ing an inner (level 1) loop and an outer (level 0) loop. Table 2−10 describes the
C55x+ DSP registers associated with level 0 and level 1 loops. As described
in the following paragraphs, the use of these registers is affected by the C54x
DSP-compatible mode bit (C54CM), which is introduced in Section 2.10.2.4.
Wait until the loop is finished (when BRAF is cleared automatically) and
then clear C54CM.
Clear BRAF (this also stops the loop) and then clear C54CM.
Clear BRAF and C54CM at the same time with an instruction that modifies
status register ST1_55.
2.9.2.3 Pipeline Considerations for BRCx Register Updates Inside a Repeat Loop
There are two cases to consider when writing to the BRCx registers.
Ensure that the last two instructions of a level 0 loop do not explicitly update
the BRC0 register. Similarly, the last two instructions of a level 1 loop must not
explicitly update the BRC1 register. Such operations are not pipeline pro-
tected.
Ensure that the last four instructions of a level 0 loop do not implicitly update
the BRC0 register. Similarly, the last four instructions of a level 1 loop must not
implicitly update the BRC1 register. Such operations are not pipeline pro-
tected.
Note that in C55x+ DSP generations, it is the last two or three instructions that
are not pipeline protected against explicit or implicit BRCx register updates.
Note that you must not modify the RSAx or REAx registers when executing a
block-repeat loop.
BRC0 Block-repeat counter 0. This 16-bit regis- BRC1 Block-repeat counter 1. This 16-bit regis-
ter contains the number of times to repeat ter contains the number of times to repeat
the instruction block after its first execu- the instruction block after its first execu-
tion. tion.
RSA0 Block-repeat start address register 0. RSA1 Block-repeat start address register 1.
This 24-bit register contains the address This 24-bit register contains the address
of the first instruction in the instruction of the first instruction in the instruction
block. block.
REA0 Block-repeat end address register 0. This REA1 Block-repeat end address register 1. This
24-bit register contains the address of the 24-bit register contains the address of the
last instruction in the instruction block. last instruction in the instruction block.
Note: The 24-bit register values are stored in two consecutive 16-bit locations. Bits 23–16 are stored at the lower address (the
eight most significant bits in this location are ignored by the CPU). Bits 15–0 are stored at the higher address. For
example, RSA0(23–16) is accessible at address 00 003Ch, and RSA0(15–0) is accessible at address 00 003Dh.
ST0_55, ST1_55, and ST3_55 are each accessible at two addresses (see
Section 2.2, Memory-Mapped Registers). At one address, all C55x+ DSP bits
are available. At the other address (the protected address), the bits highlighted
in Figure 2−15 cannot be modified. The protected address is provided to sup-
port C54x DSP code that was written to access ST0, ST1, and PMST (the
C54x DSP counterpart of ST3_55). Reserved bits are not available for use.
Note:
Always write 1100b (Ch) to bits 11−8 of ST3_55.
Some C55x+ DSP devices do not have an instruction cache; these devices
do not use the CAFRZ, CAEN, and CACLR bits.
8 7 6 5 4 3 2 1 0
DP[15:7]
R/W−0
ST1_55
15 14 13 12 11 10 9 8
BRAF CPL XF HM INTM M40† SATD SXMD
R−0 R−0 R/W−1 R/W−0 R/W−1 R/W−0 R/W−0 R/W−1
7 6 5 4 3 2 1 0
C16 FRCT C54CM† ASM
R/W−0 R/W−0 R/W−1 R/W−0
ST2_55
15 14 13 12 11 10 9 8
ARMS Reserved DBGM EALLOW RDM GOVF CDPLC
R/W−0 R−11b R/W−1 R/W−0 R/W−0 R−0 R/W−0
7 6 5 4 3 2 1 0
AR7LC AR6LC AR5LC AR4LC AR3LC AR2LC AR1LC AR0LC
R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0 R/W−0
ST3_55
15 14 13 12 11 10 9 8
CAFRZ†# CAEN†# CACLR†# HINT†‡ Reserved (always write as 1100b)
R/W−0 R/W−0 R/W−0 R/W−1 R/W−1100b
7 6 5 4 3 2 1 0
CBERR† MPNMC§ SATA† Reserved BPTR CLKOFF SMUL SST
R/W−0 R/W−pins R/W−0 R/W−0¶ R −§ R/W−0 R/W−0 R/W−0
Legend: R = Read; W = Write; -n = Value after DSP hardware reset
† Highlighted bit: If you write to the protected address of the status register, then a write to this bit has no effect, and the bit always
appears as a 0 during read operations.
‡ The HINT bit is not used for all C55x+ DSP host port interfaces (HPIs). Consult the documentation for the specific C55x+ DSP.
§ The reset value of MPNMC may be dependent on the state of predefined pins at reset. To check this for a particular C55x+ DSP,
see its data manual. The reset value of BPTR bit is dependent of the configuration register value at reset time.
¶ Always write 0 to this bit.
# Some C55x+ DSP devices do not have an instruction cache; these devices do not use bits CAFRZ, CAEN, and CACLR.
Each of the four accumulators has its own overflow flag in ST0_55:
Bit Name Description Accessibility HW Reset
9 ACOV1 AC1 overflow flag Read/Write 0
10 ACOV0 AC0 overflow flag Read/Write 0
14 ACOV3 AC3 overflow flag Read/Write 0
15 ACOV2 AC2 overflow flag Read/Write 0
Once an overflow occurs, ACOVx remains set until one of the following
events occurs:
A DSP hardware or software reset is performed.
The CPU executes a conditional branch, call, return, or execute
instruction that tests the state of ACOVx.
ACOVx is explicitly cleared by a status bit clear instruction. For
example, you can clear ACOV1 by using the following instruction:
bit(ST0, #ST0_ACOV1) = #0; Clears ACOV1 bit
bit(ST0, #ST0_AC0V1) = #1; Sets ACOV1 bit
If AC0Vx is cleared by a status bit clear instruction, then it will not clear
the global overflow bit (GOVF) in the ST2_55 status register. You can
clear the global overflow bit by using the following instruction:
bit(ST2, #ST2_GOVF) = #0 ; Clears GOVF bit
bit(ST2, #ST2_GOVF) = #1 ; Sets GOVF bit
If one of the ACOVx bit is set, then it will set bit 9, the global overflow bit
(GOVF), in ST2_55 (bit number 9).
When an addition is performed in the arithmetic and logic unit of the D unit
SALU1 or 2 and if the addition generates a carry, then the CARRY bit is
set. If no carry is generated, then the CARRY bit is cleared. There is one
exception to this behavior: When the following syntax is used (shifting
Smem by 16 bits), the CARRY bit is set for a carry but is not affected if no
carry is generated.
ACy = ACx + Smem <<#16
For signed shift instructions and rotate instructions, you can choose
whether CARRY bit is modified.
You can clear and set the CARRY bit with the following instructions:
bit(ST0, #ST0_CARRY) = #0; Clears CARRY
bit(ST0, #ST0_CARRY) = #1; Sets CARRY
This 9-bit field is provided for compatibility with code transferred from the C54x
DSPs. C55x+ DSPs have an extended data page register (XDP) independent
of ST0_55. Any change to bits 15–7 of this extended data page register—
XDP(15–7)—is reflected in the DP status bits. Any change to the DP status bits
is reflected in XDP(15–7). When generating addresses for the XDP direct ad-
dressing mode, the CPU uses the full data page register, XDP(23−0). You are
not required to use the DP status bits; you can modify XDP directly.
Note:
If you want to load ST0_55 but do not want the access to change the content
of the data page register, then use an OR or an AND operation with a mask
value that does not modify the 9 least significant bits (LSBs) of ST0_55. For
an OR operation, put 0s in the 9 LSBs of the mask value. For an AND opera-
tion, put 1s in the 9 LSBs of the mask value.
The main function of the test/control bit is to hold the result of a test performed
by specific instructions. The following are main points about the test/control
bits:
All the test instructions that affect a test/control flag allow you to choose
whether the TC1 or TC2 bit is affected.
You can clear and set TC1 and TC2 bits with the following instructions:
ASM is not used by native C55x+ instructions but is available to support C54x
code running on the C55x+ DSP. In a C54x DSP, the ASM field supplies a
signed shift count for special instructions that shift an accumulator value. The
C55x+ DSP ASM field is used in the C54x DSP-compatible mode
(C54CM = 1).
Before reading further, it is important to know that the C55x+ DSP register that
contains ASM (status register ST1_55) is accessible at two addresses. One
address, 00 0003h, supports native C55x+ DSP instructions. The other ad-
dress, 00 0007h, supports C54x DSP code that accesses ST1 at 0007h.
When the ASM is loaded by a write to address 00 0007h, the 5-bit ASM
value is sign-extended to 16 bits and written to temporary register 2 (T2).
Clear/set status register bit instructions do not affect this bit field. When
a C54x DSP instruction requests the CPU to shift an accumulator accord-
ing to ASM, the CPU uses the shift count in T2.
When T2 is loaded, the five least significant bits are copied to ASM.
If C54CM = 0:
ASM is ignored. During an accumulator shift operation, the CPU reads the
shift count from the temporary register (T0, T1, T2, or T3) that was speci-
fied in the C55x+ DSP instruction or from a constant embedded in the
C55x+ DSP instruction.
If the C54CM bit = 0, and an MMR write updates the C54CM bit to 1 and the
ASM field at the same time, then the sign extension of the value loaded in T2
is performed accordingly to the new value of the C54CM bit (that is,
C54CM = 1).
In the C54x DSP-compatible mode (C54CM = 1), the BRAF bit indicates/con-
trols the status of a block-repeat operation.
If C54CM = 0:
The BRAF bit is not used. The status of repeat operations is maintained auto-
matically by the CPU (see the description for CFCT in Section 2.7, Program
Flow Registers (PC, RETA, CFCT)).
If C54CM = 1:
Reading the BRAF bit indicates the status of a block-repeat operation:
BRAF Description
0 No block-repeat operation is active.
1 A block-repeat operation is active.
BRAF also can be set or cleared with an instruction that modifies ST1_55.
If the C54CM bit = 0, and an MMR write updates the C54CM bit to 1 and the
BRAF bit at the same time, then the BRAF bit modifications are performed ac-
cordingly to the new value of the C54CM bit (C54CM = 1).
Functionality of BRAF:
A block-repeat loop begins with a block-repeat instruction such as the
blockrepeat{} instruction. The BRAF bit is set at the decode phase of this
block-repeat instruction to indicate that a loop is active.
Each time the last instruction of the loop enters the decode phase of the
pipeline, the CPU checks the values of the BRAF bit and counter register
(BRC0). If BRAF = 1 and BRC0 > 0, then the CPU decrements BRC0 by 1 and
begins the next iteration of the loop. Otherwise, the CPU stops the loop. In
either case, the last instruction completes its execution through the pipeline.
The last instruction of the loop enters the decode phase and BRC0 is de-
cremented to 0. BRAF is automatically cleared one cycle later.
A far branch (goto || far()) or far call (call || far()) instruction is executed.
(The BRAF bit is not cleared by the execution of other call or branch in-
structions, or by the execution of an intr() or trap() instruction.)
The BRAF bit is saved and restored with ST1_55 during the context switches
caused by an interrupt and a return-from-interrupt instruction. BRAF is not
saved when the CPU responds to a call instruction.
If a block-repeat loop is in progress and your program must switch modes from
C54CM = 1 to C54CM = 0, then the BRAF bit must be cleared before or during
the switch. There are three options:
Wait until the loop is finished (when BRAF is cleared automatically) and
then clear C54CM.
Clear BRAF (this also stops the loop) and then clear C54CM.
Clear BRAF and C54CM at the same time with an instruction that modifies
ST1_55.
The number of cycles to insert depends on when the first instruction clears
BRC0:
Cycles to
Instruction Example Pipeline Phase When BRC0 Is Cleared† Insert
† Consult the instruction set documentation for the active pipeline phase of a given syntax.
This pipeline issue can also affect when the loop ends. To ensure that the
BRAF bit is modified before the last instruction of the loop reaches the decode
phase, you must insert 8 or 9 cycles between the instruction that clears BRAF
and the last instruction:
Cycles to
Instruction Example Pipeline Phase When BRAF Is Modified† Insert
† Consult the instruction set documentation for the active pipeline phase of a given syntax.
Updating the BRAF bit prior to a return instruction (RET or RETI) is protected
in the pipeline. After the return, if the next instruction reads the BRAF bit, then
it reads the updated value.
In the C54x DSP-compatible mode (C54CM = 1), the execution of some in-
structions is affected by C16. C16 determines whether such an instruction is
executed in a single 32-bit operation (double-precision arithmetic) or in two
parallel 16-bit operations (dual 16-bit arithmetic).
If C54CM = 0: The CPU ignores C16. The instruction syntax alone determines
whether dual 16-bit arithmetic or 32-bit arithmetic is used.
You can clear and set C16 with the following instructions:
The C54CM bit determines whether the CPU will support code that was devel-
oped for a C54x DSP:
C54CM Description
0 C54x DSP-compatible mode is disabled. The CPU supports code
written for a C55x/C55x+ DSP.
1 C54x DSP-compatible mode is enabled. This mode must be set
when you are using code that was originally developed for a C54x
DSP. All the C55x/C55x+ DSP CPU resources remain available;
therefore, as you translate code, you can take advantage of the addi-
tional features on the C55x+ DSP to optimize your code.
Do not modify the C54CM bit within a local-repeat loop as shown in this exam-
ple:
Also, do not modify C54CM bit in parallel with a block-repeat instruction such
as:
bit(ST1, #ST1_C54CM) = #0
|| Repeat end2 ; Start of loop 2
...
end2 dbl(*AR4+) = AC1 ; End of loop 2
In C55x+ DSP generations, the CPL bit determines which of the XDP or XSP
registers is used for direct addressing modes. In C55x+ DSP, these two direct
addressing modes are independent from the CPL bit. The CPL bit is kept in
the C55x+ DSP for source compatibility purposes. A write or read to this bit
doesn’t do anything. The HW and SW reset values are the same as in the
C55x+ DSP generations.
You can clear and set FRCT with the following instructions:
When the external memory interface (EMIF) of the DSP receives a HOLD
request, the DSP places the EMIF output pins in the high-impedance state.
Depending on the value of the HM bit, the DSP may also stop internal program
execution:
HM Description
0 Hold mode is On. The DSP continues executing instructions from the
internal program memory.
1 Hold mode is Off. The DSP stops executing instructions from the
internal program memory.
You can use the following instructions to clear and set the HM bit:
The INTM bit globally enables or disables the maskable interrupts as shown
below. This bit has no effect on nonmaskable interrupts (those that cannot be
blocked by software).
INTM Description
0 All unmasked interrupts are enabled.
1 All maskable interrupts are disabled.
Modify the INTM bit with status bit clear and set instructions (see the fol-
lowing examples). The only other instructions that affect INTM are the soft-
ware interrupt instruction and the software reset instruction, which set
INTM before branching to the interrupt service routine.
bit(ST1, #ST1_INTM) = #0 ; Clears INT bit
bit(ST1, #ST1_INTM) = #1 ; Sets INT bit
In CPU cores with revisions older than 2.2, there is no pipeline protection
by the hardware between the INTM bit update and an interrupt jamming.
Because the INTM bit is updated in the execute phase of the pipeline, an
interrupt can be taken in between any of the five instructions following the
INTM set instruction which globally disables interrupts. In CPU cores with
revisions 2.2 or newer, no interrupt is taken after the INTM set instruction.
The state of the INTM bit is automatically saved when the CPU approves
an interrupt request. Specifically, the INTM bit is saved when the CPU
saves ST1_55 to the data stack.
When the CPU is halted in the real-time emulation mode of the debugger,
INTM is ignored and only time-critical interrupts can be serviced (see the
description for the debug interrupt enable registers in Section 2.8.4).
The M40 bit selects one of two computation modes for the D unit:
M40 Description
0 D-Unit computation mode is 32-bit mode. In this mode:
The sign bit is extracted from bit position 31.
During arithmetic, the carry is determined with respect to bit position 31.
Overflows are detected at bit position 31.
During saturation, the saturation value is 00 7FFF FFFFh (positive overflow) or FF 8000 0000h (neg-
ative overflow).
Accumulator comparisons versus 0 are performed using bits 31–0.
Shift or rotate operations are performed on 32-bit values.
During left shifts or rotations of accumulators, bits shifted out are extracted from bit position 31.
During right shifts or rotations of accumulators, bits shifted in are inserted at bit position 31.
During signed shifts of accumulators, if SXMD = 0, then 0 is copied into the accumulator’s guard bits;
if SXMD = 1, then bit 31 is copied into the accumulator’s guard bits. During any rotations or logical
shifts of accumulators, the guard bits of the destination accumulator are cleared.
Note: In the TMS320C54x DSP-compatible mode (C54CM = 1), there are some exceptions: An accumu-
lator’s sign bit is extracted from bit position 39. Accumulator comparisons versus 0 are performed using
bits 39–0. Signed shifts are performed as if M40 = 1.
You can clear and set M40 with the following instructions:
The SATD bit determines whether or not the CPU saturates the results of com-
putation in the D unit which overflowed:
SATD Description
If you want compatibility with TMS320C54x DSP code, then make sure
M40 = 0.
You can clear and set SATD with the following instructions:
bit(ST1, #ST1_SATD) = #0 ; Clears SATD bit
bit(ST1, #ST1_SATD) = #1 ; Sets SATD bit
The SXMD bit turns on or off the sign-extension mode which affects accumula-
tor loads and also additions, subtractions, and signed shift operations that are
performed in the D unit:
SXMD Description
0 Sign-extension mode is Off. When sign-extension mode is off:
For 40-bit operations, 16-bit or smaller operands are zero extended to 40 bits.
For the conditional subtract instruction, any 16-bit divisor produces the expected result.
When the D-unit arithmetic logic unit (ALU) is locally configured in its dual 16-bit mode (by a dual
16-bit arithmetic instruction):
16-bit values used in the higher part of the D-unit ALU are zero extended to 24 bits.
16-bit accumulator halves are zero extended if they are shifted right.
During a signed shift of an accumulator, if it is a 32-bit operation (M40 = 0), then 0 is copied
into the accumulator’s guard bits (39–32).
During a signed right shift of an accumulator, the shifted value is zero extended.
1 Sign-extension mode is On. In this mode:
For 40-bit operations, 16-bit or smaller operands are sign extended to 40 bits.
For the conditional subtract instruction, the 16-bit divisor must be a positive value (its most sig-
nificant bit (MSB) must be 0).
When the D-unit ALU is locally configured in its dual 16-bit mode (by a dual 16-bit arithmetic
instruction):
16-bit values used in the higher part of the D-unit ALU are sign extended to 24 bits.
16-bit accumulator halves are sign extended if they are shifted right.
During a signed shift of an accumulator, if it is a 32-bit operation (M40 = 0), then bit 31 is copied
into the accumulator guard bits (39–32).
During a signed right shift of an accumulator, the shifted value is sign extended, unless the uns()
expression qualifier designates the accumulator value as unsigned.
You can clear and set SXMD with the following instructions:
bit(ST1, #ST1_SXMD) = #0 ; Clears SXMD bit
bit(ST1, #ST1_SXMD) = #1 ; Sets SXMD bit
The XF bit is a general-purpose output bit. This bit is directly connected to the
XF pin on those C55x+ DSP devices that have an XF pin. Setting the XF bit
drives the XF pin high. Clearing the XF bit drives the XF pin low. The following
instructions clear and set XF:
bit(ST1, #ST1_XF) = #0 ; Clears XF bit
bit(ST1, #ST1_XF) = #1 ; Sets XF bit
Each ARnLC bit determines whether XARn is used for linear addressing or
circular addressing.
The CPU has 16 extended auxiliary registers, XAR0–XAR15. Only the XAR0
through XAR7 registers (n = 0, 1, 2, 3, 4, 5, 6, or 7) have a linear/circular
configuration bit in ST2_55. The XAR15 register has also a linear/circular con-
figuration: the CDPLC bit in ST2_55 (see Section 2.10.3.3).
ARnLC Description
0 XARn is used for linear addressing
1 XARn is used for circular addressing
You can clear and set the ARnLC bits with the status bit set/clear instruction.
For example, the following instructions respectively clear and set AR3LC.
bit(ST2, #ST2_AR3LC) = #0 ; Clears AR3LC bit
bit(ST2, #ST2_AR3LC) = #1 ; Sets AR3LC bit
Specifically, the DBGM bit is saved when the CPU saves ST2_55 to the
data stack.
The state of the EALLOW bit is automatically saved when the CPU ap-
proves an interrupt request or fetches the INTR #k5, TRAP #k5, or RESET
instruction. Specifically, the EALLOW bit is saved when the CPU saves
ST2_55 to the data stack.
The C55x+ revision features the GOVF bit to support the expanded number
of accumulators in the D-unit.
GOVF Description
0 Global overflow is not detected
1 Global overflow is detected
Similar to the ACOVx flags in the ST0_55 register, the overflow detection
depends on the M40 bit status in ST1_55 (see Section 2.10.1.1).
Once an overflow occurs, GOVF remains set until one of the following
events occurs:
A DSP hardware or software reset is performed
The CPU executes a conditional goto, call, return, or execute instruc-
tion that tests the state of GOVF
The GOVF bit is explicitly cleared by a status bit clear instruction. For
example, you can clear GOVF with the following instruction:
bit(ST2, #ST2_GOVF) = #0 ; Clears GOVF bit
Certain instructions executed in the D unit allow you to indicate whether the
40-bit result is to be rounded or not. The type of rounding performed depends
on the value of the RDM bit:
RDM Description
0 Rounding mode is not selected and rounds to the infinite. The CPU
adds 8000h (2 raised to the 15th power) to the 40-bit operand. Then
the CPU clears bits 15 through 0 to generate a rounded result in a
24- or 16-bit representation. For a 24-bit representation, only bits 39
through 16 of the result are meaningful. For a 16-bit representation,
only bits 31 through 16 of the result are meaningful.
1 Rounding mode is selected and rounds to the nearest. The rounding
depends on bits 15 through 0 of the 40-bit operand, as shown by the
following if statements. The rounded result is in a 24-bit representa-
tion (in bits 39 through 16) or a 16-bit representation (in bits 31
through 16).
If ( 0 =< bits 15–0 < 8000h )
CPU clears bits 15–0
If ( 8000h < bits 15–0 < 10000h )
CPU adds 8000h to the operand and then clears bits 15–0
If ( bits 15–0 == 8000h )
If bits 31–16 contain an odd value
CPU adds 8000h to the operand and then clears bits 15–0
If bits 31−16 contain an even value
CPU clears bits 15−0
If you need compatibility with TMS320C54x DSP code, then ensure RDM = 0
and C54CM = 1. When C54CM = 1 (C54x DSP-compatible mode enabled),
the following instructions do not clear bits 15–0 of the result after the rounding:
You can clear and set RDM with the following instructions:
bit(ST2, #ST2_RDM) = #0 ; Clears RDM bit
bit(ST2, #ST2_RDM) = #1 ; Sets RDM bit
This bit indicates whether the CPU is in byte or word-pointer mode (see Sec-
tion 3.1 for more details on data memory space referencing in both modes).
BPTR Description:
0 The CPU is in word-pointer mode:
Data memory locations are referenced by the A unit with 23-bit
effective word-addresses.
1 The CPU is in byte-pointer mode:
Data memory locations are referenced by the A unit with 24-bit
effective byte-addresses.
The following are the main points about the BPTR bit:
During a hardware or software reset, the bit 24 content of the 32-bit vector
location is copied into the BPTR bit, and reflects the default pointer mode
value of the CPU. When a software or hardware interrupt, or a software
trap() is taken, the CPU switches to this default pointer mode and executes
the corresponding ISR.
You can only switch byte- or word-pointer mode during the following un-
conditional function call (no other instruction can modify this bit):
call ACa || to_word ; Switches to word pointer mode
call L16 || to_word ; Switches to word pointer mode
call P24 || to_word ; Switches to word pointer mode
call ACa || to_byte ; Switches to byte pointer mode
call L16 || to_byte ; Switches to byte pointer mode
call P24 || to_byte ; Switches to byte pointer mode
When the CPU switches from one pointer mode to the other:
If BPTR is 1 (byte-pointer mode) and becomes 0 at the function call,
then the XSP/XSSP registers are shifted right by 1
If BPTR is 0 (word-pointer mode) and becomes 1 at the function call,
then the XSP/XSSP registers are shifted left by 1
If the BPTR bit status doesn’t change after using any of these instruc-
tions, then the shift on XSP/XSSP register doesn’t happen
When the CPU follows an interrupt or calls a function, BPTR bit is saved
in CFCT register at bit position 4 (see Section 2.7.1 for more details on the
CFCT register). When the CPU returns from an interrupt or a called sub-
routine, the BPTR bit value is restored from the CFCT register.
To clear (or flush) the instruction cache (invalidate all lines of its data arrays),
set the CACLR bit. You can set CACLR using the following instruction:
Once set, CACLR remains 1 until the flush process is complete, at which time
CACLR is automatically reset to 0. Therefore, you can poll CACLR to get the
status:
CACLR Description
0 The cache flush process is completed
1 The cache flush process is not completed. All cache blocks are invalid.
The number of cycles required to flush the cache depends on the
memory architecture. When the cache is flushed, the content of the
prefetch queue in the instruction buffer unit is automatically flushed.
When the cache is disabled by clearing the CAEN bit, the content of the
I unit instruction buffer queue is automatically flushed.
You can clear and set CAEN using the following instructions
CAFRZ enables you to lock the instruction cache, so that its contents are not
updated on a cache miss but are still available for cache hits. The contents of
the cache remain undisturbed until CAFRZ is cleared.
CAFRZ Description
0 The cache is in its default operating mode.
1 The cache is frozen (the cache content is locked).
You can clear and set CAFRZ using the following instructions:
bit(ST3, #ST3_CAFRZ) = #0 ; Clears CAFRZ bit
bit(ST3, #ST3_CARFZ) = #1 ; Sets CAFRZ bit
The CBERR bit is set when an internal bus error is detected. This error causes
the CPU to set the bus error interrupt flag (BERRINTF) in interrupt flag register
1 (IFR1). A bit in BER register is also set to identify the source of the bus error
interrupt.
Writing a 1 to the CBERR bit has no effect. This bit is 1 only if an internal
bus error has occurred.
The interrupt service routine for the bus error interrupt (BERRINT) must
clear the CBERR bit before it returns control to the interrupted program
code:
bit(ST3, #ST3_CBERR) = #0 ; Clears CBERR bit
Note:
When a bus error occurs, the functionality of the instruction that caused the
error, and of any instruction executed in parallel, can not be assured.
When CLKOFF = 0, the CLKOUT pin is enabled; the associated clock signal
appears on the pin. When CLKOFF = 1, the CLKOUT pin is disabled.
You can clear and set CLKOFF with the following instructions:
bit(ST3, #ST3_CLKOFF) = #0 ; Clears CLKOFF bit
bit(ST3, #ST3_CLKOFF) = #1 ; Sets CLKOFF bit
Use the HINT bit to send an interrupt request to a host processor by way of the
host port interface. You produce an active-low interrupt pulse by clearing and
then setting the HINT bit:
bit(ST3, #ST3_HINT) = #0 ; Clears HINT bit
bit(ST3, #ST3_HINT) = #1 ; Sets HINT bit
Note:
The HINT bit is not used for all C55x+ DSP host port interfaces (HPIs). Con-
sult the documentation for the specific C55x+ DSP.
The reset value of the MPNMC bit may be dependent on the state of prede-
fined pins at reset. To check this for a particular C55x+ DSP, see its data
manual.
The software reset instruction does not affect the MPNMC bit.
You can clear and set MPNMC using the following instructions:
bit(ST3, #ST3_MPNMC) = #0 ; Clears MPNMC bit
bit(ST3, #ST3_MPNMC) = #1 ; Sets MPNMC bit
An instruction that changes the MPNMC bit must not be followed too
closely by a branch instruction. Otherwise, the CPU may use the old
MPNMC value and, as a result, fetch the next instruction from the incorrect
memory location. The minimum number of instruction cycles needed to
separate an MPNMC-update instruction and a branch instruction depends
on the type of branch instruction used. Table 2−11 divides branch instruc-
tions into three categories, and Table 2−12 shows the minimum number
of separation cycles needed for each category.
goto P24 if (cond) return (when slow return selected) call ACa
call L16
call P24
Consider the following example in which the bit set instruction changes
MPNMC. Table 2−11 specifies CALL as a category I branch instruction.
Table 2−12 indicates that six cycles are needed between the bit set MPNMC
instruction and a category I branch instruction. In this example, the six cycles
are provided by inserting six nop (no operation) instructions. Other instructions
could be placed here instead.
bit(ST3, #ST3_MPNMC) = #1 ;Sets MPNMC bit
nop
nop
nop
nop
nop
nop
call #Subroutine
The SATA bit determines whether the CPU saturates the results of computa-
tion in the A unit which overflowed:
SATA Description
0 Saturation mode in the A unit is Off. No saturation is performed.
1 Saturation mode in the A unit is On. If a calculation in the A-unit ALU
results in an overflow, the result is saturated to 7FFFh (for overflow
in the positive direction) or 8000h (for overflow in the negative direc-
tion).
You can clear and set SATA with the following instructions:
bit(ST3, #ST3_SATA) = #0 ; Clears SATA bit
bit(ST3, #ST3_SATA) = #1 ; Sets SATA bit
You can clear and set SMUL with the following instructions:
bit(ST3, #ST3_SMUL) = #0 ; Clears SMUL bit
bit(ST3, #ST3_SMUL) = #1 ; Sets SMUL bit
In the C54x DSP-compatible mode (C54CM = 1), the execution of some accu-
mulator-store instructions is affected by SST. When SST is 1, the 40-bit accu-
mulator value is saturated to a 32-bit value before the store operation. If the
accumulator value is shifted, then the CPU performs the saturation after the
shift.
If C54CM = 0: The CPU ignores SST. The instruction syntax alone determines
whether saturation occurs or not.
You can clear and set SST with the following instructions:
bit(ST3, #ST3_SST) = #0 ; Clears SST bit
bit(ST3, #ST3_SST) = #1 ; Sets SST bit
Topic Page
3-1
Memory Map
Figure 3−1 illustrates how generated addresses are carried to the address
buses in word- and byte-pointer modes.
Data address buses BAB, CAB, DAB, EAB, FAB (each 24 bits)
Shift by 1 to MSBs
<< << <<
When BPTR is set to 0, word-pointer mode
X Y C
Three 24-Bit
AU DAGENS
C55x+ data memory addressing model is a flat (linear) 24-bit data memory ad-
dressing model with addresses going from:
00 0000h to 7F FFFFh in word-pointer mode
00 0000h to FF FFFFh in byte-pointer mode.
C55x+ addressing mode provides the ability to address applications with data
tables that are greater than 64 Kwords in length, and/or with data tables which
span over 64-Kword blocks.
In word-pointer mode, the first 96 addresses of data memory space are re-
served for the memory-mapped registers (MMRs). These reserved address
are going from:
00 0000h to 00 0005Fh in word-pointer mode, and
00 0000h to 00 00BFh in byte-pointer mode.
To see how the addresses are divided between internal memory and external
memory, and for the details regarding internal memory, see the data manual
for your C55x+ DSP.
Byte addresses Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7
00 0100h−00 0107h
Byte addresses Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7
When the CPU executes a discontinuity, the address written to the program
counter (PC) can be greater than or equal to the fetch address. The PC
address and the fetch address are the same only if the three LSBs of the PC
address are 0s. Consider the following assembly code segment, which calls
a subroutine:
call(#subroutineB)
Byte addresses Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7
At the functional call, the PC contains 00 0106h, but the program-read address
bus (PAB) carries the byte address at the immediate lower or equal 8-byte
aligned address: 00 0100h. The CPU reads 8-byte fetch packets of code
beginning at address 00 0100h. Instruction C is the first instruction executed.
In word-pointer mode, the CPU uses word addresses (see Section 3.3.1) to
read or write 8-bit, 16-bit, or 32-bit values (see Section 3.3.2). The address that
needs to be generated for a particular value depends on how it its stored within
the word boundaries in data space (see Section 3.3.3). The CPU supports data
read and write accesses to strongly ordered areas (see Section 4.3.4).
Refer to Chapter 7, Section 1.3 for more details on data space accesses in
byte-pointer mode.
00 0100h−00 0101h
The address buses carry 24-bit byte addresses. In word-pointer mode, when
the CPU reads from or writes to data space, the 23-bit effective word address
is shifted to the MSBs by one bit to give the equivalent 24-bit byte address. For
example, suppose an instruction reads a word at the 23-bit word address
00 0102h. The appropriate data-read address bus carries the 24-bit value
00 0204h, which is the 23-bit word address shifted to the MSBs by one bit.
Data-read address bus value: 0000 0000 0000 0010 0000 0100
byte 8 bits
word 16 bits
Dedicated instruction syntaxes (see Table 3−1) allow you to select high or low
bytes of particular words. The byte-load instructions read bytes and load them
into registers. The bytes that are read are zero extended (if the uns() operand
qualifier is used) or sign extended before being stored. The byte-store instruc-
tions store the 8 least significant bits of a register to a specified byte in memory.
Note:
In data space, when the CPU is in word-pointer mode, it uses 23-bit effective
addresses to access words. In that mode, to access a byte, the CPU must
manipulate the word that contains the byte.
When the CPU accesses long words, the address used for the access is the
address of the most significant word (MSW) of the 32-bit value. The address
of the least significant word (LSW) depends on the address of the MSW:
If the address of the MSW is even, then the LSW is accessed at the next
address. For example:
Word addresses
00 0100h−00 0101h MSW LSW
If the address of the MSW is odd, then the LSW is accessed at the previous
address. For example:
Word addresses
00 0100h−00 0101h LSW MSW
Given the address of the MSW (LSW), complement its least significant bit to
find the address of the LSW (MSW).
To access a long word, you must reference its most significant word
(MSW). C is accessed at address 00 0102h. D is accessed at address
00 0105h.
Word addresses are also used to access bytes in data space. For
example, the address 00 0107h is used for both F (high byte) and G (low
byte). Specific byte instructions indicate whether the high byte or low byte
is accessed.
00 0106h−00 0107h E F G
Depending on the memory configuration of your DSP subsystem, you can de-
fine some so-called strongly ordered memory areas inside the 16M-byte data
space. In this document these memory areas are called xI/O space. The xI/O
memory accesses made to xI/O space are fully ordered and pipeline protected
from any other memory accesses occurring in the pipeline.
Table 3−2 illustrates how a memory read instruction that follows a memory
write instruction is executed in C55x+ pipeline when all memory accesses are
performed in regular data memory space. (Refer to Section 1.7 for the pipeline
description.)
Table 3−3 illustrates how a memory read instruction that follows a memory
write instruction is executed in C55x+ pipeline when a memory read is per-
formed in xI/O space (xI/O read).
Instruction 1 ... X2 W1 W2 W3
Pipeline Phases
For I/O space, the CPU uses the data-read bus DB for reads and data-write
bus EB for writes.
When the CPU is in word-pointer mode, the behavior is similar to the one ex-
plained in Section 3.1:
When the CPU reads from or writes to I/O space, the 16-bit word I/O ad-
dress is concatenated with leading 0s and shifted to the MSBs by 1 before
being posted on the address buses. For example, suppose an instruction
reads at the 16-bit word address 0102h. DAB carries the 24-bit value
00 0204h.
When the CPU is in byte-pointer mode, the behavior is similar to the one ex-
plained in Section 3.1:
When the CPU reads from or writes to I/O space, the 17-bit byte I/O ad-
dress is concatenated with leading 0s, and posted as it is on the address
buses. For example, suppose an instruction writes at the 17-bit byte ad-
dress 0102h. DAB carries the 24-bit value 00 0102h.
Stack Operation
This chapter introduces the two stacks located on C55x+ DSP. It also explains
how they relate to each other and how they are used by the CPU during auto-
matic context switching (saving register values before executing an interrupt
or a subroutine and restoring those values when the return from interrupt or
subroutine is executed).
Topic Page
4-1
Introduction to Data and System Stacks
The following sections describe the above four stack modes in detail.
Figure 4−1 illustrates the extended stack pointers XSP and XSSP.
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ
ÁÁÁÁÁÁÁÎÎÎÎÎÎÎÎÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ 23−16 15−0
ÁÁÁÁÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ
XSP
ÁÁ SPH SP
ÁÁÁÁÁÁÁÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
XSSP
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
SSPH SSP
You can select a specific stack configuration and the default pointer mode by
placing the appropriate values in bits 24, 28, 29, and 30 of the 32-bit reset vec-
tor location. This can be accomplished in C55x+ DSP assembly code as part
of the .ivec assembler directive. This directive is described in the C55x+ As-
sembly Language User Guide (TI lit ###). The 24 LSBs of the reset vector loca-
tion must be the start address of the reset interrupt service routine (ISR).
Dual 16-bit The data stack and the system stack can X110 XXX0: X110 XXX1:
stack with fast be allocated independently and anywhere (24-bit ISR address) (24-bit ISR address)
return in memory.
The data stack and the system stack are
independent: When you access the data
stack, XSP register is modified, but XSSP
register is not.
The registers RETA and CFCT implement
a fast return (see Figure 4−3).
Dual 16-bit The data stack and the system stack X010 XXX0: N/A
stack with fast must be allocated in the same 64-Kword (24-bit ISR address)
return data page.
The data stack and the system stack are
accessed independently: when you ac-
cess the data stack, XSP register is modi-
fied, but XSSP register is not is not.
The registers RETA and CFCT implement
a fast return (see Figure 4−3).
Dual 16-bit The data stack and the system stack X011 XXX0: N/A
stack with slow must be allocated in the same 64-Kword (24-bit ISR address)
return data page.
The data stack and the system stack are
accessed independently: when you ac-
cess the data stack, XSP register is modi-
fied, but XSSP register is not.
RETA and CFCT are not used (see
Figure 4−2).
32-bit stack with The data stack and the system stack X001 XXX0: N/A
slow return must be allocated in the same 64-Word (24-bit ISR address)
data page.
The data stack and the system stack act
as a single 32-bit stack: When you access
the data stack, XSP and XSSP registers
are modified by the same increment.
RETA and CFCT are not used (see
Figure 4−2).
The following sections introduce the main difference between the two stack
addressing modes: the 24-bit linear-stack mode and the 64-Kword paged-
stack mode. (Refer to Section 7.2 for the differences occurring in byte-pointer
mode.)
When the 24-bit linear-stack mode is selected, the XSP and XSSP registers
are completely independent, meaning that SPH and SSPH can have different
values.
You can allocate the data and system stacks independently from each other
and anywhere in the data space. As mentioned in Section 2.6.7, the C55x+
DSP has a 24-bit flat data addressing mechanism. This allows each stack to
span over the 64-Kword data page boundaries, and to have a size greater than
64 Kwords.
Note:
When the CPU is in word-pointer mode, an increment past 7F FFFFh or a
decrement past 00 0060h causes the stack pointer to overflow out of legal
data memory locations; do not make use of this behavior, it is not supported.
The C55x+ features the 64-Kword paged-stack mode in order to emulate the
C55x DSP generations stack behavior.
When the 64-Kword paged-stack mode is selected, SPH and SSPH must have
the same values, meaning that XSP and XSSP registers are not independent.
You must allocate the data and system stack in the same 64-Kword data page.
The stack size is limited to 64 Kwords.
Note:
On C55x DSP generation, (conditional) call, intr(), trap(), (conditional) return,
push(), and pop() instructions are not expected to change the value of SPH.
If not, a stack overflow beyond a 64-Kword page boundary occurs; do not
make use of this behavior, it is not supported.
PC holds the 24-bit address of the 1 to 16 bytes of code being decoded in the
I unit. When the CPU performs an interrupt or call, the current PC value (the
return address) is stored and the PC is loaded with the start address of the in-
terrupt service routine or called routine. When the CPU returns from the rou-
tine, the return address is transferred back to PC so that the interrupted pro-
gram sequence can continue as before.
An 8-bit loop context register keeps a record of active repeat loops (the loop
context). When the CPU performs an interrupt or call, the current loop context
is stored and the 8-bit register is cleared to create a new context for the subrou-
tine. When the CPU returns from the subroutine, the loop context is transferred
back to the 8-bit register.
In the slow-return process, the return address and the loop context are stored
to the stacks (in memory). When the CPU returns from a subroutine, the speed
at which these values are restored is dependent on the speed of the memory
accesses.
In the fast-return process, the return address and the loop context are saved
to registers, so that these values can always be restored quickly. These special
registers are the return address register (RETA) and the control-flow context
register (CFCT). You can read from or write to RETA and CFCT as a pair with
dedicated, 32-bit, load and store instructions.
Figure 4−2 (slow return) and Figure 4−3 (fast return) show examples of how
the return address and the loop context are handled within several layers of
routines. In these figures, Routine 0 is the highest level routine, Routine 1 is
nested inside Routine 0, and Routine 2 is nested inside Routine 1.
Figure 4−2. Return Address and Loop Context Passing During Slow-Return Process
Execute Routine 0
On top of stacks:
Return address of Routine 1
Loop context of Routine 1
Execute Routine 0
RETA: X
CFCT: Y
Before beginning an interrupt service routine (ISR) or a called routine, the CPU
automatically saves certain values. The CPU can use these values to reestab-
lish the context of the interrupted program sequence when the subroutine is
finished.
Whether responding to an interrupt or a call, the CPU saves the return ad-
dress, the loop context bits, the pointer mode bit (BPTR). The return address,
taken from the program counter (PC), is the address of the instruction to be
executed when the CPU returns from the subroutine. The loop context bits are
a record of the type and status of repeat loops that were active when the inter-
rupt or call occurred. The pointer mode bit is record indicating whether the CPU
was executing in byte- or word-pointer mode when the interrupt or call oc-
curred. When responding to an interrupt, the CPU additionally saves status
registers 0, 1, and 2 and the debug status register (DBSTAT). DBSTAT is a
DSP register that holds debug context information used during emulation.
If the selected stack configuration (see Section 4.2) uses the fast-return pro-
cess, then RETA is used as a temporary storage place for the return address,
and CFCT is used as a temporary storage place for the loop context bits and
the pointer-mode bit. If the selected stack configuration uses the slow-return
process, then the return address, the loop context bits, and the pointer-mode
bit are saved to and restored from the stack.
1) Saves CFCT and RETA to the system stack and the data stack in parallel,
as shown below. For each stack, the CPU decrements the stack pointer
(XSSP or XSP) by 1 before the write to the stack.
After After
→ XSSP = x − 1 CFCT:RETA(23−16) → XSP = y − 1 RETA(15−0)
Save Save
Before Before
→ XSSP = x Previously saved data → XSP = y Previously saved data
Save Save
2) Saves the return address to RETA and saves loop context flags, as well
as the pointer mode bit in CFCT (see below).
A return instruction at the end of a subroutine forces the CPU to restore values
in the opposite order. First, the CPU transfers the return address from RETA
to PC and restores its loop context flags as well as its pointer mode bit from
CFCT. Second, the CPU reads the CFCT and RETA values from the stacks
in parallel. For each stack, the CPU increments the stack pointer (XSSP or
XSP) by 1 after the read from the stack.
1) Saves ST2, ST0, ST1, DBSTAT, and CFCT registers to the data and sys-
tem stacks in parallel, as shown below. For each stack, the CPU decre-
ments the stack pointer (XSSP or XSP) by 1 before each write to the stack.
Note:
DBSTAT (the debug status register) holds debug context information used
during emulation. Make sure the ISR does not modify the value that will be
returned to DBSTAT.
2) Saves the return address (from PC) to RETA, and saves loop context flags
as well as the pointer mode bit in CFCT (see below).
After After
→ XSSP = x − 1 (Ctrl. bits):PC(23−16) → XSP = y − 1 PC(15−0)
Save Save
Before Before
→ XSSP = x Previously saved data → XSP = y Previously saved data
Save Save
A return instruction at the end of a subroutine forces the CPU to restore the
return address, the loop context, as well as the pointer mode from the stack.
For each stack, the CPU increments the stack pointer (XSSP or XSP) by 1 after
the read from the stack.
Note:
DBSTAT (the debug status register) holds debug context information used
during emulation. Ensure the ISR does not modify the value that will be re-
turned to DBSTAT.
This chapter describes the available interrupts of the C55x+ DSP, how some
of them can be blocked through software, and how all of them are handled by
the CPU. This chapter also explains the automatic effects of two types of reset
operations, one initiated by hardware and one initiated by software.
Topic Page
5-1
Introduction to the Interrupts
Interrupts are hardware- or software-driven signals that cause the DSP to sus-
pend its current program sequence and execute another task called an inter-
rupt service routine (ISR). The C55x+ DSP supports 32 ISRs. Some of the
ISRs can be triggered by software or hardware; others can be triggered only
by software. When the CPU receives multiple hardware interrupt requests at
the same time, the CPU services them according to a predefined priority rank-
ing (see Section 5.2).
All C55x+ DSP interrupts, whether hardware or software, can be placed in one
of two categories. Maskable interrupts can be blocked (masked) through soft-
ware. Nonmaskable interrupts cannot be blocked. All software interrupts are
nonmaskable.
3) Prepare for the interrupt service routine. The main tasks performed by the
CPU are:
Complete execution of the current instruction and flush from the pipe-
line any instructions that have not reached the decode phase.
Automatically store certain register values to the data stack and the
system stack (see Section 4.4).
Automatically set the pointer mode (BPTR bit of ST3 register) to the
CPU default pointer mode in bit 24 of the 32-bit reset vector location
(see Section 5.2).
Fetch the interrupt vector that you store at a preset vector address.
The interrupt vector points to the interrupt service routine.
1) Execute the interrupt service routine. The CPU executes the ISR that you
have written. The ISR is concluded with a return-from-interrupt instruction,
which automatically restores the register values that were automatically
saved (see Section 4.4).
Notes:
1) External interrupts must occur at least 3 cycles after the CPU exits reset
or they will not be recognized.
2) All interrupts (maskable and nonmaskable) are disabled following a
hardware reset, regardless of the setting of the INTM bit and the IER0
and IER1 registers. Interrupts will remain disabled until the stack point-
ers are initialized by a software write to each pointer (the XSP and XSSP
registers). After stack initialization, the INTM bit and the IER0 and IER1
registers determine interrupt enabling.
3) The interrupt service routine pointer mode (word- or byte-pointer mode)
is the pointer mode defined at hardware or software reset time.
You must write the desired interrupt vectors (ISR start address) at the vector
addresses. Each interrupt vector must contain 8 bytes. Byte 0 of the reset vec-
tor contains the setting for the stack mode, and the default pointer mode. Byte
0 of the remaining vectors is ignored. Bytes 1−3 encode the 24-bit byte ad-
dress of the interrupt service routine (ISR).
IVPD points to the 256-byte program page for interrupt vectors 0–31. See Sec-
tion 2.8.1 for a detailed description of this register.
The ISRs for the maskable interrupts can also be executed by software (see
Section 5.4).
Note:
When a bus error occurs, the functionality of the instruction that caused the
error, and of any instruction executed in parallel, cannot be assured.
IER0 and IER1 Interrupt enable registers. Each maskable interrupt has an
enable bit in one of these two registers (see Section 2.8.3).
DBIER0 and DBIER1 Debug interrupt enable registers. Each maskable interrupt
can be defined as time-critical by a bit in one of these two
registers (see Section 2.8.4).
As shown in the next two sections, the roles of INTM, the IER bit, and the
DBIER bit depend on the operating condition of the DSP.
No
Interrupt enabled in
IER?
Yes
No
INTM = 0?
Yes
Restore context
Program continues
Table 5−3. Steps in the Standard Process Flow for Maskable Interrupts
Step Description
Set corresponding When the CPU detects a valid maskable interrupt request, it sets and latches the corre-
IFR flag sponding flag in one of the interrupt flag registers (IFR0 or IFR1). This flag stays latched
until the interrupt is acknowledged or until the flag is cleared by software or by a DSP hard-
ware reset (see Section 2.8.2).
Interrupt enabled in The CPU cannot acknowledge the interrupt unless the corresponding enable bit is 1 in
IER? one of the interrupt enable registers (IER0 or IER1) (see Section 2.8.3).
INTM = 0? The CPU cannot acknowledge the interrupt unless the interrupt mode bit (INTM) is 0. That
is, interrupts must be globally enabled (see Section 2.10.2.8).
Branch to interrupt The CPU follows the interrupt vector to the interrupt service routine. While branching, the
service routine CPU performs the following actions:
It completes instructions that have already made it to the decode phase of the pipe-
line. Other instructions are flushed from the pipeline.
It clears the corresponding flag in IFR0 or IFR1 to indicate that the interrupt has been
acknowledged.
It saves the interrupt service routine (ISR) number into the IIR register (see Section
2.8.5).
It saves certain registers values automatically, to record important mode and status
information about the interrupted program sequence (see Section 4.4).
It creates a fresh context for the ISR by forcing INTM = 1 (globally disables inter-
rupts), DBGM = 1 (disables debug events), and EALLOW = 0 (disables access to
non-CPU emulation registers).
Set the pointer mode (BPTR) to the CPU default pointer mode.
Execute interrupt The CPU executes the interrupt service routine (ISR) that you have written for the ac-
service routine knowledged interrupt. Some registers values were saved automatically during the branch
to the ISR. A return-from-interrupt instruction at the end of your ISR will force an automatic
context restore operation (see Section 4.4) to restore these register values. If the ISR
shares other registers with the interrupted program sequence, then the ISR must save
other register values at the beginning of the ISR and restores these values before return-
ing to the interrupted program sequence.
Program continues If the interrupt request is not properly enabled, then the CPU ignores the request and the
program continues uninterrupted. If the interrupt is properly enabled, then its interrupt ser-
vice routine is executed and the program continues from the point where it was inter-
rupted.
No
Interrupt enabled in
IER?
Yes
No
Interrupt enabled in
DBIER?
Yes
Restore context.
Program continues
Set correspond- When the CPU detects a valid maskable interrupt request, it sets and latches the corre-
ing IFR flag sponding flag in one of the interrupt flag registers (IFR0 or IFR1). This flag stays latched
until the interrupt is acknowledged, or until the flag is cleared by software or by a DSP
hardware reset (see Section 2.8.2).
Interrupt enabled The CPU cannot acknowledge the interrupt unless the corresponding enable bit is 1 in
in IER? one of the interrupt enable registers (IER0 or IER1) (see Section 2.8.3).
Interrupt enabled The CPU cannot acknowledge the interrupt unless the corresponding enable bit is 1 in
in DBIER? one of the debug interrupt enable registers (DBIER0 or DBIER1) (see Section 2.8.4).
Branch to The CPU follows the interrupt vector to the interrupt service routine. While branching, the
interrupt service CPU performs the following actions:
routine
It completes instructions that have already made it to the decode phase of the pipeline.
Other instructions are flushed from the pipeline.
It clears the corresponding flag in IFR0 or IFR1 to indicate that the interrupt has been
acknowledged.
It saves the interrupt service routine (ISR) number into IIR register (see Section 2.8.5).
It saves certain registers values automatically to record important mode and status infor-
mation about the interrupted program sequence (see Section 4.4).
It creates a fresh context for the ISR by forcing INTM = 1 (globally disables interrupts),
DBGM = 1 (disables debug events), and EALLOW = 0 (disables access to non-CPU
emulation registers).
Set the pointer mode (BPTR) to the CPU default pointer mode.
Execute interrupt The CPU executes the interrupt service routine (ISR) that you have written for the ac-
service routine knowledged interrupt. Some registers values were saved automatically during the branch
to the ISR. A return-from-interrupt instruction at the end of your ISR will force an automat-
ic context restore operation (see Section 4.4) to restore these register values. If the ISR
shares other registers with the interrupted program sequence, then the ISR must save
other register values at the beginning of the ISR and restore these values before return-
ing to the interrupted program sequence.
Program If the interrupt request is not properly enabled, then the CPU ignores the request, and the
continues program continues uninterrupted. If the interrupt is properly enabled, then its interrupt
service routine is executed, and the program continues from the point where it was inter-
rupted.
The hardware interrupt RESET. If you drive the RESET pin low, then you
initiate a DSP hardware reset plus an interrupt that forces execution of the
reset ISR. (Specific effects of a DSP hardware reset are described in
Section 5.5.)
The hardware interrupt NMI. If you drive the NMI pin low, then you force
the CPU to execute the corresponding ISR. NMI provides a general-pur-
pose, hardware method to interrupt the DSP unconditionally.
All software interrupts which are initiated by one of the following instruc-
tions.
Instruction Description
intr(#k5) You can initiate any of the 32 ISRs with this instruction. The
variable k5 is a 5-bit number from 0 to 31. Before executing
the ISR, the CPU performs an automatic context save (to save
important register values) and sets the INTM bit (to globally
disable maskable interrupts).
trap( #k5) This instruction performs the same function as intr(#k5), ex-
cept that it does not affect the INTM and DBGM bits.
Note:
If the interrupt was initiated by a trap instruction, then the INTM and DBGM
bits are not affected during the branch to the interrupt service routine.
Program continues
Table 5−5. Steps in the Standard Process Flow for Nonmaskable Interrupts
Step Description
Interrupt request sent to CPU The CPU receives a nonmaskable interrupt request.
Branch to interrupt service routine The CPU follows the interrupt vector to the interrupt service routine. While
branching, the CPU performs the following actions:
It completes instructions that have already made it to the decode
phase of the pipeline. Other instructions are flushed from the pipeline.
It saves certain registers values automatically, to record important
mode and status information about the interrupted program sequence
(see Section 4.4).
It creates a fresh context for the ISR by forcing INTM = 1 (globally dis-
ables interrupts), DBGM = 1 (disables debug events), and
EALLOW = 0 (disables access to non-CPU emulation registers).
Sets the pointer mode (BPTR) to the CPU default pointer mode.
Execute interrupt service routine The CPU executes the interrupt service routine (ISR) that you have writ-
ten for the acknowledged interrupt. Some registers values were saved
automatically during the branch to the ISR. A return-from-interrupt in-
struction at the end of your ISR will force an automatic context restore
operation (see Section 4.4) to restore these register values. If the ISR
shares other registers with the interrupted program sequence, then the
ISR must save other register values at the beginning of the ISR and
restore these values before returning to the interrupted program se-
quence.
Program continues After the interrupt service routine is executed, the program continues
from the point where it was interrupted.
Section 5.5.1 describes the DSP hardware reset, and Section 5.5.2 describes
the DSP software reset. Table 5−6 summarizes the effects of both types of
reset on the CPU registers.
Note:
A hardware reset loads the interrupt vector pointer called IVPD with FFFFh
and, thus, forces the CPU to fetch the reset vector from program address
FF FF00h. During a software reset, IVPD remains unchanged; the CPU
fetches the reset vector using the current IVPD value.
ST2_55 0: AR0LC 0 0 AR0 is used for linear addressing (rather than circular ad-
dressing).
1: AR1LC 0 0 AR1 is used for linear addressing.
2: AR2LC 0 0 AR2 is used for linear addressing.
3: AR3LC 0 0 AR3 is used for linear addressing.
4: AR4LC 0 0 AR4 is used for linear addressing.
5: AR5LC 0 0 AR5 is used for linear addressing.
6: AR6LC 0 0 AR6 is used for linear addressing.
7: AR7LC 0 0 AR7 is used for linear addressing.
8: CDPLC 0 0 AR15 is used for linear addressing.
9: GOVF 0 0 GOVF is used for global overflow detected in any destina-
tion accumulator (AC0−AC15)
10: RDM 0 0 When an instruction specifies that an operand must be
rounded, the CPU uses rounding to the infinite (rather than
rounding to the nearest).
11: EALLOW 0 0 A program cannot write to the non-CPU emulation registers.
12: DBGM 1 1 Debug events are disabled.
13–14: Reserved NA NA
15: ARMS This bit has no effect in C55x+ revision
ST3_55 0: SST 0 † In the TMS320C54x DSP-compatible mode (C54CM = 1),
the execution of some accumulator-store instructions is af-
fected by SST. When SST is 0, the 40-bit accumulator value
is not saturated to a 32-bit value before the store operation.
1: SMUL 0 † The results of multiplications will not be saturated.
2: CLKOFF 0 † The output of the CLKOUT pin is enabled; it reflects the
CLKOUT clock signal.
3: BPTR config- config- When this flag is cleared, the CPU is in word-pointer mode
uration uration (rather than byte-pointer mode).
regis- regis-
ter val- ter val-
ue ue
4: Reserved NA NA
5: SATA 0 0 The CPU will not saturate overflow results in the A unit.
6: MPNMC pins † The reset value of MPNMC may be dependent on the state
of predefined pins at reset. To check this for a particular
C55x+ DSP, see its data manual.
† Not affected by a software reset
Table 5−6 summarizes the effects of a DSP hardware reset on DSP registers.
A software reset (see Section 5.5.2) performs a subset of these register modifi-
cations.
The RESET pin must be asserted for certain number of clock cycles (refer to
applicable data manual). If the RESET pin is asserted and deasserted while
the DSP is stopped for emulation purposes, then the reset is ignored.
Notes:
1) External interrupts must occur at least 3 cycles after the CPU exits reset
or they will not be recognized.
2) All interrupts (maskable and nonmaskable) are disabled following a
hardware reset. Interrupts will remain disabled until the stack pointers
are initialized by a software write to each pointer (the XSP and XSSP
registers). After stack initialization, the INTM bit and the IER0 and IER1
registers determine interrupt enabling.
When reading the reset interrupt vector, the CPU uses bits 24, 28, 29, and 30
of the 32-bit reset vector location to determine which stack configuration and
default pointer mode to use (see Section 7.2 for more details).
Addressing Modes
This chapter describes the modes available for addressing the data space
(including CPU registers) and the I/O space of the TMS320C55x+ (C55x+)
DSPs in word-pointer.
Topic Page
6-1
Important Note on Word-Pointer Mode Address Computation
Before being posted on the data address buses, the generated addresses are
shifted to the MSBs by one bit to produce the equivalent 24-bit byte address.
This operating mode enables the C55x+ CPU to recompile and execute C55x
DSP generation codes which uses the full range of its 23-bit word addressable
data space.
Note that this is the user’s responsibility to ensure that, in word-pointer mode,
the 24th bit of the effective word address generated by the user’s program is
set to 0; in case it is not, the CPU behavior is undefined.
The I/O absolute, direct, and indirect addressing modes are detailed in Sec-
tion 6.8.
Note:
Be aware that certain parallel instructions perform several operations that
may need to make up to three data memory accesses within the same cycle.
These instructions will not be executed in one cycle, unless the memory ac-
cesses are adequately performed across different memory regions: banked
SARAM or SARAM blocks regions. Refer to your DSP memory subsystem
documentation for more details on your DSP internal memory structure.
Syntax
Element(s) Description
Smem When an instruction syntax contains the Smem operand, that instruction can access a single word
dbl(Smem) (16 bits) of data from data memory, I/O − xI/O spaces, a memory-mapped register, or a C55x+
HI(Smem) register. When an instruction syntax contains the dbl(Smem) operand or HI(Smem)/LO(Smem)
LO(Smem) operand, that instruction can access a long word (32 bits) of data from data memory, xI/O space,
a memory-mapped register, or a C55x+ register. As you write the instruction, replace Smem,
dbl(Smem), or HI(Smem)/LO(Smem) with a compatible addressing-mode operand.
Xmem When an instruction contains the Xmem and Ymem operands, that instruction can perform two
Ymem simultaneous 16-bit accesses to data memory. As you write the instruction, replace Xmem and
dbl (Ymem) Ymem operands with compatible addressing modes operands.
Cmem When an instruction contains the Cmem or HI(Cmem)/LO(Cmem) operand, that instruction can
HI(Cmem) access, respectively, a single word (16 bits) or a double word (32 bits) of data from memory. As
LO(Cmem) you write the instruction, replace the Cmem or HI(Cmem)/LO(Cmem) operand with a compatible
addressing mode operand.
NOTE 1: In C55x DSP generations, Cmem limits the addressing modes to 4 possibilities (each
one using indirect addressing mode with the XCDP register only). In the C55x+ DSP, the XCDP
register is mapped to the XAR15 register, and the Cmem addressing mode possibilities are
identical to the Xmem and Ymem addressing mode possibilities. You can chose from any of the
16 address registers with any of the 8 address register modifiers.
NOTE 2: The dbl(Ymem) operand is a 32-bit memory operand. This operand can be used only
in the following instruction:
dbl(Ymem) = dbl(Smem)
dbl(Smem) = dbl(Ymem)
Baddr When an instruction contains the Baddr operand, that instruction can access one or two bits in
an accumulator (AC0–AC15), an auxiliary register (AR0–AR15), or a temporary register (T0–T3).
Only the register bit test/set/clear/complement and bit field extract/insert instructions support the
Baddr operand. As you write one of these instructions, replace the Baddr operand with a
compatible addressing mode operand.
k16 absolute This mode uses the 8-bit register called DPH (high part of the extended data 6.3.1
page register XPD) and a 16-bit unsigned constant to form a 24-bit
data-space address. This mode can access a memory location or a
memory-mapped register.
k2 absolute This mode enables you to specify a full address as a 24-bit unsigned 6.3.2
constant. This mode can access a memory location or a memory-mapped
register.
Note that:
For k16 absolute addressing mode, although the generated address can
be 24 bits wide in word-pointer mode, only the 23 LSBs generate the 23-bit
effective word address.
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
Note that:
For k24 absolute addressing mode, although the generated address can
be 24 bits wide in word-pointer mode, only the 23 LSBs generate the 23-bit
effective word address.
000000h ......
.........7F FFFFh
Addressing
Mode Description See Section
Note:
In C55x DSP generations, the XSP and XDP addressing modes are mutually
exclusive and dependent on the CPL bit in status register ST1_55.
The C55x+ DSP does not have this dependency in order to improve the C
compiler efficiency: all direct addressing modes are independent of the CPL
status bit value.
When using this addressing mode, Daddr together with the .dp assembler di-
rective are used by the assembler to compute the 7-bit constant Doffset which
is encoded in the instruction. Figure 6−3 shows how, at instruction decoding,
the DSP generates the 24-bit address in the XDP direct addressing mode. It
is the 24-bit sum of two values:
The value in the data page register (XDP). XDP identifies the start address
of a 128-word local data page. This start address can be any address with-
in the 8-Mword data space.
The 7-bit offset (Doffset) calculated by the assembler. See Section 6.4.1.1
for details on the calculation.
To address elements stored in one of the 128-word local data pages, the XDP
direct addressing mode is more efficient than the k16 absolute addressing
mode described in Section 6.3.1 because of the 2-byte extension to the in-
struction which is not needed.
To ensure source code compatibility with the C55x DSPs in the C55x+ DSP,
XDP can be loaded with a single instruction or with 2 instructions loading sepa-
rately the DPH register (8 higher bits of XDP) or the DP register (16 lower bits
of XDP).
Note:
On C55x DSP generations, although an increment past FFFFh or a decre-
ment past 0000h causes the direct address to wrap around, this behavior is
not supported. This type of source code is not executed correctly on the
C55x+ DSP.
000000h.......
XDP 20 FFF0h
.....20 FFFFh
Doffset = 2Fh
21 0000h− ....
(XDP + Doffset) 21 0010h
....7FFFFFh
6.4.1.1 How the Assembler Calculates Doffset for the XDP Direct Addressing Mode
Data memory Doffset = (Daddr – .dp) & 7Fh Daddr is the 24-bit address for the read or write
operation; .dp is a value you assign with the .dp
assembler directive (.dp generally matches XDP);
the symbol & indicates a bitwise AND operation.
The following code example uses XDP direct addressing to access the data
memory:
XDP = #03FFF0h ;For run-time, XDP is 03 FFF0h
.dp = #03FFF0h ;For assembly time, .dp is 03 FFF0h
T2 = @03FFF4h ;Load T2 with the value at address 03 FFF4h
The assembler calculates Doffset:
Doffset = (Daddr – .dp) & 7Fh = (03FFF4h – 03FFF0h) & 7Fh
= 04h
Doffset is encoded in the instruction: T2 = @03FFF4h. At run time, the 24-bit
data-space address is generated:
The assembler syntax of the XSP addressing mode is *SP(#offset) where off-
set is a 7-bit unsigned constant.
When using the XSP direct addressing mode, 24-bit addresses are formed as
shown in Figure 6−4. It is the sum of the XSP value and a 7-bit offset that you
specified in the instruction. The offset can be a value from 0 to 127.
To ensure source code compatibility with C55x DSP generations in the C55x+
DSP, XSP can be loaded with a single instruction or with 2 instructions loading
separately the SPH register (8 higher bits of XSP) or SP (16 lower bits of XSP).
See Chapter 4 for more details on stack modes usage.
Note:
Data space addresses 00 0000h−00 005Fh are reserved for the memory-
mapped registers (MMR). Make sure that the data stack uses only address-
es 00 0060h−07 FFFFh.
000000h.......
XSP 20 FFF0h
.....20 FFFFh
offset = 2Fh
21 0000h− ....
(XSP + offset) 21 001Fh
....7FFFFFh
This addressing mode is a simpler way to access the MMR registers than the
XDP direct addressing mode (see Section 6.4.1) because with the XDP direct
addressing mode, you would need to ensure that:
When using the MMR direct addressing mode, you only need to use the
mmap() qualifier.
When an instruction uses this addressing mode, the mmap() qualifier is en-
coded as a 1-byte extension to the instruction.
The following example accesses the 32 LSBs of the AC2 register with its regis-
ter ID:
AC3 = dbl(mmap(@AC2))
Only the register bit test/set/clear/complement and bit field insert/extract in-
structions support this addressing mode. These instructions enable you to ac-
cess bits only in the accumulators (AC0−AC15), the auxiliary registers
(AR0−AR15), and the temporary registers (T0−T3).
Note:
Unlike the direct operands (@Daddr and *SP(offset)) that access data
memory with Smem and dbl(Smem) syntax elements, the register-bit direct
operand, @bit_position, does not use the XSP and XDP registers for ad-
dress computation. The register-bit direct operand, @bit_position, indicates
directly the address of one bit of data to access.
Dual XAR indirect This mode uses the same address-generation 6.5.2
process as the XAR indirect addressing mode.
This mode is used with an instruction that
accesses two or more data-memory locations at
the same time.
Note:
On C55x DSP generations, the XAR indirect addressing mode is dependent
on the ARMS bit in status register ST2_55. In order to improve the C compiler
efficiency, this dependency is removed in the C55x+ DSP: all XAR indirect
addressing modes are independent of the ARMS status bit value.
A register bit (or bit pair) A bit number, see Section 6.5.1.2
When the XAR indirect addressing mode accesses data space or MMRs, the
selected 24-bit extended auxiliary register, XARn, contains a 23-bit effective
word address.
XARn can be loaded with a single instruction. For circular addressing pur-
poses, ARn (16 lower bits of XARn) can be independently loaded (see Sec-
tion 6.12 for more details on circular addressing). ARnH (8 highest bits of
XARn) cannot be accessed individually.
When the XAR indirect addressing mode accesses a register bit, the selected
24-bit extended auxiliary register, XARn, contains a bit number (see
Figure 6−6). For example, if XAR2 contains 0, then XAR2 points to bit 0, the
least significant bit (LSB) of the register.
Only the register bit test/set/clear/complement and bit field insert/extract in-
structions support this mode. These instructions enable you to access bits in
the accumulators (AC0–AC15), the auxiliary registers (AR0–AR15), and the
temporary registers (T0–T3).
Figure 6−6. Accessing Register Bit(s) With the XAR Indirect Addressing Mode
XARn: M ... 11 10 9 8 7 6 5 4 3 2 1 0
...
MSB Register LSB
Note: Bit address M is 39 or 15, depending on the size of the register.
You can use four temporary registers (T0−T3) as an index in the following
addressing modes: *(ARn+Tx), *(ARn−Tx), and *ARn(Tx)
You can use bit reverse addressing modes *(ARn+T0B) and *(ARn−T0B)
for the FFT algorithm
Table 6−3 introduces all XAR indirect operands. When using the tables, keep
in mind that:
Both pointer modification and address generation are linear or circular ac-
cording to the pointer configuration in status register ST2_55. The content
of the appropriate 16-bit buffer start address register (BSA01, BSA23,
BSA45, or BSA67) is added only if circular addressing is activated for the
chosen pointer.
Note:
Although an increment past 7F FFFFh or a decrement past 00 0000h causes
the indirect address to wrap around, do not make use of this behavior, it is
not supported. Also during circular addressing, the BSAxx addition must not
increment the address beyond 7F FFFFh (see Section 6.12 for more details
on circular addressing).
Table 6−3. Operands for the XAR Indirect Addressing Mode (Continued)
Operand Pointer Modification Supported Access Types
*(ARn + T0/AR0) The 16-bit signed constant in T0 or AR0 Data-memory (Smem, dbl(Smem),
is sign extended to 24 bits and added to HI(Smem)/LO(Smem))
the XARn after the address is gener-
Memory-mapped register
ated:
(Smem, dbl(Smem), HI(Smem)/LO(Smem))
If C54CM = 0: XARn = XARn + T0
If C54CM = 1: XARn = XARn + AR0 Register bit (Baddr)
I/O space (Smem)
xI/O-space (Smem, dbl(Smem),
HI(Smem)/LO(Smem))
*(ARn – T0/AR0) The 16-bit signed constant in T0 or AR0 Data-memory (Smem, dbl(Smem),
is sign extended to 24 bits and sub- HI(Smem)/LO(Smem))
tracted from XARn after the address is
Memory-mapped register
generated:
(Smem, dbl(Smem), HI(Smem)/LO(Smem))
If C54CM = 0: XARn = XARn – T0
If C54CM = 1: XARn = XARn – AR0 Register bit (Baddr)
I/O space (Smem)
xI/O-space (Smem, dbl(Smem),
HI(Smem)/LO(Smem))
Table 6−3. Operands for the XAR Indirect Addressing Mode (Continued)
Operand Pointer Modification Supported Access Types
*(ARn + Tx) The 16-bit signed constant in Tx is sign- Data-memory (Smem, dbl(Smem),
extended to 24 bits and added to XARn HI(Smem)/LO(Smem))
after the address is generated.
Memory-mapped register
XARn = XARn + Tx
(Smem, dbl(Smem), HI(Smem)/LO(Smem))
Register bit (Baddr)
I/O space (Smem)
xI/O-space (Smem, dbl(Smem),
HI(Smem)/LO(Smem))
*(ARn – Tx) The 16-bit signed constant in Tx is sign Data-memory (Smem, dbl(Smem),
extended to 24 bits and subtracted from HI(Smem)/LO(Smem))
XARn after the address is generated.
Memory-mapped register
XARn = XARn – Tx
(Smem, dbl(Smem), HI(Smem)/LO(Smem))
Register bit (Baddr)
I/O space (Smem)
xI/O-space (Smem, dbl(Smem),
HI(Smem)/LO(Smem))
Table 6−3. Operands for the XAR Indirect Addressing Mode (Continued)
Operand Pointer Modification Supported Access Types
*(ARn + T0B/AR0B) The 16-bit signed constant in T0 or AR0 Data-memory (Smem, dbl(Smem),
is sign extended to 24 bits and added to HI(Smem)/LO(Smem))
XARn after the address is generated:
Memory-mapped register
If C54CM = 0: XARn = XARn + T0
(Smem, dbl(Smem), HI(Smem)/LO(Smem))
If C54CM = 1: XARn = XARn + AR0
(Either addition is done with reverse
carry propagation to create bit-reverse
addressing.)
Note: This addressing mode can be
used for FFT buffer elements address-
ing. When this bit-reverse operand is
used, XARn can be configured in
ST2_55 for circular addressing; this re-
moves alignment constraints on the
FFT buffer start address (see Section
6.9 for BSAxx addition computation).
However, in this case, XARn is not im-
pacted by circular addressing computa-
tion.
*(ARn – T0B/AR0B) The 16-bit signed constant in T0 or AR0 Data-memory (Smem, dbl(Smem),
is sign extended to 24 bits and sub- HI(Smem)/LO(Smem))
tracted from XARn after the address is
Memory-mapped register
generated on 24-bit width:
(Smem, dbl(Smem), HI(Smem)/LO(Smem))
If C54CM = 0: XARn = XARn – T0
If C54CM = 1: XARn = XARn – AR0
(Either subtraction is done with reverse
carry propagation.)
Note: This addressing mode can be
used for FFT buffer elements address-
ing. When this bit-reverse operand is
used, XARn can be configured in
ST2_55 for circular addressing; this re-
moves alignment constraints on the
FFT buffer start address (see Section
6.9 for BSAxx addition computation).
However in this case, XARn is not im-
pacted by circular addressing computa-
tion.
† If 16-bit/1-bit operation: XARn = XARn + 1; 1-bit operation: register bit access that reads or modifies a single bit in a register.
‡ If 32-bit/2-bit operation: XARn = XARn + 2; 2-bit operation: register bit access that reads or modifies a register bit-pair.
§ If 16-bit/1-bit operation: XARn = XARn − 1; 1-bit operation: register bit access that reads or modifies a single bit in a register.
¶ If 32-bit/2-bit operation: XARn = XARn − 2; 2-bit operation: register bit access that reads or modifies a register bit-pair.
Table 6−3. Operands for the XAR Indirect Addressing Mode (Continued)
Operand Pointer Modification Supported Access Types
Table 6−3. Operands for the XAR Indirect Addressing Mode (Continued)
Operand Pointer Modification Supported Access Types
You may use the dual XAR indirect addressing mode for executing an instruc-
tion that makes two data-memory accesses. In this case, the two data-memory
operands are designated in the instruction syntax as Xmem and Ymem. For
example:
ACLHa = Xmem + Ymem
Unlike C55x DSP generations, the C55x+ revision allows parallel instructions
involving two Smem/dbl(Smem) operands to be executed without any restric-
tions on the XAR indirect operands. In the example below, any Smem oper-
ands listed in Table 6−3 can be used:
DAa = Smem
|| Smem = ALLa
The available dual XAR indirect operands are a subset of the XAR indirect op-
erands.
Note:
The assembler rejects code in which dual operands use the same auxiliary reg-
ister with two different auxiliary register modifications. You can use the same
XARn for both operands only if one of the operands does not modify XARn.
Table 6−4 introduces the operands available for the dual XAR indirect ad-
dressing mode. Note that:
Both pointer modification and address generation are linear or circular ac-
cording to the pointer configuration in status register ST2_55. The content
of the appropriate 16-bit buffer start address register (BSA01, BSA23,
BSA45, or BSA67) is added only if circular addressing is activated for the
chosen pointer. The indirect data address generation arithmetic opera-
tions are based on 24-bit arithmetic.
Note:
Although an increment past 7F FFFFh or a decrement past 00 0000h causes
the indirect address to wrap around, do not make use of this behavior. It is
not supported. Also during circular addressing, the BSAxx addition must not
increment the address beyond 7F FFFFh (see Section 6.12 for more details
on circular addressing mode).
Multiply
Note:
The above example executes in one cycle provided the memory accesses
are adequately performed across different memory regions: banked SARAM
or SARAM blocks regions. Refer to your DSP data manual for more details
on internal memory structure and performance.
Note:
With algebraic instructions syntax, you must enclose each coefficient indi-
rect operand in the syntax element coef(), and enclose each long coefficient
indirect operand in the syntax LO(coef()), HI(coef()) (see Section 6.5.3.2).
6.5.3.2 coef() Keyword Required For Coefficient Indirect Operands in Algebraic Instruction
Syntax
With the algebraic instruction syntax, you must enclose each coefficient indi-
rect (Cmem) operand in the coef() syntax element. For example:
ACx = LO(Smem) * LO(Cmem),
ACy = HI(Smem) * HI(Cmem)
Assume AC0 is used for the ACx operand, AC9 for the ACy operand, *AR0 for
the Smem operand, and *(AR3 − T1) for the Cmem operand. The instruction
is written as follows:
AC0 = LO(*AR0) * LO(coef(*(AR3 − T1))),
AC9 = HI(*AR0) * HI(coef(*(AR3 − T1)))
Note that in the previous example, you must enclose the coef() syntax element
in both HI(Cmem)/LO(Cmem) operands.
6.6.1 Addressing Data Memory and MMRs With Absolute Addressing Modes
The k16 absolute addressing mode *abs16(#k16) or the k24 absolute ad-
dressing mode *(#k24) can access data memory in any instruction with one
of these syntax elements:
Table 6−5 through Table 6−7 provide examples of how to use these operands.
Because the MMRs are mapped at the bottom of the 16-Mb data memory
space, to access them with *abs16(#k16) you must first ensure that DPH = 0.
Generated Address
Syntax Example Instruction Example For DPH = 3 Description
Ra = Smem T2 = *abs16(#2002h) DPH:k16 = 03 2002h The CPU loads the value at ad-
dress 03 2002h into T2.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Generated Address
Syntax Example Instruction Example DPH must be 0 Description
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Ra = Smem T2 = *(#032002h) k24 = 03 2002h The CPU loads the value at ad-
dress 03 2002h into T2.
Ra = HI(Smem), T2 = HI(#032002h), k24 = 03 2002h The CPU reads the values at ad-
Ra+1 = LO(Smem) ¶ T3 = LO(#032002h) dresses 03 2002h and 03 2003h
(but only 03 2002h is generated)
and copies them into T2 and T3,
respectively.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
6.6.2 Addressing Data Memory, MMRs, and C55x+ Registers With Direct
Addressing Modes
You can use direct addressing modes to access data memory, memory-
mapped registers (MMRs), or C55x+ registers in any instruction with one of
these syntax elements:
Note that on the C55x+ DSP, the XDP direct operand @Daddr and the XSP
direct operand *SP(offset) are not CPL bit dependent. Depending on which di-
rect operand is being used, the XSP or XDP registers are used for the address
computation.
Ra = Smem T2 = @03 0005h XDP Doffset The CPU loads the value at ad-
= 03 0001h + 04h dress 03 0005h into T2.
= 03 0005h
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
Generated Address
Syntax Example Instruction Example For XSP = 00FF00h Description
Ra = Smem T2 = *SP(5) XSP + offset The CPU loads the value at ad-
= 00 FF05h dress 00 FF05h into T2.
Ra = HI(Smem), T2 = HI(*SP(5)), XSP + offset The CPU reads the values at ad-
Ra+1 = LO(Smem) ¶ T3 = LO(*SP(5)) = 00 FF05h dresses 00 FF05h and 00 FF04h
(but only address 00 FF05h is gen-
erated) and loads these values into
T2 and T3, respectively. The sec-
ond word is read from the preceding
even address in accordance with
the alignment rule for long words. §
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
In the C55x+ DSP, you can access all CPU registers with their register ID sym-
bols qualified with mmap(). See Table 2−2 for the list of register ID symbols.
The example below loads the 16-bit LSBs of the AC14 accumulator into the
AR8 register:
AR8 = mmap(@AC14.L)
Only the registers existing in the C55x DSP generation can be accessed with
an MMR symbol (see Table 2−2 for the list of MMR symbols).
The MMRs can be accessed through different ways in the C55x+ DSP:
For source code compatibility, the C55x+ assembler accepts the MMR
symbol and encodes it as a register ID.
This operation is performed automatically when the MMR symbol rep-
resents a 16-bit MMR access. In the instruction below, the MMR sym-
bol (AC0_L) is encoded in the exact same form as the register ID sym-
bol (AC0.L).
T2 = @AC0_L || mmap()
This operation is performed for the 32-bit MMR accesses only when
the 32-bit MMR access has a corresponding 32-bit register ID. See
Table 2−2 for the list of these 32-bit register IDs. In the instruction be-
low, the MMR symbol (AC0_H) is encoded as the exact same form as
the register ID symbol (AC0)
AC3 = dbl(@AC0_H) || mmap()
The remaining 32-bit MMR accesses are encoded as a standard C55x
MMR access. The CPU decodes this MMR access with one extra
cycle (AC1 pipeline phase is stalled during one cycle). In the instruc-
tion below, the MMR symbol (AC1_H) is encoded as the standard
C55x MMR symbol (0Ch). The CPU executes this instruction in two
cycles.
AC3 = dbl(@AC1_H) || mmap()
Table 6−9 through Table 6−11 illustrate the different MMR access means.
Ra = Smem T2 = @AC0_L || mmap() MMR access through The CPU loads the 16 LSBs of
60h register ID en- the AC0 accumulator into T2.
coded address The assembler encodes the
16-bit MMR symbol AC0_L
with the corresponding regis-
ter ID (AC0.L).
Ra = HI(Smem), T2 = HI(@AC0_H), MMR access through The CPU loads the 16 LSBs of
Ra+1 = LO(Smem) ¶ T3 = LO(@AC0_H) || mmap() 00h register ID en- the AC0 accumulators into T3
coded address and the 16 MSBs of AC0 into
T2. The assembler encodes
the 32-bit MMR symbol
AC0_H with the corresponding
register ID (AC0).
Table 6−10. @Daddr Used For MMR Access through Standard C55x MMR Access
Ra = HI(Smem), T2 = HI(@AC1_H), MMR access through The CPU loads the 8 guard
Ra+1 = LO(Smem) T3 = LO(@AC1_H) || mmap() 0Ch standard MMR bits of the AC1 accumulator
address into T3 and the 16 MSBs of
AC1 into T2. The assembler
cannot encode the 32-bit
MMR symbol AC1_H with a
corresponding register ID.
Table 6−11. @Daddr Used for MMR Access through XDP Direct Addressing Mode
Generated Address
Syntax Example Instruction Example XDP = 0 = .dp Description
Ra = HI(Smem), T2 = HI(@AC0_H), XDP + Doffset The CPU load the 16 LSBs of the
Ra+1 = LO(Smem) ¶ T3 = LO(@AC0_H) = 00 0000h + 09h = 09h AC0 accumulators into T3 and the
16 MSBs of AC0 into T2.
6.6.3 Addressing Data Memory and MMRs With Indirect Addressing Modes
When using the indirect addressing modes to access data memory or
memory-mapped registers (MMRs), it is important to know which operands
you can use for a given instruction. Each instruction syntax that supports the
indirect accesses to data memory includes one of the syntax elements shown
in Table 6−12. The last column of the table shows the indirect operands that
can be used in place of the syntax element(s) of the first column. After you have
found an operand in Table 6−12, you can find details about that operand in the
sections that follow the table. For details about the alignment of long words in
data memory, see Section 3.3.2.
Note:
If an access to the memory-mapped register IER0 (00h MMR address) is
made using an indirect addressing mode, then the CPU generates a bus-er-
ror interrupt (BERRINT) as this is not an allowed operation.
Note:
In word-pointer mode, the 24-bit XARn register references a 23-bit effective
word address. It is the user’s responsibility to ensure that in word-pointer
mode, the 24th bit is set to zero.
Smem Smem indicates one word (16 bits) XAR indirect addressing mode:
dbl(Smem) of data. *ARn
HI(Smem)/LO(Smem) dbl(Smem) and *ARn+
HI(Smem)/LO(Smem) indicate one *ARn−
long word (32 bits) of data. *+ARn
*−ARn
*(ARn + T0/AR0)
*(ARn − T0/AR0)
*ARn(T0/AR0)
*(ARn + Tx) (Tx can be T1, T2, or T3)
*(ARn − Tx)
*ARn(Tx)
*(ARn + T0B/AR0B)
*(ARn − T0B/AR0B)
*ARn(#K16)
*+ARn(#K16)
*ARn(short(#k4))
*ARn(XAR15[23:4])†
Xmem, Ymem Xmem, Ymem indicates one word Dual XAR indirect addressing mode:
dbl(Ymem) (16 bits) of data. *ARn
HI(Cmem)/LO(Cmem) dbl(Ymem) and *ARn+
HI(Cmem)/LO(Cmem) indicate one *ARn−
long word (32 bits) of data. *(ARn + T0/AR0)
*(ARn − T0/AR0)
*ARn(T0/AR0)
*(ARn + T1)
*(ARn − T1)
Operand Description
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
Operand Description
Ra = Smem T2 = *AR4+ XAR4 The CPU reads the value at address XAR4
and loads it into T2. After being used for
the address generation, XAR4 is increm-
ented by 1.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
ALLa = dbl(Smem) copy(XAR9 = dbl(*–AR4)) XAR4 – 2 Before being used for the address
generation, XAR4 is decremented
by 2. The CPU reads the values at
address XAR4 – 2 and the follow-
ing or preceding address (but only
the XAR4 − 2 address is gener-
ated) and loads them into XAR9. §
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
C54CM = 0 (and .c54cm_off assembler directive) C54CM = 1 (and .c54cm_on assembler directive)
*(ARn + T0) Generated address in linear *(ARn + AR0) Generated address in linear
mode: XARn mode: XARn
Generated address in circular Generated address in circular
mode: mode:
(ARnH:BSAyy) + (00:ARn) (ARnH:BSAyy) + (00:ARn)
XARn modification: XARn modification:
XARn = XARn + T0 XARn = XARn + AR0
T0 is a 16-bit signed value. AR0 is a 16-bit signed value.
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
ALLa = dbl(Smem) copy(AR9 = dbl(*(AR4 + T0))) XAR4 The CPU reads the values at
address XAR4 and the follow-
ing or preceding address (but
only the XAR4 address is gen-
erated) and loads them into
XAR9. After being used for the
address generation, XAR4 is
decremented by the number in
T0. §
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
C54CM = 0 (and .c54cm_off assembler directive) C54CM = 1 (and .c54cm_on assembler directive)
*(ARn – T0) Generated address in linear mode: *(ARn – AR0) Generated address in linear mode:
XARn XARn
Generated address in circular mode: Generated address in circular mode:
(ARnH:BSAyy) + (00:ARn) (ARnH:BSAyy) + (00:ARn)
XARn modification: XARn modification:
XARn = XARn − T0 XARn = XARn − AR0
T0 is a 16-bit signed value. AR0 is a 16-bit signed value.
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
ALLa = dbl(Smem) copy(XAR9 = dbl(*(AR4 – T0))) XAR4 The CPU reads the values at
address XAR4 and the follow-
ing or preceding address (but
only the XAR4 address is gen-
erated) and loads them into
AR9. After being used for the
address generation, XAR4 is
decremented by the number in
T0. §
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
C54CM = 0 (and .c54cm_off assembler directive) C54CM = 1 (and .c54cm_on assembler directive)
*ARn(T0) Generated address in linear mode: *ARn(AR0) Generated address in linear mode:
XARn + T0 XARn + AR0
Generated address in circular mode: Generated address in circular mode:
(ARnH:BSAyy) + (00:ARn) + T0 (ARnH:BSAyy) + (00:ARn) + AR0
XARn is not modified. XARn is used as XARn is not modified. XARn is used as
a base pointer. T0 is a 16-bit signed val- a base pointer. AR0 is a 16-bit signed
ue added to the base pointer. value added to the base pointer.
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
ALLa = dbl(Smem) copy(XAR9 = dbl(*AR4(T0))) XAR4 + T0 The CPU reads the values at
address XAR4 + T0 and the fol-
lowing or preceding address (but
only the XAR4+ T0 address is
generated) and loads them into
XAR9. XAR4 is not modified. §
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
6.6.3.9 *(ARn + Tx), (Tx = T1, T2, or T3) Used For Data-Memory and MMR Access
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Ra = Smem AR3 = *(AR7 + T1) XAR7 The CPU reads the value at ad-
dress XAR7 and loads it into AR3.
After being used for the address
generation, XAR7 is incremented
by the number in T1.
Ra = HI(Smem), AR2 = HI(*(AR5 + T2)), XAR5 The CPU reads the values at ad-
Ra+1 = LO(Smem) ¶ AR3 = LO(*(AR5 + T2)) dress XAR5 and the following or
preceding address (but only the
XAR5 address is generated) and
loads them into AR2 and AR3, re-
spectively. After being used for the
address generation, XAR5 is in-
cremented by the number in T2. §
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
6.6.3.10 *(ARn – Tx), (Tx= T1, T2. or T3) Used For Data-Memory and MMR Access
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Ra = Smem AR3 = *(AR7 – T1) XAR7 The CPU reads the value at ad-
dress XAR7 and loads it into AR3.
After being used for the address
generation, XAR7 is decremented
by the number in T1.
Ra = HI(Smem), AR2 = HI(*(AR5 – T3)), XAR5 The CPU reads the values at ad-
Ra+1 = LO(Smem) ¶ AR3 = LO(*(AR5 − T3)) dress XAR5 and the following or
preceding address (but only the
XAR5 address is generated) and
loads them into XAR2 and XAR3,
respectively. After being used for
the address generation, XAR5 is
decremented by the number in
T3. §
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
6.6.3.11 *ARn(Tx), (Tx= T1, T2, or T3) Used For Data-Memory and MMR Access
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Ra = Smem AR3 = *AR7(T2) XAR7 + T2 The CPU reads the value at address
XAR7 + T2 and loads it into AR3.
XAR7 is not modified.
Ra = HI(Smem), AR2 = HI(*AR5(T1)), XAR5 + T1 The CPU reads the values at address
Ra+1 = LO(Smem) ¶ AR3 = LO(*AR5(T1) XAR5 + T1 and the following or pre-
ceding address (but only the XAR5 +
T1 address is generated) and loads
them into AR2 and AR3, respectively.
XAR5 is not modified.§
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
C54CM = 0 (and .c54cm_off assembler directive) C54CM = 1 (and .c54cm_on assembler directive)
*(ARn + T0B) Generated address in linear mode: *(ARn + AR0B) Generated address in linear mode:
XARn XARn
Generated address in circular mode: Generated address in circular mode:
(ARnH:BSAyy) + (00:ARn) (ARnH:BSAyy) + (00:ARn)
XARn modification: XAR modification:
XARn = XARn + T0 XARn = XARn + AR0
(performed with reverse carry (performed with reverse carry
propagation) propagation)
Note: This addressing mode can be used for FFT buffer elements addressing. When this bit reverse operand is used, XARn can
be configured in the ST2_55 register for circular addressing; this removes alignment constraints on the FFT buffer start
address (see Section 6.9 for more details on BSAxx addition computation). However in this case, XARn is not impacted
by circular addressing computation.
Generated Address
Syntax Example Example Instruction (Linear Addressing) Description
Ra = Smem T2 = *(AR4 + T0B) XAR4 The CPU reads the value at address
XAR4 and loads it into T2. After being
used for the address generation, XAR4
is incremented by the number in T0.
Reverse carry propagation is used dur-
ing the addition.
Ra = HI(Smem), T2 = HI (*(AR4 + T0B)) XAR4 The CPU reads the values at address
Ra+1 = LO(Smem) ¶ T3 = LO(*(AR4 + T0B)) XAR4 and the following or preceding
address (but only the XAR4 address is
generated) and loads them into T2 and
T3, respectively. After being used for
the address generation, XAR4 is in-
cremented by the number in T0 with re-
verse carry propagation. §
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
C54CM = 0 (and .c54cm_off assembler directive) C54CM = 1 (and .c54cm_off assembler directive)
*(ARn – T0B) Generated address in linear mode: *(ARn – AR0B) Generated address in linear mode:
XARn XARn
Generated address in circular mode: Generated address in circular mode:
(ARnH:BSAyy) + (00:ARn) (ARnH:BSAyy) + (00:ARn)
XARn modification: XARn modification:
XARn = XARn − T0 XARn = XARn − AR0
(performed with reverse carry (performed with reverse carry
propagation) propagation)
Note: This addressing mode can be used for FFT buffer elements addressing. When this bit reverse operand is used, XARn can
be configured in the ST2_55 register for circular addressing; this removes alignment constraints on the FFT buffer start
address (see Section 6.9 for more details on BSAxx addition computation). However in this case, XARn is not impacted
by circular addressing computation.
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Ra = Smem T2 = *(AR10 – T0B) XAR10 The CPU loads the value at ad-
dress XAR10 into T2. After being
used for the address generation,
XAR10 is decremented by the
number in T0. Reverse carry
propagation is used during the
subtraction.
Ra = HI(Smem), T2 = HI(*(AR10 + T0B)), XAR10 The CPU reads the values at ad-
Ra+1 = LO(Smem) T3 = LO(*(AR10 + T0B)) dress XAR10 and the following or
preceding address (but only the
XAR10 address is generated)
and loads them into T2 and T3,
respectively. After being used for
the address generation, XAR10 is
decremented by the number in T0
with reverse carry propagation. §
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Ra = Smem AR3 = *AR12(#8) XAR12 + 8 The CPU reads the value at address
XAR12 + 8 and loads it into AR3.
XAR12 is not modified.
ALLa = dbl(Smem) copy(XAR2 = XAR5 + 20 The CPU reads the values at address
dbl(*AR5(#20))) XAR5 + 20 and the following or preced-
ing address (but only the XAR5 + 20
address is generated) and loads them
into AR2. XAR5 is not modified. §
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Ra = Smem AR3 = *+AR7(#8) XAR7 + 8 Before XAR7 is used for the address
generation, the constant is added to
XAR7. The CPU reads the value at ad-
dress XAR7 + 8 and loads it into AR3.
ALLa = dbl(Smem) copy (XAR2 = XAR5 + 20 Before XAR5 is used for the address
dbl(*+AR5(#20))) generation, the constant is added to
XAR5. The CPU reads the values at
address XAR5 + 20 and the following or
preceding address (but only the
XAR5 + 20 address is generated) and
loads them into XAR2. §
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Ra = Smem AR3 = *AR7(short(#1)) XAR7 + 1 The CPU reads the value at address
XAR7 + 1 and loads it into AR3. XAR7
is not modified.
ALLa = dbl(Smem) copy(XAR2 = XAR5 + 8 The CPU reads the values at address
dbl(*AR5(short(#8)))) XAR5 + 8 and the following or preced-
ing address (but only the XAR5 + 8
address is generated) and loads them
into XAR2−. XAR5 is not modified. §
Note: § For details about the alignment of long words in data memory, see Section 3.3.2.
Operand Description
Ra = Smem AC0_L = *AR1(XAR15[23:4]) XAR1 + XAR15[23:4] The CPU reads the value at address
XAR1 + 4 and loads it into AC0.L.
Assume XAR15 = 42,
XAR1 is not modified.
then XAR15[23:4] = 4
high_byte(Smem) = Ra
low_byte(Smem) = Ra
When a bus error occurs, the functionality of the instruction that caused the
error, and of any instruction executed in parallel, cannot be assured.
Note:
No MMR access is allowed when the CPU is in byte-pointer mode. See Sec-
tion 7.7 for more details.
6.8.1 Addressing Register Bits With the Register-Bit Direct Addressing Mode
You can use the register-bit direct operand, @bit_position, to access a register
bit if an instruction has the following syntax element:
Baddr Indicates the address of one bit of data. Only the register bit
test/set/clear/complement and bit field insert/extract instructions
support Baddr, and these instructions enable you to access bits in
the accumulators (AC0–AC15), the auxiliary registers
(AR0–AR15), and the temporary registers (T0–T3).
Note:
Unlike the direct operands (@Daddr) and *SP(offset)) used to access data
memory with Smem, dbl(Smem), and HI(Smem)/LO(Smem) syntax ele-
ments, the register-bit direct operand, @bit_position, does not use the XSP
and XDP registers for address computation. The register-bit direct operand,
@bit_position, indicates directly the address of one bit of data to access.
Note:
Although an increment past 7F FFFFh or a decrement past 00 0000h causes
the register-bit direct address to wrap around, do not make use of this behav-
ior. It is not supported.
Generated
Syntax Example Instruction Example Bit Address Description
TC1, TC2 = bit(Ra, Baddr)¶ TC1, TC2 = bit(AC3, @30) 30 The CPU tests bits 30 and 31 of
AC3. It copies the content of
AC0(30) into the TC1 bit of status
register ST0_55 and the content of
AC0(31) into the TC2 bit of
ST0_55.
Note: ¶ In instructions using the Baddr and (Baddr+1) operands, Baddr must refer to two consecutive bits.
Baddr Indicates the address of one bit of data. Only the register bit
test/set/clear/complement and bit field extract/insert instructions
support Baddr, and these instructions enable you to access bits in
the accumulators (AC0–AC15), the auxiliary registers
(AR0–AR15), and the temporary registers (T0–T3).
You must first make sure the pointer contains the correct bit number. Note that:
The computed bit position is truncated to the 4 LSBs, in case of bit manipu-
lation using the A unit. In the following example, you want to clear bit 15
of the T3 register with an indirect addressing mode using the XAR6 regis-
ter.
AR6 = #Fh
bit(T3, *AR6) = #0
The computed bit position is truncated to the 6 LSBs, in case of bit manipu-
lation using the D unit. In the following example, you want to toggle bit 32
of the AC9 register with an indirect addressing mode using the XAR5 reg-
ister.
AR5 = #20h
cbit(AC9, *AR5)
Table 6−14 lists the indirect operands that support accesses of register bits,
and the sections following the table provide details and examples for the oper-
ands.
Note:
Although an increment past 7F FFFFh or a decrement past 00 0000h causes
the register-bit indirect address to wrap around, do not make use of this be-
havior. It is not supported.
Baddr Baddr indicates the address of one XAR indirect addressing mode:
bit of data *ARn
*ARn+
*ARn−
*+ARn
*−ARn
*(ARn + T0/AR0)
*(ARn − T0/AR0)
*ARn(T0/AR0)
*(ARn + Tx) (Tx can be T1, T2, or T3)
*(ARn − Tx)
*ARn(Tx)
*ARn(#K16)
*+ARn(#K16)
*ARn(short(#k4))
Operand Description
Generated Bit
Address
Syntax Example Instruction Example (Linear Addressing) Description
bit(Ra, Baddr) = #1 bit(AC10, *AR12) = #1 XAR12 The CPU sets bit 0 of AC10.
Assume XAR12 = 0 XAR12 is not modified.
TC1, TC2 = bit(Ra, TC1, TC2 = bit(AC3, XAR5 The CPU tests bits 30 and 31 of
Baddr) *AR5) Assume XAR5 = 30 AC3. It copies the content of
AC3(30) into the TC1 bit of status
register ST0_55 and the content of
AC3(31) into the TC2 bit of ST0_55.
AR5 is not modified.
Operand Description
Generated Bit
Address
Syntax Example Instruction Example (Linear Addressing) Description
bit(Ra, Baddr) = #1 bit(AC3, *AR2+) = #1 XAR2 The CPU sets bit 0 of AC3. After be-
Assume XAR2 = 0 ing used for the address generation.
XAR2 is incremented by 1.
TC1, TC2 = bit(Ra, TC1, TC2 = bit(AC9, XAR5 The CPU tests bits 30 and 31 of AC9.
Baddr) *AR5) Assume XAR5 = 30 It copies the content of AC9(30) into
the TC1 bit of status register ST0_55
and the content of AC9(31) into the
TC2 bit of ST0_55. After being used
for the addressgeneration, XAR5 is
incremented by 2.
Operand Description
Generated Bit
Address
Syntax Example Instruction Example (Linear Addressing) Description
bit(Ra, Baddr) = #1 bit(AC3, *AR2–) = #1 XAR2 The CPU sets bit 0 of AC3. After be-
Assume XAR2 = 0 ing used for the address generation,
XAR2 is decremented by 1.
TC1, TC2 = bit(Ra, TC1, TC2= bit(AC3, XAR5 The CPU tests bits 30 and 31 of
Baddr) *AR5−) Assume XAR5 = 30 AC3. It copies the content of
AC3(30) into the TC1 bit of status
register ST0_55 and the content of
AC3(31) into the TC2 bit of ST0_55.
After being used for the address
generation, XAR5 is decremented
by 2.
Operand Description
Generated Bit
Address
Syntax Example Instruction Example (Linear Addressing) Description
bit(Ra, Baddr) = bit(AC4, *+AR2) = #1 (XAR2 + 1) Before being used for the address
#1 Assume (XAR2 + 1) = 1 generation, XAR2 is incremented by
1. The CPU sets bit 1 of AC4.
TC1, TC2 = bit(Ra, TC1, TC2= bit(AC3, (XAR5 + 2) Before being used for the address
Baddr) *+AR5) Assume (XAR5 + 2) = 30 generation, XAR5 is incremented by
2. The CPU tests bits 30 and 31 of
AC3. It copies the content of
AC3(30) into the TC1 bit of status
register ST0_55 and the content of
AC3(31) into the TC2 bit of ST0_55.
Operand Description
Generated Bit
Address
Syntax Example Instruction Example (Linear Addressing) Description
bit(Ra, Baddr) = #1 bit(AC14, *–AR2) = #1 (XAR2 – 1) Before being used for the ad-
Assume (XAR2 – 1) = 1 dress generation, XAR2 is de-
cremented by 1. The CPU sets
bit 1 of AC14.
TC1, TC2 = bit(Ra, TC1, TC2 = bit(AC5, (XAR5 – 2) Before being used for the ad-
Baddr) *–AR5) Assume (XAR5 – 2) = 30 dress generation, XAR5 is de-
cremented by 2. The CPU tests
bits 30 and 31 of AC5. It copies
the content of AC5(30) into the
TC1 bit of status register ST0_55
and the content of AC5(31) into
the TC2 bit of ST0_55.
C54CM = 0 (and .c54cm_off assembler directive) C54CM = 1 (and .c54cm_on assembler directive)
*(ARn + T0) Generated bit address in linear *(ARn + AR0) Generated bit address in linear
mode: XARn mode: XARn
Generated bit address in circular Generated bit address in circular
mode: (ARnH:BSAyy) + (00:ARn) mode: (ARnH:BSAyy) + (00:ARn)
XARn modification: XARn modification:
XARn = XARn + T0 XARn = XARn + AR0
T0 is a 16-bit signed value. AR0 is a 16-bit signed value.
Generated Bit
Address
Syntax Example Instruction Example (Linear Addressing) Description
bit(Ra, Baddr) = #1 bit(AC3, *(AR2 + T0)) = #1 XAR2 The CPU sets bit 0 of AC3. Af-
Assume XAR2 = 0 ter being used for the address
generation, XAR2 is increm-
ented by the number in T0.
TC1, TC2 = bit(Ra, TC1, TC2= bit(AC3, *(AR5 XAR5 The CPU tests bits 30 and 31 of
Baddr) + T0)) Assume XAR5 = 30 AC3. It copies the content of
AC3(30) into the TC1 bit of sta-
tus register ST0_55 and the
content of AC3(31) into the TC2
bit of ST0_55. After being used
for the address generation,
XAR5 is incremented by the
number in T0.
C54CM = 0 (and .c54cm_off assembler directive) C54CM = 1 (and .c54cm_on assembler directive)
*(ARn – T0) Generated bit address in linear *(ARn – AR0) Generated bit address in linear
mode: XARn mode: XARn
Generated bit address in circular Generated bit address in circular
mode: (ARnH:BSAyy) + (00:ARn) mode: (ARnH:BSAyy) + (00:ARn)
XARn modification: XARn modification:
XARn = XARn − T0 XARn = XARn − AR0
T0 is a 16-bit signed value. AR0 is a 16-bit signed value.
Generated Bit
Address
Syntax Example Instruction Example (Linear Addressing) Description
bit(Ra, Baddr) = #1 bit(AC3, *(AR2 – T0)) = #1 XAR2 The CPU sets bit 0 of AC3. After
Assume XAR2 = 0 being used for the address gener-
ation, XAR2 is decremented by
the number in T0.
TC1, TC2 = bit(Ra, TC1, TC2 = bit(AC3, XAR5 The CPU tests bits 30 and 31 of
Baddr) *(AR5 – T0) Assume XAR5 = 30 AC3. It copies the content of
AC3(30) into the TC1 bit of status
register ST0_55 and the content
of AC3(31) into the TC2 bit of
ST0_55. After being used for the
address generation, XAR5 is de-
cremented by the number in T0.
C54CM = 0 (and .c54cm_off assembler directive) C54CM = 1 (and .c54cm_on assembler directive)
*ARn(T0) Generated bit address in linear mode: *ARn(AR0) Generated bit address in linear mode:
XARn + T0 XARn + AR0
Generated bit address in circular mode: Generated bit address in circular mode:
(ARnH:BSAyy) + (00:ARn) + T0 (ARnH:BSAyy) + (00:ARn) + AR0
XARn is not modified. XARn is used as XARn is not modified. XARn is used as
a base pointer. T0 is a 16-bit signed a base pointer. AR0 is a 16-bit signed
value added to the base pointer. value added to the base pointer.
Generated Bit
Address
Syntax Example Instruction Example (Linear Addressing) Description
bit(Ra, Baddr) = #1 bit(AC6, *AR2(T0)) = #1 XAR2 + T0 The CPU sets bit 15 of AC6. XAR2
Assume XAR2 = 0 is not modified.
and T0 = 15
TC1, TC2 = bit(Ra, TC1, TC2 = bit(AC7, XAR5 + T0 The CPU tests bits 30 and 31 of
Baddr) *AR5(T0)) Assume XAR5 = 25 AC7. It copies the content of
and T0 = 5 AC7(30) into the TC1 bit of status
register ST0_55 and the content of
AC7(31) into the TC2 bit of ST0_55.
XAR5 is not modified.
6.8.2.9 *(ARn + Tx), (Tx = T1, T2, or T3) Used For Register-Bit Access
Operand Description
Generated Bit
Address
Syntax Example Instruction Example (Linear Addressing) Description
bit(Ra, Baddr) = #0 bit(AC2, *(AR14 + T1)) = #0 XAR14 The CPU clears bit 0 of AC2. Af-
Assume XAR14 = 0 ter being used for the address
generation, XAR14 is increm-
ented by the number in T1.
TC1, TC2 = bit(Ra, TC1, TC2 = bit(AC2, XAR10 The CPU tests bits 30 and 31 of
Baddr) *(AR10 + T3)) Assume XAR10 = 30 AC2. It copies the content of
AC2(30) into the TC1 bit of sta-
tus register ST0_55 and the
content of AC2(31) into the TC2
bit of ST0_55. After being used
for the address generation,
XAR10 is incremented by the
number in T3.
6.8.2.10 *(ARn – Tx), (Tx = T1, T2, or T3) Used For Register-Bit Access
Operand Description
*(ARn – Tx) Generated bit address in linear mode: XARn
Generated bit address in circular mode: (ARnH:BSAyy) + (00:ARn)
XARn modification: XARn = XARn − Tx
Tx is a 16-bit signed value. Tx can be T1, T2, or T3.
Generated Bit
Address
Syntax Example Instruction Example (Linear Addressing) Description
bit(Ra, Baddr) = #0 bit(AC11, *(AR4 – T3)) = #0 XAR4 The CPU clears bit 0 of AC11.
Assume XAR4 = 0 After being used for the address
generation, XAR4 is decrem-
ented by the number in T3.
TC1, TC2 = bit(Ra, TC1, TC2 = bit(AC2, XAR11 The CPU tests bits 30 and 31 of
Baddr) *(AR11 – T2)) Assume XAR11 = 30 AC2. It copies the content of
AC2(30) into the TC1 bit of sta-
tus register ST0_55 and the
content of AC2(31) into the TC2
bit of ST0_55. After being used
for the address generation,
XAR11 is decremented by the
number in T2.
6.8.2.11 *ARn(Tx), (Tx = T1, T2, or T3) Used For Register-Bit Access
Operand Description
Generated Bit
Address
Syntax Example Instruction Example (Linear Addressing) Description
TC1, TC2 = bit(Ra, TC1, TC2 = bit(AC2, *AR1(T3)) XAR1 + T3 The CPU tests bits 30 and
Baddr) Assume XAR1 = 25 31 of AC2. It copies the con-
and T3 = 5 tent of AC2(30) into the TC1
bit of status register ST0_55
and the content of AC2(31)
into the TC2 bit of ST0_55.
XAR1 is not modified.
Operand Description
Generated Bit
Address
Syntax Example Instruction Example (Linear Addressing) Description
bit(Ra, Baddr) = #0 bit(AC2, *AR4(#31)) = #0 (XAR4 + 31) The CPU clears bit 31 of AC2.
Assume XAR4 = 0 XAR4 is not modified.
TC1, TC2 = bit(Ra, TC1, TC2 = bit(AC2, (XAR1 + 5) The CPU tests bits 21 and 22 of
Baddr) *AR1(#5)) Assume XAR1 = 16 AC2. It copies the content of
AC2(21) into the TC1 bit of status
register ST0_55 and the content of
AC2(22) into the TC2 bit of
ST0_55. XAR1 is not modified.
Note: ¶ In instructions using the Baddr and (Baddr+1) operands, Baddr must refer to two consecutive bits.
Operand Description
Generated Bit
Address
Syntax Example Instruction Example (Linear Addressing) Description
bit(Ra, Baddr) = #0 bit(AC2, +AR4(#31)) = #0 (XAR4 + 31) Before AR4 is used for the ad-
Assume XAR4 = 0 dress generation, the constant is
added to XAR4. The CPU clears
bit 31 of AC2.
TC1, TC2 = bit(Ra, TC1, TC2 = bit(AC2, (XAR1 + 5) Before AR1 is used for the ad-
Baddr) *+AR1(#5)), Assume XAR1 = 16 dress generation, the constant is
added to XAR1. The CPU tests
bits 21 and 22 of AC2. It copies
the content of AC2(21) into the
TC1 bit of status register ST0_55
and the content of AC2(22) into
the TC2 bit of ST0_55.
Operand Description
Generated Bit
Address
Syntax Example Instruction Example (Linear Addressing) Description
bit(Ra, Baddr) = #0 bit(AC2, *AR4(short(#4))) = #0 (XAR4 + 4) The CPU clears bit 4 of AC2.
Assume XAR4 = 0 XAR4 is not modified.
TC1, TC2 = bit(Ra, TC1, TC2= bit(AC2, (XAR1 + 5) The CPU tests bits 21 and 22
Baddr) *AR1(short(#5)) Assume XAR1 = 16 of AC2. It copies the content
of AC2(21) into the TC1 bit of
status register ST0_55 and
the content of AC2(22) into
the TC2 bit of ST0_55. XAR1
is not modified.
Similarly to the k16 absolute addressing mode for data space (see Section
6.3.1), although the generated address can be 24 bits wide in word-pointer
mode, only the 23 LSBs generate a 23-bit effective word address.
The assembler syntax of the k24 absolute xI/O addressing mode is vola-
tile(*(#k24)), where k24 is an unsigned constant.
Similarly to the k24 absolute addressing mode for data space (see Section
6.3.2), although the generated address can be 24 bits wide in word-pointer
mode, only the 23 LSBs generate a 23-bit effective word address.
The assembler syntax of the PDP direct I/O addressing mode is port(@#k7).
This addressing mode uses the 9-bit peripheral data page register (PDP) con-
catenated with the 7-bit instruction-defined constant k7 to form a 16-bit I/O ad-
dress (see Figure 6−8).
To address elements stored in one of the 128-word peripheral page, PDP di-
rect I/O addressing mode is more efficient than the k16 absolute I/O address-
ing mode described in Section 6.9.1.1, because of the 2-byte extension to the
instruction which is not needed.
Note:
PDP direct addressing mode cannot be not used for xI/O addressing modes.
It cannot be used when the CPU is in byte-pointer mode.
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
The assembler syntax for the XDP direct xI/O addressing mode is vola-
tile(@Daddr)). To form a 24-bit xI/O address, the CPU adds the XDP 24-bit
register and the 7-bit instruction defined constant Daddr. The computation pro-
cess of the XDP direct xI/O address is the same as the one described for the
XDP addressing mode, in Section 6.4.1.
To address elements stored in one of the 128-word local data pages, the XDP
direct xI/O addressing mode is more efficient than the two absolute xI/O ad-
dressing modes (k16 or k24) described in Section 6.10.2, because it does not
require any byte extension to the instruction.
To access I/O space with the XAR indirect addressing mode, you can use an
XAR indirect operand with port() qualifier. See Table 6−20 for more details on
the XAR indirect operands that can be used for I/O space addressing.
In word-pointer mode, when the XAR indirect addressing mode accesses I/O
space, only the 16 LSBs of the selected auxiliary register XARn are used for
the I/O address.
Figure 6−9. Accessing I/O Space With the XAR Indirect Addressing Mode
XARn I/O Space (64 Kwords)
Note:
Although an increment past 00 FFFFh or a decrement past 00 0000h causes
the XAR indirect I/O address to wrap around, do not make use of this behav-
ior. It is not supported. Also during circular addressing, the BSAxx addition
must not increment the address beyond 00 FFFFh (see Section 6.12 for
more details on circular addressing).
To access strongly ordered data memory areas (xI/O space) with the XAR indi-
rect addressing mode, you can use an XAR indirect operand with the volatile()
qualifier. See Table 6−21 for more details on the XAR indirect operands that
can be used for xI/O space addressing.
In word-pointer mode, when the XAR indirect addressing mode accesses xI/O
space, only the 23 LSBs of the selected auxiliary register XARn are used for
the xI/O address.
Note:
Although an increment past 7F FFFFh or a decrement past 00 0000h causes
the indirect address to wrap around, do not make use of this behavior; it is
not supported. Also during circular addressing, the BSAxx addition must not
increment the address beyond 7F FFFFh (see Section 6.12 for more details
on circular addressing).
6.10.1 Addressing I/O Space with the I/O Absolute Addressing Mode
In word-pointer mode, to access I/O space with k16 absolute I/O addressing
mode, you can use *port(#k16) in instructions using the following syntax ele-
ment:
Table 6−15 provides examples of I/O space accesses with the k16 absolute
I/O addressing mode.
Table 6−15. k16 Absolute Addressing Mode Used For I/O Space Access
Ra = Smem AR2 = *port(#0003) k16 = 0003h The CPU loads the value at I/O address
0003h into AR2.
Smem = ALLa *port(#F002h) = AR0 k16 = F002h The CPU stores the content of AR0 into
I/O address F002h.
Table 6−16 and Table 6−17 provide some examples of the xI/O space ac-
cesses with k16 and k24 absolute xI/O addressing modes.
Table 6−16. k16 Absolute Addressing Mode Used For xI/O Space Access
Ra = Smem AR2 = volatile(*abs16(#0003)) Assume DPH = 01h The CPU loads the value at xI/O
k16 = 0003h address 01 0003h into AR2.
Smem = ALLa volatile(*abs16(#F002h)) = Assume DPH = 01h The CPU stores the content of
AR0 k16 = F002h AR0 into xI/O address
01 F002h.
Table 6−17. k24 Absolute Addressing Mode Used For xI/O Space Access
Ra = Smem AR2 = volatile(#040003h) k24 = 040003h The CPU loads the value at xI/O
address 04 0003h into AR2.
Smem = ALLa volatile(#03F002h) = AR0 k24 = 03F002h The CPU stores the content of AR0
into xI/O address 03 F002h.
6.10.3 Addressing I/O Space with the PDP Direct Addressing Mode
In word-pointer mode, to access I/O space with the PDP direct I/O addressing
mode, you can use port(@#k7) in instructions using the following syntax ele-
ment:
Table 6−18 provides examples of using port(@#k7) to access I/O space. The
9-bit peripheral data page (PDP) value is concatenated with the 7-bit k7 offset.
Table 6−18. PDP Direct Addressing Mode Used For I/O Space Access
Generated Address
Syntax Example Instruction Example (For PDP = 511) Description
Smem = ALLa port(@127) = T2 PDP:offset = FFFFh An offset of 127 indicates the bottom
of the current peripheral data page.
The CPU copies the content of T2 and
writes it to the bottom of peripheral
data page 511 (address FFFFh).
6.10.4 Addressing xI/O Space with the XDP Direct Addressing Mode
In word-pointer mode, to access xI/O space with the XDP direct xI/O address-
ing mode, you can use volatile(@Daddr) in instructions using the following
syntax elements:
Table 6−19 provides an example on the XDP direct xI/O addressing mode ac-
cessing xI/O space.
Table 6−19. @Daddr Direct Operand Used For xI/O Space Access
Generated Address
Syntax Example Instruction Example For XDP = 03 0001h = .dp = 0 Description
6.10.5 Addressing I/O and xI/O Space With XAR Indirect Addressing Modes
In word-pointer mode, to access I/O space with the XAR indirect I/O address-
ing mode, you can use an indirect operand with the port() qualifier in instruc-
tions using the following syntax element:
In word-pointer mode, to access xI/O space with the XAR indirect xI/O ad-
dressing mode, you can use an indirect operand with the volatile() qualifier in
instructions using the following syntax elements:
Table 6−20 lists the indirect operands that support accesses to I/O space.
Table 6−21 lists the indirect operands that support accesses to xI/O space.
The sections following the tables provide details and examples for the oper-
ands.
Note:
In word-pointer mode, only the 16 LSBs of the 24-bit indirect address are
used for an I/O access, whereas only the 23 LSBs are used for an xI/O ac-
cess.
Smem Smem indicates one word (16 bits) XAR indirect addressing mode:
of data. *ARn
*ARn+
*ARn−
*+ARn
*−ARn
*(ARn + T0/AR0)
*(ARn − T0/AR0)
*ARn(T0/AR0)
*(ARn + Tx) (Tx can be T1, T2, or T3)
*(ARn − Tx)
*ARn(Tx)
*ARn(#K16)
*+ARn(#K16)
*ARn(short(#k4))
Smem, Smem indicates one word (16 bits) XAR indirect addressing mode:
dbl(Smem) of data. dbl(Smem) and *ARn
HI(Smem)/LO(Smem) HI(Smem)/LO(Smem) indicates *ARn+
one long word (32 bits) of data *ARn−
*+ARn
*−ARn
*(ARn + T0/AR0)
*(ARn − T0/AR0)
*ARn(T0/AR0)
*(ARn + Tx) (Tx can be T1, T2, or T3)
*(ARn − Tx)
*ARn(Tx)
*ARn(#K16)
*+ARn(#K16)
*ARn(short(#k4))
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
dbl(Smem) = ALLa volatile(dbl(*AR5−)) = AC2 XAR5 The CPU reads the content of
Assume XAR5 = AC2 and writes it to xI/O
02 FFFEh address 02 FFFEh. After being
used for the address
generation, XAR5 is
decremented by 2.
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Smem = ALLa port(*−AR5) = T2 XAR5 – 1 Before being used for the address
Assume XAR5 = 00 FFFFh generation, XAR5 is decremented
by 1. The CPU reads the content of
T2 and writes it to I/O address 00
FFFEh.
6.10.5.6 *(ARn + T0/AR0) Used For I/O and xI/O Spaces Access
C54CM = 0 (and .c54cm_off assembler directive) C54CM = 1 (and .c54cm_on assembler directive)
*(ARn + T0) I/O − xI/O generated address in *(ARn + AR0) I/O − xI/O generated address in
linear mode: XARn linear mode XARn
I/O − xI/O generated address in I/O − xI/O generated address in
circular mode: circular mode:
(ARnH:BSAyy) + (00:ARn) (ARnH:BSAyy) + (00:ARn)
XARn modification: XARn modification:
XARn = XARn + T0 XARn = XARn + AR0
T0 is a 16-bit signed value. AR0 is a 16-bit signed value.
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Ra = Smem T2 = port(*(AR4 + T0)) XAR4 The CPU reads the value at I/O
Assume XAR4 = address 00 FF80h and loads it into
00 FF80h T2. After being used for the address
generation, XAR4 is incremented by
the number in T0.
Smem = ALLa port(*(AR5 + T0)) = T2 XAR5 The CPU reads the content of T2 and
Assume XAR5 = writes it to I/O address 00 FFFFh.
00 FFFFh After being used for the address
generation, XAR5 is incremented by
the number in T0.
dbl(Smem) = ALLa volatile(dbl(*AR5 + XAR5 The CPU reads the content of AC2
T0)) = AC2 Assume XAR5 = and writes it to xI/O address
02 FFFEh 02 FFFEh. After being used for the
address generation, XAR5 is
incremented by the number in T0.
6.10.5.7 *(ARn – T0/AR0) Used For I/O and xI/O Spaces Access
C54CM = 0 (and .c54cm_off assembler directive) C54CM = 1 (and .c54cm_on assembler directive)
*(ARn – T0) I/O − xI/O generated address in *(ARn – AR0) I/O − xI/O generated address in
linear mode: XARn linear mode: XARn
I/O − xI/O generated address in I/O − xI/O generated address in
circular mode: circular mode:
(ARnH:BSAyy) + (00:ARn) (ARnH:BSAyy) + (00:ARn)
XARn modification: XARn modification:
XARn = XARn − T0 XARn = XARn − AR0
T0 is a 16-bit signed value. AR0 is a 16-bit signed value.
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Ra = Smem T2 = port(*(AR4 − T0)) XAR4 The CPU reads the value at I/O
Assume XAR4 = address 00 FF80h and loads it into
00 FF80h T2. After being used for the address
generation, XAR4 is decremented
by the number in T0.
Smem = ALLa port(*(AR5 – T0)) = T2 XAR5 The CPU reads the content of T2
Assume XAR5 = and writes it to I/O address
00 FFFFh 00 FFFFh. After being used for the
address generation, XAR5 is
decremented by the number in T0.
Ra = Smem T2 = volatile(*AR4 − T0) XAR4 The CPU reads the value at xI/O
Assume XAR4 = address generation 01 FF80h and
01 FF80h loads it into T2. After being used for
the address, XAR4 is decremented
by the number in T0.
dbl(Smem) = ALLa volatile(dbl(*AR5 − T0)) XAR5 The CPU reads the content of AC2
= AC2 Assume XAR5 = and writes it to xI/O address
02 FFFEh 02 FFFEh. After being used for the
address generation, XAR5 is
decremented by the number in T0.
C54CM = 0 (and .c54cm_off assembler directive) C54CM = 1 (and .c54cm_on assembler directive)
*ARn(T0) I/O − xI/O generated address in linear *ARn(AR0) I/O − xI/O generated address in linear
mode: XARn + T0 mode: XARn + AR0
I/O − xI/O generated address in circular I/O − xI/O generated address in circular
mode: mode:
(ARnH:BSAyy) + (00:ARn) + T0 (ARnH:BSAyy) + (00:ARn) + AR0
XARn is not modified. XARn is used as XARn is not modified. XARn is used as
a base pointer. T0 is a 16-bit signed a base pointer. AR0 is a 16-bit signed
value added to the base pointer. value added to the base pointer.
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
6.10.5.9 *(ARn + Tx), (Tx = T1, T2, or T3) Used For I/O and xI/O Spaces Access
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Ra = Smem AR3 = port(*(AR9 + T1)) XAR9 The CPU reads the value at I/O
Assume XAR9 = address 00 FF80h and loads it
00 FF80h into XAR3. After being used for
the address generation, XAR9 is
incremented by the number in T1.
Smem = ALLa port(*(AR10 + T3)) = AR0 XAR10 The CPU reads the content of
Assume XAR10 = XAR0 and writes it to I/O address
00 FFFFh 00 FFFFh. After being used for
the address generation, XAR10 is
incremented by the number in T3.
Ra = Smem AR3 = volatile(*AR9 + T1) XAR9 The CPU reads the value at xI/O
Assume XAR9 = address 01 FF80h and loads it
01 FF80h into XAR3. After being used for
the address generation, XAR9 is
incremented by the number in T1.
dbl(Smem) = ALLa volatile(dbl(*AR10 + T3)) = XAR10 The CPU reads the content of
XAR0 Assume XAR10 = XAR0 and writes it to xI/O
02 FFFFh address 02 FFFFh. After being
used for the address generation,
XAR10 is incremented by the
number in T3.
6.10.5.10 *(ARn – Tx), (Tx = T1, T2, or T3) Used For I/O and xI/O Spaces Access
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Ra = Smem AR3 = port(*(AR9 – T2)) XAR9 The CPU reads the value at I/O
Assume XAR9 = address 00 FF80h and loads it
00 FF80h into XAR3. After being used for
the address generation, XAR9 is
decremented by the number in
T2.
Smem = ALLa port(*(AR10 – T2)) = AR0 XAR10 The CPU reads the content of
Assume XAR10 = AR0 and writes it to I/O address
00 FFFFh FFFFh. After being used for the
address generation, XAR10 is
decremented by the number in
T2.
Ra = Smem AR3 = volatile(*AR9 − T2) XAR9 The CPU reads the value at xI/O
Assume XAR9 = address 01 FF80h and loads it
01 FF80h into XAR3. After being used for
the address generation, XAR9 is
decremented by the number in
T2.
dbl(Smem) = ALLa volatile(dbl(*AR10 − T2)) = XAR10 The CPU reads the content of
XAR0 Assume XAR10 = XAR0 and writes it to xI/O
02 FFFEh address 02 FFFEh. After being
used for the address generation,
XAR10 is decremented by the
number in T2.
6.10.5.11*ARn(Tx), (Tx = T1, T2, or T3) Used For I/O and xI/O Spaces Access
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Smem = ALLa port(*AR10(T3)) = AR0 XAR10 + T3 The CPU reads the content of
Assume XAR10 = XAR0 and writes it to I/O
00 FFFAh address 00 FFFFh. XAR10 is
and T3 = 5 not modified.
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Ra = Smem AR3 = port(*AR12(#8)) XAR12 + 8 The CPU reads the value at I/O
address (XAR12+ 8) and loads
it into AR3. XAR12 is not
modified.
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Ra = Smem AR3 = port(*+AR12(#8)) XAR12 + 8 Before XAR12 is used for the I/O
address generation, the constant
is added to XAR12. The CPU
reads the value at I/O address
(XAR12 + 8) and loads it into
AR3.
Smem = ALLa port(*+AR8(#20)) = T1 XAR8 + 20 Before XAR8 is used for the I/O
address generation, the CPU
reads the content of T1 and
writes it to I/O address
(XAR8 + 20).
dbl(Smem) = ALLa volatile(dbl(*+AR8(#20))) = T1 XAR8 + 20 Before XAR8 is used for the xI/O
address generation, the CPU
reads the content of T1 and
writes it to I/O address
(XAR8 + 20).
Operand Description
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Instruction Syntax that can have Smem or Ymem qualified to access I/O
space
Smem = Ymem
Ymem = Smem
Smem = Ymem
Ymem = Smem
dbl(Smem) = dbl(Ymem)
dbl(Ymem) = dbl(Smem)
The instructions below having the Smem syntax element cannot be used
for I/O or xI/O space accesses:
Instruction Syntax that Does Not Support I/O − xI/O Spaces Accesses
delay(Smem)
Instruction Syntax that Does Not Support I/O − xI/O Spaces Access
Ra = uns(byte(Smem))
byte(Smem) = Ra
byte(Smem) = byte(Ymem)
byte(Ymem) = byte(Smem)
byte(Smem) = k8
mar(byte(Smem))
Note:
Some differences apply on restrictions on accesses to I/O and xI/O space
when the CPU is in byte-pointer mode, see Section 7.11 for more details.
A i
ARnH:BSAyy 00:ARn
All ARnH (with n = 0−7) must be loaded via its extended auxiliary register.
Note:
For source code compatibility with C55x DSP generations, the coefficient
data pointer XCDP is mapped by the assembler tool to the XAR15 register
in the C55x+ DSP. AR15H can be loaded individually.
For a buffer of bits, the buffer start address register defines the reference bit,
and the pointer selects bits relative to the position of that reference bit. You
need only to load ARn (with n = 0−7); you do not have to load XARn.
Note:
The extended auxiliary registers XAR8−XAR14 cannot be configured for cir-
cular addressing. There are no corresponding circular configuration bits in
the ST2_55 registers for these registers.
Buffer Start
Linear/Circular Address Buffer Size Computed Circular
Pointer Configuration Bit Register Register Buffer Start Address
Each of the eight extended auxiliary registers XARn (XAR0−XAR7) has its own
linear/circular configuration bit in ST2_55. XAR8−XAR14 registers cannot be
used for circular addressing.
0 Linear addressing
1 Circular addressing
The CDPLC bit in status register ST2_55 configures the DSP to use the
XAR15 register for linear or circular addressing:
0 Linear addressing
1 Circular addressing
You can use the circular addressing instruction qualifier if you want every
pointer used by the instruction to be modified circularly. In algebraic assembler
code, add the circular() qualifier in parallel with the instruction (instruction || cir-
cular()). The circular addressing instruction qualifier overrides the linear/circu-
lar configuration in ST2_55.
Note:
In case of circular pointer being decremented by a signed index register (T0,
AR0, or T1, T2, T3), the step size is the twos complement of the content of
that register. There is no twos complement of the negative maximum value
8000h. This means subtracting 8000h is an illegal operation.
Figure 6−10 summarizes how the circular address is computed with the follow-
ing form:
(ARnH: BSAyy) + (00 + ARn) + Step
Unlike on the C55x DSP generations, the circular pointer modification is per-
formed on 24-bit width.
ARn/AR15
Pre/Post modification Step (+/− T0/1/2/3, #K, short(#k)), .. Virtual buffer computation on
16-bit
BKxx/BKC
Note:
See Section 7.11 for the differences regarding the circular buffer computa-
tion.
The following code demonstrates initializing and then accessing a circular buffer.
BK03 = #3h ; Circular buffer size is 3 words
Bit(ST2_55, @AR1LC) ; AR1 is configured to be modified circularly
mar(XAR1 = #07FFFEh) ; The 8 MSBs of the circular buffer start address
; (07FFFEh) are stored into AR1H
BSA01 = #07FFFEh ; The 16 LSBs of the circular buffer start address
; (07FFFEh) are stored into BSA01
mar(AR1 = #0000h) ; Index (in AR1) is 0000h
3) Initialize the appropriate extended auxiliary register (XARn) with the main
data page in the seven MSBs (ARnH).
Since above procedure requires setting the BSAyy register to 0, the source
code migrated from the C54x needs to comply with the rule described in Sec-
tion 6.10.2 about circular buffer memory allocation alignment.
If you are using indirect addressing operands with offsets, then ensure that the
absolute value of each offset is less than or equal to (buffer size − 1). Likewise,
if the circular pointer is to be incremented or decremented by a programmed
amount (supplied by a constant or by AR0, or T1, T2, T3), then ensure the ab-
solute value of that amount is less than or equal to (buffer size − 1).
What follows is an example code sequence that emulates a C54x DSP circular
buffer:
BK03 = #3h ; Circular buffer size is 3 words
bit(ST2_55, @AR1LC) = #1 ; AR1 is configured to be modified circularly
XAR1 = #010000h ; Circular buffer is in main data page 01
AR1 = #0A01h ; Circular buffer start address is 010A00h
BSA01 = #0h ; BSA01 is 0, so that it has no effect
AC0 = *AR1+ ; AC0 loaded from 010A01h, and then AR1 = 0A02h
AC0 = *AR1+ ; AC0 loaded from 010A02h, and then AR1 = 0A00h
AC0 = *AR1+ ; AC0 loaded from 010A00h, and then AR1 = 0A01h
This circular buffer implementation has the disadvantage that it requires the
alignment of the circular buffer on an 8-word address boundary. To remove this
constraint, you can initialize BSA01 with an offset. For example:
BK03 =#3h ; Circular buffer size is 3 words
bit(ST2_55, @AR1LC) = #1 ; AR0 is configured to be modified circularly
XAR1 = #010000h ; Circular buffer is in main data page 01
AR1 = #0A01h ; Circular buffer start address is 010A00h
BAS01 = #2h ; Add an offset of 2 to the buffer start address,
; so that the effective start address is 010A02h
Byte-Pointer
Mode
This chapter introduces the two stacks located on the C55x+ DSP. It also ex-
plains how they relate to each other and how they are used by the CPU during
automatic context switching (saving register values before executing an inter-
rupt or a subroutine and restoring those values when the return from the inter-
rupt or the subroutine is executed).
Topic Page
7-1
Introduction on Byte-Pointer Addressing Mode
The C55x+ DSP has two different execution modes in order to execute codes
using 23-bit effective word addresses (in CPU word-pointer mode) or using
24-bit effective byte addresses (in CPU byte-pointer mode).
In word-pointer mode, you can recompile and execute the C55x DSP gen-
eration source code.
The BPTR bit (see Section 2.10.4.1) switches execution from one mode to the
other.
This chapter describes the C55x+ DSP behavior in byte-pointer mode such as
byte(Smem) syntax element and byte specific instructions. It also describes
the differences occurring between word- and byte-pointer modes for the fea-
tures below.
The address buses carry 24-bit byte addresses. In byte-pointer mode, when
the CPU reads from or writes to a data space, the 24-bit effective byte address
is used as on the address buses. For example, suppose an instruction reads
a word at the 24-bit byte address 00 0204h. The appropriate data-read ad-
dress bus carries the 24-bit value 00 0204h.
Effective byte address: 0000 0000 0000 0010 0000 0100
Data-read address bus value: 0000 0000 0000 0010 0000 0100
byte(Smem) = byte(Ymem) Copy an 8-bit value from one location to another (see Sections 7.5.3 through
7.5.6 for byte(Smem) and byte(Ymem) addressing operands details)
byte(Ymem) = byte(Smem)
Note:
Only the instruction Ra=uns(low_byte(mmap(@RegisterID))) can be
used in byte-pointer mode to access a CPU register with its register ID.
Note:
If the instructions listed in Table 7−1 are used in word-pointer mode, then the
CPU generates a bus error interrupt (BERRINT).
Note:
1) In the byte-pointer mode, when a word memory address (16 bits of data)
or a long word memory address (32 bits of data) is unlined, the CPU gen-
erates a bus error.
2) The C55x+ DSP always makes 16-bit accesses to the data stack; there-
fore, in the byte-pointer mode, you must ensure that the XSP content is
even. If not, then the CPU generates a bus error when executing a
push(), pop(), call(), return(), trap(), intr(), H/W interrupt, or a return from
interrupt.
3) These address alignment rules are different when the CPU is in word-
pointer mode, see Section 3.3.2 for more details.
When the CPU accesses words, the address used for the access is the ad-
dress of bits[16−8] of the 16-bit value.
When the CPU accesses long words, the address used for the access is the
address of bits[31−24] of the 32-bit value.
To access a long word, you must reference its most significant byte
(bits[31−24]). C is accessed at address 0204h. D is accessed at address
00 020Ah which is an illegal long word address, resulting in a CPU bus er-
ror in the byte-pointer mode.
To access a word, you must reference its most significant byte (bits[15−8]).
B is accessed at address 0202h. E is accessed at address 00 020Dh
which is an illegal word address, resulting in a CPU bus error in the byte-
pointer mode.
A Byte 00 0200h
B Word 00 0202h
F Byte 00 020Eh
G Byte 00 020Fh
ÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉ
00 0204h−00 0207h bits[31−24] of C bits[23−16] of C bits[15−8] of C bits[7−0] of C
00 0208h−00 020Bh
ÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉÉ
ÇÇÇÇÇÇÇÇÇÇÇÇ D
00 020Ch−00 020Fh
ÇÇÇÇÇÇÇÇÇÇÇÇ E F G
For example, if the CPU is in word-pointer mode and you want to switch to
byte-pointer mode, then a word address must be shifted to the MSBs by one
bit to convert it to a byte address before being used. Once this address has
been converted to a byte address, no scaling is applied by the CPU during the
code execution.
Note that for the stack pointers XSP and XSSP, the appropriate address shift
is performed automatically by hardware when switching from one mode to
another.
You can switch pointer modes with a function call as described in Section
2.10.4.1.
The CPU uses only one software stack: the data stack referenced by XSP.
The system stack referenced by XSSP is not used.
When the CPU is in the byte-pointer mode, the CPU does not use the system
stack. The only stack pointer available in byte-pointer mode is the data stack
pointer XSP.
The XSP register contains the 24-bit address of the value last pushed onto the
data stack. The CPU decrements XSP before pushing a value onto the stack,
and increments XSP after popping a value off the stack. You can allocate the
data stack anywhere in the data space. As mentioned in Section 2.6.7, the
C55x+ DSP has a 24-bit flat data addressing mechanism. This allows the stack
to span over the 64-KWord data page boundaries, and to have a size greater
than 64 KWords. The stack pointer increments or decrements happening dur-
ing stack operations are done linearly on 24-bit width.
Note:
When switching from the word- to byte-pointer mode, the C54CM bit (ST1[5])
is set to 0. See Section 7.11 for more details on the C54x DSP-compatible
mode in byte-pointer mode.
1) The current processor pointer mode and the called routine pointer mode
are both the byte-pointer mode.
Before beginning executing the called routine, the CPU automatically
saves CFCT and RETA to the data stack. The CPU decrements the data
stack pointer XSP by two before each 16-bit write to the stack. The system
stack pointer XSSP is not used.
Data Stack
Byte 0 Byte 1
At the same time, the CPU saves the return address to RETA as well as the
loop context flags and the pointer mode bit in CFCT (see the following fig-
ure).
2) The current processor mode is the word-pointer mode. The called routine
pointer mode is the byte-pointer mode.
Before beginning executing the called routine, the CPU automatically
saves CFCT and RETA to the data stack. The CPU decrements the data
stack pointer XSP by one before each 16-bit write to the stack. The system
stack pointer XSSP is not used.
Data Stack
Byte 0 Byte 1
At the same time, the CPU saves the return address to RETA as well as the
loop context flags and the pointer mode bit in CFCT (see the following fig-
ure).
As shown on the following figure, during the completion of the call instruc-
tion, the CPU automatically shifts the data stack pointer (XSP) by one to
the MSBs for proper alignment to operate in the byte-pointer mode (see
Section 7.2.3 for alignment details).
Data Stack
Byte 0 Byte 1
3) The current processor mode is the byte-pointer mode. The called routine
pointer mode is the word-pointer mode.
The system stack pointer XSSP is used because of the called routine
pointer mode (word). Before beginning executing the called routine, the
CPU automatically saves CFCT and RETA to the system and data stacks
in parallel. Before each 16-bit write to the stacks, the CPU decrements the
data and system stack pointers by two.
After
XSSP = (x − 2) CFCT RETA(23−16) XSP = (y − 2) RETA(15−8) RETA(7−0)
Save
Before Previously Previously Previously Previously
XSSP = x XSP = y
Save saved data saved data saved data saved data
At the same time, the CPU saves the return address to RETA as well as the
loop context flags and the pointer mode bit in CFCT (see the following fig-
ure).
As shown on the following figure, during the completion of the call instruc-
tion, the CPU automatically shifts the data stack pointer (XSP) by one to
the LSBs for proper alignment to operate in the word-pointer mode.
Data Stack
Byte 0 Byte 1
At the same time, the CPU saves the return address to RETA as well as the
loop context flags and the pointer mode bit in CFCT (see the following fig-
ure).
A return from interrupt instruction at the end of an ISR forces the CPU to
restore values in the opposite order. First, the CPU transfers the return ad-
dress from RETA to PC and restores its loop context flags as well as its
pointer mode bit from CFCT. Second, the CPU reads the CFCT, RETA,
DBSTAT, ST1, ST0, and ST2 values from the data stack. The CPU incre-
ments the data stack pointer (XSP) by two after each read from the data
stack.
2) The current processor mode is the word-pointer mode, and the interrupt
service routine (ISR) pointer mode is the byte-pointer mode.
Before beginning executing the interrupt service routine (ISR) routine, the
CPU automatically saves the ST2, ST0, ST1, DBSTAT, CFCT, and RETA
registers to the data stack. The CPU decrements the data stack pointer
XSP by one before each 16-bit write to the stack. The system stack pointer
XSSP is not used.
Data Stack
Byte 0 Byte 1
At the same time, the CPU saves the return address to RETA as well as the
loop context flags and the pointer mode bit in CFCT (see the following fig-
ure).
As shown on the following figure, during the completion of the interrupt ac-
knowledgement, the CPU automatically shifts the data stack pointer
(XSP) by one to the MSBs for proper alignment to operate in the byte-
pointer mode (see Section 7.2.3 for alignment details).
Data Stack
Byte 0 Byte 1
DBSTAT(15−8) DBSTAT(7−0)
ST1_55(15−8) ST1_55(7−0)
ST0_55(15−8) ST0_55(7−0)
ST2_55(15−8) ST2_55(7−0)
A return from the interrupt instruction at the end of an ISR forces the CPU
to restore values in the opposite order. First, the CPU transfers the return
address from RETA to PC and restores its loop context flags as well as its
pointer mode bit from CFCT. Second, the CPU reads the CFCT, RETA,
DBSTAT, ST1, ST0, and ST2 values from the data stack. The CPU incre-
ments the data stack pointer (XSP) by two after each read from the data
stack. During the completion of the return from interrupt instruction, the
CPU automatically shifts the data stack pointer (XSP) by one to the LSBs
to restore the data stack pointer address in word-pointer mode.
3) The current processor mode is the byte-pointer mode, and the interrupt
service routine (ISR) pointer mode is the word-pointer mode.
The system stack pointer XSSP is used because of the interrupt service
routine (ISR) pointer mode (word). Before beginning executing interrupt
service routine (ISR), the CPU automatically saves the ST2, ST0, ST1,
DBSTAT, CFCT, and RETA registers to the system and data stacks in par-
allel. Before each 16-bit write to the stacks, the CPU decrements the data
and system stack pointers by two.
After
XSSP = (x − 6) CFCT RETA(23−16) XSP = (y − 6) RETA(15−8) RETA(7−0)
Save
XSSP = (x − 4) DBSTAT(15−8) DBSTAT(7−0) XSP = (y − 4) ST1_55(15−8) ST1_55(7−0)
XSSP = (x − 2) ST0_55(15−8) ST0_55(7−0) XSP = (y − 2) ST2_55(15−8) ST2_55(7−0)
Before Previously Previously Previously Previously
XSSP = x XSP = y
Save saved data saved data saved data saved data
At the same time, the CPU saves the return address to RETA as well as the
loop context flags and the pointer mode bit in CFCT (see below).
As shown on the following figure, during the completion of the interrupt in-
struction, the CPU automatically shifts the data stack pointer (XSP) by one
to the LSBs for proper alignment to operate in the word-pointer mode.
A return from the interrupt instruction at the end of a subroutine forces the
CPU to restore values in the opposite order. First, the CPU transfers the
return address from RETA to PC and restores its loop context flags as well
as its pointer mode bit from CFCT. Second, the CPU reads the CFCT,
RETA, DBSTAT, ST1, ST0, and ST2 values from the stacks. The CPU in-
crements the data stack pointer (XSP) and the system stack pointer
(XSSP) by 1 after each read from the stacks. During the completion of the
return from the interrupt instruction, the CPU automatically shifts the stack
pointers (XSP and XSSP) by one to the MSBs to restore the data stack
pointer address in byte-pointer mode (see Section 7.2.3 for alignment de-
tails).
Whether the CPU operates in word- or byte-pointer mode, the CPU services
the interrupts with the same procedure as the one described in Section 5.1.
More specifically:
The CPU starts executing all ISRs in the CPU default pointer mode as de-
fined during a hardware or software reset (see Section 4.2).
As shown in the following table, the automatic context switch occurs and
varies depending on:
The CPU pointer mode before the interrupt is acknowledged.
The CPU default pointer mode.
Pointer Mode at Interrupt Acknowledgement Default CPU Pointer Mode See Section ...
In byte-pointer mode, the C55x+ DSP supports the same addressing modes
as the ones described in Section 6.2:
Note:
In byte-pointer mode, the C55x+ DSP registers are not memory-mapped.
See Section 7.5.2 for more details.
Note:
During the address computation or pointer modification associated with the
addressing modes described in this section, an increment past FF FFFFh or
a decrement past 00 0000h causes the address to wrap around. Do not make
use of this behavior; it is not supported.
In the byte-pointer mode, the 24 bits of the generated address are used
to address the memory.
In the word-pointer mode, the 23 LSBs of the generated address are used
to address the memory.
Table 7−3. Absolute Addressing Mode Differences Between Byte- and Word-Pointer
Modes
dbl(Smem), dbl(Smem),
Operands byte(Smem) Smem HI(Smem)/LO(Smem) Smem HI(Smem)/LO(Smem)
abs16(#K16) DPH:K16
*(#k24) k24
The assembler syntax of the XDP direct addressing mode is identical in byte-
and word-pointer modes. See Section 6.4.1 for more details on assembly syn-
tax.
In the byte-pointer mode, the generated address is the 24-bit sum of two val-
ues (see Table 7−4):
The calculation of Doffset by the assembler depends on the size of the refer-
enced element (see Table 7−5 for more details).
XDP identifies the start address of a local data page where 8-, 16-, or 32-bit
elements can be referenced. The size of the local data page varies depending
on the size of the referenced element:
Table 7−4. XDP Direct Addressing Mode Doffset Scaling Differences Between Byte- and
Word-Pointer Modes
dbl(Smem), dbl(Smem),
HI(Smem)/ HI(Smem)/
Operands byte(Smem) Smem LO(Smem) Smem LO(Smem)
@(Daddr) XDP+Doffset XDP+(Doffset <<1) XDP+(Doffset<<2) XDP+Doffset XDP+Doffset
Data memory, Doffset = ((Daddr – .dp) >> 1) & 7Fh Daddr is the 24-bit address for the read or
Smem write operation; .dp is a value you assign
with the .dp assembler directive (.dp
generally matches XDP); the symbol >>
indicates a logical shift to the LSBs; the
symbol & indicates a bitwise AND operation.
Data memory, Doffset = ((Daddr – .dp) >> 2) & 7Fh Daddr is the 24-bit address for the read or
dbl(Smem), write operation; .dp is a value you assign
HI(Smem)/LO(Smem) with the .dp assembler directive (.dp
generally matches XDP); the symbol >>
indicates a logical shift to the LSBs; the
symbol & indicates a bitwise AND operation.
The following three examples illustrate how in byte-pointer mode the assem-
bler automatically subtracts .dp from Daddr and scales the result down to com-
pute Doffset according to the size of the referenced memory location.
Example 1 uses XDP direct addressing to access an 8-bit data memory loca-
tion:
XDP = #07FFE0h ;For run-time, XDP is 07 FFE0h
.dp = #07FFE0h ;For assembly time, .dp is 07 FFE0h
T2 = byte(@07FFE9h) ;Load T2 with the 8-bit value at address 07 FFE9h
Example 2 uses XDP direct addressing to access a 16-bit data memory loca-
tion:
XDP = #07FFE0h ;For run-time, XDP is 07 FFE0h
.dp = #07FFE0h ;For assembly time, .dp is 07 FFE0h
T2 = @07FFE2h ;Load T2 with the 16-bit value at address 07 FFE2h
The 7-bit offset that you specify in the instruction. This offset is scaled ac-
cording to the size of the referenced element (8-, 16-, or 32-bit values).
XSP identifies a stack frame where the 8-, 16-, or 32-bit elements can be refer-
enced. The size of the stack frame varies depending on the size of the refer-
enced element:
128 bytes when the 8-bit elements are referenced.
128 words when the 16-bit elements are referenced.
128 long words when the 32-bit elements are referenced.
Table 7−6 describes the offset scaling for the address calculation. This table
also gives the correspondence and difference between the byte- and word-
pointer modes for the operand syntax and address calculation.
dbl(Smem) dbl(Smem)
HI(Smem) HI(Smem)
Operands byte(Smem) Smem LO(Smem) Operands Smem LO(Smem)
In byte-pointer mode, C54CM is always 0 (see Section 7.11 for more details):
*(ARn+AR0), *(ARn−AR0), ARn(AR0), *(ARn+AR0B), and *(ARn−AR0B) in-
direct operands are not available.
In byte-pointer mode, when an operand specifies an offset for the XAR indirect
addressing mode, this offset is scaled according to the size of the referenced
element (8-, 16-, or 32-bit). Table 7−7 lists the syntax differences for the follow-
ing indirect operands: *ARn[#K16], *+ARn[#K16], *ARn(short[#k4]),
*ARn(#K16), *+ARn(#K16), and *ARn(short(#k4)).
In byte-pointer mode, when the XAR indirect addressing mode accesses data
space, the selected 24-bit extended auxiliary register, XARn, contains a 24-bit
effective byte address.
Table 7−7 lists the address index/offset scaling for the address calculation
when these operands are used. This table also gives you the correspondence
and difference between the byte- and word-pointer modes for the operand
syntax and address calculation.
dbl(Smem) dbl(Smem)
HI(Smem) HI(Smem)
Operands byte(Smem) Smem LO(Smem) Smem LO(Smem)
*ARn 0 0 0 0 0
*ARn+ +1 +2 +4 +1 +2
*ARn− −1 −2 −4 −1 −2
*+ARn +1 +2 +4 +1 +2
*−ARn −1 −2 −4 −1 −2
*(ARn + Tx) +Tx +(Tx << 1) +(Tx << 2) +Tx +Tx
*(ARn − Tx) −Tx −(Tx <<1) −(Tx <<2) −Tx −Tx
*ARn(Tx) +Tx +(Tx << 1) +(Tx << 2) +Tx +Tx
*(ARn − T0B) −T0 −(T0<< 1) −(T0<< 2) −T0 −T0
*(ARn + T0B) +T0 +(T0 << 1) +(T0 << 2) +T0 +T0
*ARn[#K16] +k16 +(k16 << 1) +(k16 << 2) +k16 +k16
*+ARn[#K16] +k16 +(k16 << 1) +(k16 << 2) +k16 +k16
*ARn(short[#k4]) +k4 +(k4 << 1) +(k4 << 2) +k4 +k4
*ARn(XAR15[23:4]) N/A +((XAR15>> 4) <<1) N/A XAR15>> 4 N/A
The XAR indirect addressing mode to register bits is used in the same way in
byte- and word-pointer modes. See Section 6.5.1.2 for more details.
The dual XAR indirect operands for dual XAR indirect addressing mode to data
space are different in word- and byte-pointer modes (see Table 6−4 for the list
of indirect operands in the word-pointer mode).
In the byte-pointer mode, C54CM is always 0 (see Section 7.11 for more de-
tails); *(ARn+AR0), *(ARn−AR0), and ARn(AR0) indirect operands are not
available.
In the byte-pointer mode, when an operand specifies an offset for the XAR dual
indirect addressing mode, this offset is scaled according to the size of the refer-
enced element (8-, 16-, or 32-bit).
In the byte-pointer mode, when the dual XAR indirect addressing mode ac-
cesses data space, the selected 24-bit extended auxiliary register, XARn, con-
tains a 24-bit effective byte address.
Table 7−8 lists the address index/offset scaling for the address calculation
when these operands are used. This table also gives you the correspondence
and difference between the byte- and word-pointer modes for the operand
syntax and address calculation.
dbl(Smem) dbl(Smem)
dbl(Cmem) dbl(Cmem)
Smem HI(Smem) Smem HI(Smem)
Xmem LO(Smem) Xmem LO(Smem)
byte(Smem) Ymem HI(Cmem) Ymem HI(Cmem)
Operands byte(Ymem) Cmem LO(Cmem) Cmem LO(Cmem)
*ARn 0 0 0 0 0
*ARn+ +1 +2 +4 +1 +2
*ARn− −1 −2 −4 −1 −2
*ARn(T0) +T0 +(T0<< 1) +(T0<< 2) +T0 +T0
*(ARn + Tx) +Tx +(Tx << 1) +(Tx << 2) +Tx +Tx
*(ARn − Tx) −Tx −(Tx <<1) −(Tx <<2) −Tx −Tx
In the byte-pointer mode, when the coefficient indirect addressing mode ac-
cesses the data space, the selected 24-bit extended auxiliary register, XARn,
contains a 24-bit effective byte address.
Table 7−8 lists the address index/offset scaling for the address calculation
when these operands are used. This table also gives you the difference be-
tween byte and word modes for the address calculation.
Table 7−9 describes the absolute address computations (see Table 7−4 for
address computation).
Ra = byte(Smem) T2 = byte(*abs16(#0005h)) DPH:k16 = 03 0005h The CPU loads the value at address 03 0005h
into T2.
Ra = Smem T2 = *abs16(#0004h) DPH:k16 = 03 0004h The CPU loads the value at addresses
03 0004h:03 0005h (but only the 03 0004h
address is generated) into T2.
Ra = HI(Smem), T2 = HI(*abs16(#2020h)), DPH:k16 = 03 2020h The CPU reads the values at addresses
Ra+1 = LO(Smem) ¶ T3 = LO(*abs16(#2020h)) 03 2020h:03 2021h and 03 2022h:03 2023h
(but only the 03 2020h address is generated)
and copies them into T2 and T3, respectively.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Ra = byte(Smem) T2 = byte(*(#030005h)) k24 = 03 0005h The CPU loads the value at address 03 0005h into
T2.
Ra = Smem T2 = *(#030004h) k24 = 03 0004h The CPU loads the value at addresses
03 0004h:03 0005h (but only the 03 0004h
address is generated) into T2.
Ra = HI(Smem), T2 = HI(*(#032020h)), k24 = 03 2020h The CPU reads the values at addresses
Ra+1 = LO(Smem) ¶ T3 = LO(*(#032020h)) 03 2020h:03 2021h and 03 2022h:03 2023h (but
only the 03 2020h address is generated) and
copies them into T2 and T3, respectively.
Depending on which operand syntax is used, the XDP direct operand @Daddr,
the XSP direct operand *SP(offset), or the register ID direct operand
mmap(@registerID), the address computation is different. Table 7−11 through
Table 7−13 provide examples of how to use these addressing modes (see
Table 7−4 through Table 7−6 for details on index/offset scaling).
Ra = byte(Smem) T2 = byte(@030015h) XDP + Doffset The CPU loads the value at address
= 03 0010h + 05h 03 0015h into T2.
= 03 0015h
Ra = Smem T2 = @030014h XDP + (Doffset <<1) The CPU shifts Doffset 02h by 1 to the MSBs
= 03 0010h + (02h<<1) and adds it to XDP to construct an address
= 03 0014h (03 0014h) which is generated. The CPU
reads the value at addresses
03 0014h:03 0015h and loads the value into
T2.
Ra = HI(Smem), T2 = HI(@030020h), XDP + (Doffset<<2) The CPU reads the values at addresses
Ra+1 = LO(Smem) ¶ T3 = LO(@030020h) = 03 0010h + (04h<<2) 03 0020h:03 0021h and 03 0022h:03 0023h
= 03 0020h (but only 03 0020h is generated) and loads
the values into T2 and T3, respectively.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Ra = byte(Smem) T2 = byte(*SP[5]) XSP + offset The CPU loads the value at address 00 FF05h
= 00 FF00h + 05h into T2.
= 00 FF05h
Ra = Smem T2 = *SP[5] XSP + (offset<<1) The CPU shifts offset 05h by 1 to the MSBs and
= 00 FF00h + (05h << 1) adds it to XSP to construct an address
= 00 FF0Ah (00 FF0Ah) which is generated. The CPU reads
the value at addresses 00 FF0Ah:00 FF0Bh and
loads the value into T2.
Ra = HI(Smem), T2 = HI(*SP[4]), XSP + (offset<<2) The CPU reads the values at addresses
Ra+1 = LO(Smem) ¶ T3 = LO(*SP[4]) = 00 FF00h + (04h << 2) 00 FF10h:00 FF11h and 00 FF12h:00 FF13h
= 00 FF10h (but only the 00 FF10h address is generated) and
loads the values into T2 and T3, respectively.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Table 7−13. @(RegisterID) Used for CPU Register Access in Byte-Pointer Mode
Syntax Example Instruction Example Generated Address Description
Ra = byte(Smem) AR8 = byte(mmap(@AC14.L)) Register ID access through The CPU loads the 8 LSBs of
6Eh Register ID address AC14 accumulator into AR8.
Ra = Smem AR8 = mmap(@AC14.L) Register ID access through The CPU loads the 16 LSBs of
6Eh Register ID address AC14 accumulator into AR8.
Ra = HI(Smem), T2 = HI(mmap(@AC14)), Register ID access through The CPU load the 16 LSBs of
Ra+1 = LO(Smem) ¶ T3 = LO(mmap(AC14)) 0Eh Register ID address AC14 accumulators into T3 and
the 16 MSBs of AC14 into T2.
Examples on how the addresses are generated are shown in the following sec-
tions (see Table 7−7 and Table 7−8 for more detail on index scaling).
byte(Ymem) byte(Ymem) indicates one byte Dual XAR / Coefficient indirect addressing
Xmem, Ymem (8 bits) of data. mode:
dbl(Ymem) Xmem, Ymem indicate one word *ARn
HI(Cmem)/LO(Cmem) (16 bits) of data. *ARn+
dbl(Ymem) and HI(Cmem)/LO(Cmem) *ARn−
indicate one long word (32 bits) of *(ARn + T0)
data. *(ARn − T0)
*ARn(T0)
*(ARn + T1)
*(ARn − T1)
Operand Description
Ra = byte(Smem) T2 = byte(*AR4) XAR4 The CPU reads the value at address 01 FFFFh
Assume XAR4 = 01 FFFFh and loads it into T2. XAR4 is not modified.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Operand Description
Ra = byte(Smem) T2 = byte(*AR4+) XAR4 The CPU reads the value at address 01 FFFFh
Assume XAR4 = 01 FFFFh and loads it into T2. After being used for the
address generation, XAR4 is incremented by 1.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Operand Description
Ra = byte(Smem) T2 = byte(*−AR4) XAR4 − 1 Before being used for the address generation,
Assume XAR4 = 02 0000h XAR4 is decremented by 1. The CPU reads the
value at address 01 FFFFh and loads it into T2.
Ra = Smem T2 = *−AR4 XAR4 − 2 Before being used for the address generation,
Assume XAR4 = 02 0000h XAR4 is decremented by 2. The CPU reads the
value at addresses 01 FFFEh:01 FFFFh and
loads it into T2.
Ra = HI(Smem), T2 = HI(*−AR4), XAR4 − 4 Before being used for the address generation,
Ra+1 = LO(Smem) ¶ T3 = LO(*−AR4) Assume XAR4 = 02 0000h XAR4 is decremented by 4. The CPU reads the
values at addresses 01 FFFCh:01 FFFDh and
01 FFFEh:01 FFFFh (but only the 01 FFFCh
address is generated) and loads them into T2
and T3, respectively.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
7.6.3.4 *(ARn + Tx), *(ARn − Tx) (Tx =T0, T1, T2, or T3) Used For Data-Memory Access
Operand Description
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
7.6.3.5 *ARn(Tx) (Tx =T0, T1, T2 or T3) Used For Data-Memory Access
Operand Description
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Note: This addressing mode can be used for FFT buffer elements addressing. When this bit reverse operand is used, XARn can
be configured in the ST2_55 register for circular addressing; this removes alignment constraints on the FFT buffer start
address (see Section 6.9 for more details on BSAxx addition computation). However in this case, XARn is not impacted
by the circular addressing computation.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Operand Description
*ARn[#K16] Generated address in linear mode: If 8-bit access: XARn + K16
If 16-bit access: XARn + (K16<<1)
If 32-bit access: XARn + (K16<<2)
Generated address in circular mode: If 8-bit access: (ARnH:BSAyy) + (00:ARn) + K16
If 16-bit access: (ARnH:BSAyy) + (00:ARn) + (K16<<1)
If 32-bit access: (ARnH:BSAyy) + (00:ARn) + (K16<<2)
XARn is not modified. XARn is used as a base pointer. The 16-bit signed constant (K16) is 24-bit sign
extended before being scaled and added to the base pointer.
Generated Address
Syntax Example Instruction Example (Linear Addressing) Description
Ra = byte(Smem) AR3 = byte(*AR12[#8]) XAR12 + 8 The CPU reads the value at address
Assume XAR12 = 01FF00h 01 FF08h and loads it into AR3. XAR12 is not
modified.
Ra = Smem AR3 = *AR12[#8] XAR12 + (8<<1) The CPU reads the value at addresses
Assume XAR12 = 01FF00h 01 FF10h:01 FF11h and loads it into AR3.
XAR12 is not modified.
Ra = HI(Smem), AR2 = HI(*+AR5[#8]), XAR5 +( 8<<2) Before being used for the address generation,
Ra+1 = LO(Smem) ¶ AR3 = LO(*+AR5[#8]) Assume XAR12 = 01FF00h XAR12 is incremented by (8<<2). The CPU
reads the values at addresses
01 FF20h:01 FF21h and 01 FF22h:01 FF23h
and loads them into AR2 and AR3, respective-
ly.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Operand Description
*ARn(short[#k4]) Generated address in linear mode: If 8-bit access: XARn + k4
If 16-bit access: XARn + (k4<<1)
If 32-bit access: XARn + (k4<<2)
Generated address in circular mode: If 8-bit access: (ARnH:BSAyy) + (00:ARn) + k4
If 16-bit access: (ARnH:BSAyy) + (00:ARn) + (k4<<1)
If 32-bit access: (ARnH:BSAyy) + (00:ARn) + (k4<<2)
XARn is not modified. XARn is used as a base pointer. The 4-bit unsigned constant (k4) is zero ex-
tended to 24 bits before being scaled and added to the base pointer. k4 can be a number from 0 to
15.
Note: ¶ In instructions using HI(Smem)/LO(Smem) operands, Smem must refer to the same memory operand in both parts.
Operand Description
*ARn(XAR15[23:4]) Address generated in linear mode: XARn + (XAR15[23:4] << 1)
Address generated in circular mode: (ARnH:BSAyy) + (00:ARn) + (XAR15[23:4] << 1)
XARn is not modified. XARn is used as a base pointer. XAR15 has to be a positive value for this
addressing mode. The 20 bits from bit 4 to bit 23 of the XAR15 register is 24-bit zero extended
and is used as an unsigned offset from that base pointer: the offset is shifted to the MSBs by one
bit according to the alignment rules described in Section 7.2.3. This offset addressing mode
supports the C55x+ field insert/extract instructions. This operand can be used only with 16-bit
load/store/mar() instructions. It cannot be used with any other instructions.
NOTE: byte(Smem) and dbl(Smem) addressing modes are not available with
*ARn(XAR15[23:4]) operand in byte-pointer mode.
With instructions having the Baddr syntax element, you can use the indirect
operands to access register bits. As Baddr indicates directly the address of
one bit of data to access, only the byte(Smem) addressing mode can be used
for the register-bit indirect addressing mode in the byte-pointer mode. See
Section 6.8.2 for details on indirect operands.
In the byte-pointer mode, the C55x+ DSP supports the same xIO address-
ing modes as the ones described in Section 6.9; the absolute, direct, and
indirect addressing modes are available to access xI/O space. See Sec-
tion 7.7.1 for the description of these addressing modes.
In the byte-pointer mode, the C55x+ DSP supports the same absolute and
indirect I/O addressing modes as the ones described in Section 6.9. See
Section 7.7.1 for the description of these addressing modes. Note that
PDP direct addressing is not available in the byte-pointer mode.
The assembler syntax of the k24 absolute I/O addressing mode is the same
for both byte- and word-pointer modes (*port(#k24)); except that in byte-point-
er mode, the I/O address is specified with a 24-bit unsigned constant k24.
Note:
When this addressing mode is used, k24 must specify a valid I/O space ad-
dress (00 0000h − 01 FFFFh); in the case it is not, the CPU behavior is unde-
fined.
The k16 absolute I/O addressing mode is not available in the byte-pointer
mode. See Section 6.9.1.1 for more details on the k16 absolute addressing
mode in word-pointer mode.
Note:
In the byte-pointer mode, the PDP direct I/O addressing mode is not avail-
able. See Section 6.9.2.1 for more details on this addressing mode in the
word-pointer mode.
In the byte-pointer mode, when an operand specifies an offset for the XAR
indirect addressing mode, this offset is scaled according to the size of the
referenced element (8 or 16 bits). Table 7−15 lists the syntax differences for
the following indirect operands: *ARn[#K16], *+ARn[#K16], *ARn(short[#k4]),
*ARn(#K16), *+ARn(#K16), and *ARn(short(#k4)).
Table 7−15 lists the address index/offset scaling for the address calculation
when these operands are used. This table also gives you the correspondence
and difference between the byte- and word-pointer modes for the operand
syntax and address calculation.
In the byte-pointer mode, only the 17 LSBs of the generated XAR indirect
address are used to address the I/O space. This is different from the
word-pointer mode where only the 16 LSBs of the generated XAR indirect
address are used to address the I/O space.
Note:
Although an increment past 01 FFFFh or a decrement past 00 0000h causes
the XAR indirect I/O address to wrap around, do not make use of this behav-
ior. It is not supported. Also during circular addressing, the BSAxx addition
must not increment the address beyond 01 FFFFh (see Section 6.12 for
more details on circular addressing).
The XAR indirect operands for the XAR indirect addressing mode to xI/O
space are different in the word- and byte-pointer modes (see Table 6−21 for
the list of indirect operands in word-pointer mode).
In the byte-pointer mode, C54CM is always 0 (see Section 7.11 for more de-
tails); *(ARn+AR0), *(ARn−AR0), and ARn(AR0) indirect operands are not
available.
In the byte-pointer mode, when an operand specifies an offset for the XAR indi-
rect addressing mode, this offset is scaled according to the size of the refer-
enced element (8, 16, or 32 bits). Table 7−16 lists the syntax differences for
the following indirect operands: *ARn[#K16], *+ARn[#K16], *ARn(short[#k4]),
*ARn(#K16), *+ARn(#K16), and *ARn(short(#k4)).
Table 7−16 lists the address index/offset scaling for the address calculation
when these operands are used. This table also gives you the correspondence
and difference between byte- and word-pointer modes for the operand syntax
and address calculation.
In the byte-pointer mode, the whole 24 bits of the generated XAR indirect ad-
dress are used to address the xI/O space. This is different from the word-point-
er mode where only the 23 LSBs of the generated XAR indirect address are
used to address the xI/O space.
dbl(Smem) dbl(Smem)
HI(Smem) HI(Smem)
Operands byte(Smem) Smem LO(Smem) Smem LO(Smem)
*ARn 0 0 0 0 0
*ARn+ +1 +2 +4 +1 +2
*ARn− −1 −2 −4 −1 −2
*+ARn +1 +2 +4 +1 +2
*−ARn −1 −2 −4 −1 −2
*(ARn + Tx) +Tx +(Tx << 1) +(Tx << 2) +Tx +Tx
*(ARn − Tx) −Tx −(Tx <<1) −(Tx <<2) −Tx −Tx
*ARn(Tx) +Tx +(Tx << 1) +(Tx << 2) +Tx +Tx
*ARn[#K16] +k16 +(k16 << 1) +(k16 << 2) +k16 +k16
*+ARn[#K16] +k16 +(k16 << 1) +(k16 << 2) +k16 +k16
*ARn(short[#k4]) +k4 +(k4 << 1) +(k4 << 2) +k4 +k4
7.8.1 Addressing I/O Space with the I/O Absolute Addressing Mode
In the byte-pointer mode, to access the I/O space with the k24 absolute I/O
addressing mode, you can use *port(#k24) in instructions having the following
syntax element:
Table 7−17 provides some examples of I/O space accesses with the absolute
addressing mode.
Table 7−17. k24 Absolute Addressing Mode Used for I/O Spaces Access
Syntax Example Instruction Example Generated Address Description
Ra = byte(Smem) AR2 = *port(byte(#000003h)) k24 = 00 0003h The CPU truncates the generated address to its
16 LSBs and loads the value at the I/O address
0003h into AR2.
Smem = ALLa *port(#00F002h) = AR0 k24 = 00 F002h The CPU truncates the generated address to its
16 LSBs and stores the content of AR0 into I/O
addresses F002h:F003h.
Table 7−18 and Table 7−19 provide some examples of the xI/O space ac-
cesses with the k16 and k24 absolute xI/O addressing modes.
Table 7−18. k16 Absolute Addressing Mode Used For xI/O-Space Access
Table 7−19. k24 Absolute Addressing Mode Used For xI/O-Space Access
In the byte-pointer mode, to access the xI/O space with the XDP direct xI/O
addressing mode, you can use volatile(@Daddr) operand in instructions hav-
ing the following syntax element:
Table 7−20 provides examples on the XDP direct addressing mode accessing
I/O space.
Smem = ALLa volatile(@000014h) = T2 XDP + (Doffset<<1) The CPU shifts Doffset by one to the
= 00 0010h + (0002h<<1) MSBs and adds it to XDP to construct
= 00 0014h an address (00 0014h) which is gener-
ated. The CPU reads the content of T2
and writes it to xI/O addresses
00 0014h:00 0015h.
Ra = HI(Smem), T2 = volatile(HI(@000020h)). XDP + (Doffset<<2) The CPU reads the values at xI/O
Ra+1 = T3 = volatile(LO(@000020h)) = 00 0010h + (0004h<<2) addresses 00 0020h:00 0021h and
LO(Smem) = 00 0020h 00 0022h:00 0023h (but only the
00 0020h address is generated) and
loads it into T2 and T3, respectively.
In the byte-pointer mode, to access the xI/O space with the XAR indirect xI/O
addressing mode, you can use an indirect operand with volatile() qualifier in
instructions having one of the syntax element described in Table 7−22.
Note:
In the byte-pointer mode, only the 17 LSBs of the 24-bit indirect address is
used for an I/O access, whereas the whole 24 bits are used for an xI/O ac-
cess.
Table 7−21. Indirect Operands For I/O Space Access in Byte-Pointer Mode
byte(Smem) byte(Smem) indicates one byte (8 bits) of XAR indirect addressing mode to I/O:
Smem data *ARn
Smem indicates one word (16 bits) of *ARn+
data. *ARn−
*+ARn
*−ARn
*(ARn + Tx) (Tx can be T0, T1, T2, or T3)
*(ARn, − Tx)
*ARn(Tx)
*ARn[#K16]
*+ARn[#K16]
*ARn(short[#k4])
Table 7−22. Indirect Operands For xI/O Space Access in Byte-Pointer Mode
byte(Smem) byte(Smem) indicates one byte (8 bits) XAR indirect addressing mode to xI/O:
Smem, of data *ARn
dbl(Smem) Smem indicates one word (16 bits) of *ARn+
HI(Smem)/LO(Smem) data. *ARn−
dbl(Smem) and HI(Smem)/LO(Smem) *+ARn
indicates one long word (32 bits) of data *−ARn
*(ARn + Tx) (Tx can be T0, T1, T2, or T3)
*(ARn − Tx)
*ARn(Tx)
*ARn[#K16]
*+ARn[#K16]
*ARn(short[#k4])
Operand Description
*ARn I/O − xI/O generated address in linear mode: XARn
I/O − xI/O generated address in circular mode: (ARnH:BSAyy) + (00:ARn)
XARn is not modified.
Address Generated
Syntax Example Instruction Example (Linear Addressing) Description
Ra = byte(Smem) T2 = port(byte(*AR4)) XAR4 The CPU reads the value at I/O address
Assume XAR4 = 00FF80h FF80h and loads it into T2. XAR4 is not
modified.
Smem = ALLa port(*AR5) = T2 XAR5 The CPU reads the content of T2 and
Assume XAR5 = 00FFFEh writes it to I/O addresses FFFEh:FFFFh.
XAR5 is not modified.
Ra = byte(Smem) T2 = volatile(byte(*AR4)) XAR4 The CPU reads the value at xI/O address
Assume XAR4 = 01FF80h 01 FF80h and loads it into T2. XAR4 is not
modified.
Ra = Smem T2 = volatile(*AR4) XAR4 The CPU reads the value at xI/O address
Assume XAR4 = 01FF80h 01 FF80h:01 FF81h and loads it into T2.
XAR4 is not modified.
dbl(Smem) = volatile(dbl(*AR5)) = XAR2 XAR5 The CPU reads the content of XAR2 and
ALLa Assume XAR5 = 02FFFCh writes it to xI/O addresses 02 FFFCh −
02 FFFFh. XAR5 is not modified.
Operand Description
Address Generated
Syntax Example Instruction Example (Linear Addressing) Description
Ra = byte(Smem) T2 = port(byte(*AR4+)) XAR4 The CPU reads the value at I/O address
Assume XAR4 = 00FF80h FF80h and loads it into T2. After being used
for the address generation, XAR4 is increm-
ented by 1.
Smem = Ra port(*AR5+) = T2 XAR5 The CPU reads the content of T2 and writes
Assume XAR5 = 00FFFEh it to I/O addresses FFFEh:FFFFh. After be-
ing used for the address generation, XAR5
is incremented by 2.
Ra = byte(Smem) T2 = volatile(byte(*AR4+)) XAR4 The CPU reads the value at xI/O address
Assume XAR4 = 01FF80h 01 FF80h and loads it into T2. After being
used for the address generation, XAR4 is in-
cremented by 1.
Ra = Smem T2 = volatile(*AR4+) XAR4 The CPU reads the value at xI/O addresses
Assume XAR4 = 01FF80h 01 FF80h:01 FF81h and loads it into T2. Af-
ter being used for the address generation,
XAR4 is incremented by 2.
dbl(Smem) = volatile(dbl(*AR5+)) = AC2 XAR5 The CPU reads the content of AC2 and
ALLa Assume XAR5 = 02FFFCh writes it to xI/O addresses 02 FFFCh −
02 FFFFh (but only the 02 FFFCh address
is generated). After being used for the ad-
dress generation, XAR5 is incremented by
4.
Operand Description
*+ARn I/O − xI/O generated address in linear mode: If 8-bit access: XARn + 1
If 16-bit access: XARn + 2
If 32-bit access: XARn + 4
I/O − xI/O generated address in circular mode: If 8-bit access: (ARnH:BSAyy) + (00:ARn) + 1
If 16-bit access: (ARnH:BSAyy) + (00:ARn) + 2
If 32-bit access: (ARnH:BSAyy) + (00:ARn) + 4
XARn modification: If 8-bit access: XARn = XARn + 1
If 16-bit access: XARn = XARn + 2
If 32-bit access: XARn = XARn + 4
Note: 32-bit access is only available for xI/O access.
*–ARn I/O − xI/O generated address in linear mode: If 8-bit access: XARn − 1
If 16-bit access: XARn − 2
If 32-bit access: XARn − 4
I/O − xI/O generated address in circular mode: If 8-bit access: (ARnH:BSAyy) + (00:ARn) − 1
If 16-bit access: (ARnH:BSAyy) + (00:ARn) − 2
If 32-bit access: (ARnH:BSAyy) + (00:ARn) − 4
XARn modification: If 8-bit access: XARn = XARn − 1
If 16-bit access: XARn = XARn − 2
If 32-bit access: XARn = XARn − 4
Note: 32-bit access is only available for xI/O access.
Address Generated
Syntax Example Instruction Example (Linear Addressing) Description
Ra = byte(Smem) T2 = port(byte(+AR4)) XAR4 + 1 Before being used for the address genera-
Assume XAR4 = 00FFFFh tion, XAR4 is incremented by 1. The CPU
reads the value at I/O address 10000h and
loads it into T2.
Smem = Ra port(*−AR5) = T2 XAR5 − 2 Before being used for the address genera-
Assume XAR5 = 010000h tion, XAR5 is decremented by 2. The CPU
reads the content of T2 and writes it to I/O ad-
dresses FFFEh:FFFFh.
Ra = byte(Smem) T2 = volatile(byte(*+AR4)) XAR4 +1 Before being used for the address genera-
Assume XAR4 = 01FF7Fh tion, XAR4 is incremented by 1. The CPU
reads the value at xI/O address 01 FF80h
and loads it into T2.
Ra = Smem T2 = volatile(*+AR4) XAR4 +2 Before being used for the address genera-
Assume XAR4 = 01FF7Eh tion, XAR4 is incremented by 2. The CPU
reads the value at xI/O addresses
01 FF80h:01 FF81h and loads it into T2.
dbl(Smem) = volatile(dbl(*−AR5)) = AC2 XAR5 − 4 Before being used for the address genera-
ALLa Assume XAR5 = 030000h tion, XAR5 is decremented by 4. The CPU
reads the content of AC2 and writes it to xI/O
addresses 02 FFFCh − 02 FFFFh (but only
address 02 FFFCh is generated).
7.8.4.4 *(ARn + Tx), *(ARn − Tx), (Tx = T0, T1, T2 or T3) Used For I/O − xI/O Spaces Access
Operand Description
Address Generated
Syntax Example Instruction Example (Linear Addressing) Description
Ra = byte(Smem) AR3 = port(byte(*(AR7 + T1))) XAR7 The CPU reads the value at I/O ad-
Assume XAR7 = 00FF80h dress FF80h and loads it into AR3.
After being used for the address gen-
eration, XAR7 is incremented by the
number in T1.
Smem= ALLa port(*(AR5 + T2)) = AR4 XAR5 The CPU reads the content of AR4
Assume XAR5 = 00FFFEh and writes it to I/O address
FFFEh:FFFFh. After being used for
the address generation, XAR5 is in-
cremented by (T2<<1).
Ra = byte(Smem) AR3 = volatile(byte(*(AR9 − T1))) XAR9 The CPU reads the value at xI/O ad-
Assume XAR9 = 01FF81h dress 01 FF81h and loads it into
AR3. After being used for the ad-
dress, XAR9 is decremented by T1.
Ra = Smem AR3 = volatile(*(AR9 + T1)) XAR9 The CPU reads the value at xI/O ad-
Assume XAR9 = 01FF80h dresses 01 FF80h:01 FF81h and
loads it into AR3. After being used for
the address, XAR9 is incremented
by (T1<<1).
dbl(Smem) = volatile(dbl(*AR10 + T3)) = XAR0 XAR10 The CPU reads the content of XAR0
ALLa Assume XAR10 = 02FFFCh and writes it to xI/O address
02 FFFCh − 02 FFFFh (but only the
02 FFFCh address is generated). Af-
ter being used for the address gener-
ation, XAR10 is incremented by
(T3<<2).
7.8.4.5 *ARn(Tx) (Tx =T0, T1, T2, T3) Used For I/O − xI/O Spaces Access
Operand Description
*ARn(Tx) I/O − xI/O generated address in linear mode: If 8-bit access: XARn + Tx
If 16-bit access: XARn + (Tx<<1)
If 32-bit access: XARn + (Tx<<2)
I/O − xI/O generated address in circular mode: If 8-bit access: (ARnH:BSAyy) + (00:ARn) + Tx
If 16-bit access: (ARnH:BSAyy) + (00:ARn) + (Tx<<1)
If 32-bit access: (ARnH:BSAyy) + (00:ARn) + (Tx<<2)
XARn is not modified. XARn is used as a base pointer.
Tx is a 16-bit signed value scaled and added to the base pointer. Tx can be T0, T1, T2 or T3.
Note: 32-bit access is only available for xI/O access.
Address Generated
Syntax Example Instruction Example (Linear Addressing) Description
Ra = byte(Smem) AR3 = port(byte(*AR7(T3))) XAR7 + T3 The CPU reads the value at I/O ad-
Assume XAR7 = FF7Dh dress FF80h and loads it into AR3.
and T3 = 3. XAR7 is not modified.
Smem = ALLa port(*AR5(T1)) = AR4 XAR5 + (T1<<1) The CPU reads the content of AR4 and
Assume XAR5 = FFFAh writes it to I/O addresses
and T1 = 4. 10002h:10003h. XAR5 is not modified.
Ra = byte(Smem) AR3 = volatile(byte(*AR9(T3))) XAR9 + T3 The CPU reads the value at xI/O ad-
Assume XAR4 = 01FFFEh dress 01 FFFDh and loads it into AR3.
and T3 = −1 XAR9 is not modified.
Ra = Smem AR3 = volatile(*AR9(T3)) XAR9 + (T3<<1) The CPU reads the value at xI/O ad-
Assume XAR4 = 01FFFEh dresses 01 FFFCh:01 FFFDh and
and T3 = −1 loads it into AR3. XAR9 is not modified.
dbl(Smem) = volatile(dbl(*AR10(T3))) = XAR0 XAR10 + (T3<<2) The CPU reads the content of XAR0
ALLa Assume XAR10 = 02FFFCh and writes it to xI/O addresses
and T3 = 2h 03 0004h − 03 0007h (but only the
03 0004h address is generated).
XAR10 is not modified.
Operand Description
*ARn[#K16] I/O − xI/O generated address in linear mode: If 8-bit access: XARn + K16
If 16-bit access: XARn + (K16<<1)
If 32-bit access: XARn + (K16<<2)
I/O − xI/O generated address in circular mode: If 8-bit access: (ARnH:BSAyy) + (00:ARn) + K16
If 16-bit access: (ARnH:BSAyy) + (00:ARn) + (K16<<1)
If 32-bit access: (ARnH:BSAyy) + (00:ARn) + (K16<<2)
XARn is not modified. XARn is used as a base pointer. The 16-bit signed constant (K16) is 24-bit sign
extended before being scaled and added to the base pointer.
Note: 32-bit access is only available for xI/O access.
*+ARn[#K16] I/O − xI/O generated address in linear mode: If 8-bit access: XARn + K16
If 16-bit access: XARn + (K16<<1)
If 32-bit access: XARn + (K16<<2)
I/O − xI/O generated address in circular mode: If 8-bit access: (ARnH:BSAyy) + (00:ARn) + K16
If 16-bit access: (ARnH:BSAyy) + (00:ARn) + (K16<<1)
If 32-bit access: (ARnH:BSAyy) + (00:ARn) + (K16<<2)
XARn modification: If 8-bit access: XARn = XARn + K16
If 16-bit access: XARn = XARn + (K16<<1)
If 32-bit access: XARn = XARn + (K16<<2)
The 16-bit signed constant (K16) is 24-bit sign extended before being scaled and added.
Note: 32-bit access is only available for xI/O access.
Note: When an instruction uses this operand, the constant, K16, is encoded in a 2-byte extension to the instruction.
Operand Description
*ARn(short[#k4]) I/O − xI/O generated address in linear mode: If 8-bit access: XARn + k4
If 16-bit access: XARn + (k4<<1)
If 32-bit access: XARn + (k4<<2)
I/O − xI/O generated address in circular mode: If 8-bit access: (ARnH:BSAyy) + (00:ARn) + k4
If 16-bit access: (ARnH:BSAyy) + (00:ARn) +
(k4<<1)
If 32-bit access: (ARnH:BSAyy) + (00:ARn) +
(k4<<2)
XARn is not modified. XARn is used as a base pointer. The 4-bit unsigned constant (k4) is zero ex-
tended to 24-bits before being scaled and added to the base pointer. k4 can be a number from 0 to 15.
Note: 32-bit access is only available for xI/O access.
Address Generated
Syntax Example Instruction Example (Linear Addressing) Description
Ra = byte(Smem) AR3 = port(byte(*AR7(short[#4])) XAR7 + 4 The CPU reads the value at I/O
Assume XAR7 = FF70h address FF74h and loads it into
AR3. XAR7 is not modified.
Smem= ALLa port(*AR5(short[#7])) = AR4 XAR5 + (7<<1) The CPU reads the content of
Assume XAR5 = FFF0h AR4 and writes it to I/O address-
es FFFEh:FFFFh. XAR5 is not
modified.
Ra = byte(Smem) AR11 = volatile(byte(*AR7(short[#1]))) XAR7 + 1 The CPU reads the value at xI/O
Assume XAR7 = 02FF00h address 02 FF01h and loads it
into AR11. XAR7 is not modified.
Ra = Smem AR11 = volatile(*AR7(short[#1])) XAR7 + (1<<1) The CPU reads the value at xI/O
Assume XAR7 = 02FF00h addresses 02 FF02h:02 FF03h
and loads it into AR11. XAR7 is
not modified.
dbl(Smem) = volatile(dbl(*AR14(short[#1]))) = XAR14 + (1<<2) The CPU reads the content of
ALLa XAR2 Assume XAR14 = 02FF00h AR2 and writes it to xI/O ad-
dresses 02 FF04h − 02 FF07h
(but only address 02 FF04h is
generated). XAR14 is not modi-
fied.
Instruction Syntax that can have Smem or Ymem qualified to access I/O
space
byte(Smem) = byte(Ymem)
byte(Ymem) = byte(Smem)
Smem = Ymem
Ymem = Smem
In the byte-pointer mode, the instructions below enable data transfers be-
tween the data memory and xI/O space. Either the byte(Smem)/Smem/
dbl(Smem) or byte(Smem)/Ymem/dbl(Ymem) operand (but not both at the
same time) can be qualified with port(). For byte(Smem)/Ymem/dbl(Ymem),
you can use any of the XAR indirect operands listed in Table 7−16.
byte(Smem) = byte(Ymem)
byte(Ymem) = byte(Smem)
Smem = Ymem
Ymem = Smem
dbl(Smem) = dbl(Ymem)
dbl(Ymem) = dbl(Smem)
The two instructions below having the Smem syntax element cannot be
used for I/O or xI/O space accesses:
Instruction Syntax that Does Not Support I/O − xI/O Spaces Accesses
delay(Smem)
Instruction Syntax that Does Not Support I/O − xI/O Spaces Accesses
Ra = uns(high_byte(Smem))
Ra = uns(low_byte(Smem))
high_byte(Smem) = Ra
low_byte(Smem) = Ra
Note:
Some differences apply on restrictions on accesses to I/O and xI/O space
when the CPU is in the word-pointer mode, see Section 6.11 for more details.
Note that in the byte-pointer mode, BK03, BK47, and BKC define the number
of bytes (8-bit data) in the circular buffer that you want to reference. Whereas
in the word-pointer mode, these three BKxx registers define a number of words
(16-bit data) in the circular buffers.
Any action to set the C54CM bit to 1 has no effect on that bit, it will stay
at 0.
The default pointer mode value determines the C54CM bit value at H/W and
S/W reset :
If the default pointer mode is the byte-pointer mode, then the C54CM reset
value is 0.
If the default pointer mode is the word-pointer mode, then the C54CM re-
set value is 1.
If the CPU is in the word-pointer mode with the C54CM bit set to1, a switch to
the byte-pointer mode will automatically clear the C54CM bit.
If the switch occurred at function call, then you will need to restore the
C54CM bit if needed.
Chapter 8
Index
A
A unit diagram, 1-10
A-unit arithmetic logic unit (A-unit ALU), 1-11
A-unit registers, 1-11
absolute addressing modes, 6-4
AC0−AC3, 2-9
accumulator overflow flags, 2-38
accumulator saturated before storage (SST), 2-62
accumulator shift mode bit, 2-40
accumulators, 2-9
ACOV0−ACOV3, 2-38
address buses, 1-16
address maps, 3-2, 3-8
I/O space, 3-8
address-data flow unit (A unit) diagram, 1-10
addresses for data-space accesses, 3-5
addresses for instruction fetching
(byte addresses), 3-3
addresses for memory-mapped registers, 2-4
Index-1
TI Internal Data − Signed NDA Required for Distribution
Index-2
TI Internal Data − Signed NDA Required for Distribution
CDP indirect accesses, 6-28, 6-29 context bits stored in CFCT, 2-20
to data space, 6-28 control bits in status registers, 2-36
to I/O space, 6-29 control mode operands, 6-16
to register bits, 6-29
control mode versus DSP mode (ARMS bits), 2-53
CDP indirect addressing mode, 6-28
counter, 2-33, 2-35
operands, 6-30
for block-repeat operation, 2-33
CDP linear/circular configuration bit, 2-53 for single-repeat operation, 2-33
CDPH, 2-14 CPL, 2-46
CDPLC, 2-53 CPU bus error flag, 2-57
CFCT, 2-20, 4-5 CPU diagram, 1-2
CFCT and LCRPC example, 4-5 CSR, 2-33
CFCT contents, 2-20
circular addressing/circular buffer creation, 6-105
circular buffer size registers, 2-16
D
circular buffer start address registers, 2-15 D unit diagram, 1-12
circular/linear configuration, 2-52, 2-53 D-unit arithmetic logic unit (D-unit ALU), 1-13
for AR0−AR7, 2-52 D-unit registers, 1-15
for CDP, 2-53 DAB, 1-3, 1-16
CLKOFF (CLKOUT disable bit), 2-58 DAGEN, 1-11
Cmem, 6-3 data buses, 1-16
coefficient data pointer, 2-14 data computation unit (D unit) diagram, 1-12
coefficient indirect addressing mode, 6-31 data log interrupt (DLOGINT), 2-25, 2-27, 2-31
operands, 6-33 debug enable bit (DLOGINTD), 2-31
compatibility with TMS320C54x DSPs (54CM bit), enable bit (DLOGINTE), 2-27
2-45 flag bit (DLOGINTF), 2-25
compiler mode bit, 2-46 data organization, 3-7
computation mode bit, 2-49 data page register, 2-17, 2-39, 2-40
computed single-repeat register, 2-33 copy of 9 MSBs in ST0, 2-40
Index-3
TI Internal Data − Signed NDA Required for Distribution
data space, 3-2, 3-5, 3-7 with IER0 and IER1, 2-26
memory map, 3-2 disable/enable maskable interrupts globally
organization of data in, 3-7 (INTM bit), 2-47
word addresses (23 bits), 3-5 disable/enable on-chip ROM (MP/NMC bit), 2-59
data stack pointer, 2-18, 2-19, 4-3 disable/enable time-critical interrupts
data types, 3-5 (DBGM bit), 2-54
data-address generation unit (DAGEN), 1-11 DLOGINTD, 2-31
data-read address buses, 1-3 DLOGINTE, 2-27
data-read data buses, 1-3 DLOGINTF, 2-25
data-write address buses, 1-4 Doffset calculated for DP direct addressing
data-write data buses, 1-3, 1-16 mode, 6-9
DB, 1-3, 1-16 DP, 2-17, 2-39, 2-40
DBGM, 2-54 copy of 9 MSBs in ST0, 2-40
DBIE16−DBIE23, 2-31 DP direct addressing mode, 2-46, 6-8
select with CPL bit, 2-46
DBIE2−DBIE15, 2-32
DP status bits, 2-39, 2-40
DBIER0 and DBIER1, 2-29
DPH, 2-17
debug events enabled/disabled by DBGM bit, 2-54
DSP hardware reset, 5-22
debug interrupt enable bit, 2-30, 2-31, 2-32
DSP interrupt vector pointer (IVPD), 2-22, 5-4
for bus error interrupt (BERRINT), 2-31
for data log interrupt (DLOGINT), 2-31 DSP mode operands, 6-16
for each interrupt vector 16−23, 2-31 DSP mode versus control mode (ARMS bits), 2-53
for each interrupt vector 2−15, 2-32 dual 16-bit arithmetic mode bit, 2-44
for real-time operating system interrupt dual AR indirect addressing mode, 6-25
(RTOSINT), 2-30 operands, 6-25
debug interrupt enable registers, 2-29
debug mode bit, 2-54
diagrams, 1-2, 1-6, 1-8, 1-10, 1-12, 3-2, 3-8, 5-9,
E
5-12, 5-15 EAB, 1-4, 1-16
address-data flow unit (A unit), 1-10 EALLOW, 2-54, 2-55
CPU, 1-2 EB, 1-3, 1-16
data computation unit (D unit), 1-12
emulation access enable bit, 2-54
I/O map, 3-8
instruction buffer unit (I unit), 1-6 emulation registers protected from accesses
memory map, 3-2 (EALLOW bit), 2-54
process flow for time-critical interrupts, 5-12 enable/disable access to emulation registers
program flow unit (P unit), 1-8 (EALLOW bit), 2-54
standard process flow for maskable enable/disable cache (CAEN bit), 2-57
interrupts, 5-9 enable/disable debug events (DBGM bit), 2-54
standard process flow for nonmaskable enable/disable interrupts, 2-26, 2-29
interrupts, 5-15 with DBIER0 and DBIER1, 2-29
direct addressing modes, 6-7 with IER0 and IER1, 2-26
disable/enable access to emulation registers enable/disable maskable interrupts globally
(EALLOW bit), 2-54 (INTM bit), 2-47
disable/enable cache (CAEN bit), 2-57 enable/disable on-chip ROM (MP/NMC bit), 2-59
disable/enable debug events (DBGM bit), 2-54 enable/disable time-critical interrupts
disable/enable interrupts, 2-26, 2-29 (DBGM bit), 2-54
with DBIER0 and DBIER1, 2-29 end address for block-repeat operation, 2-33
Index-4
TI Internal Data − Signed NDA Required for Distribution
Index-5
TI Internal Data − Signed NDA Required for Distribution
Index-6
TI Internal Data − Signed NDA Required for Distribution
overflow flags for accumulators, 2-38 address-data flow unit (A unit), 1-10
overflows (not) saturated in A unit (SATA bit), 2-61 CPU, 1-2
overflows (not) saturated in D unit (SATD), 2-50 data computation unit (D unit), 1-12
I/O map, 3-8
instruction buffer unit (I unit), 1-6
P memory map, 3-2
process flow for time-critical interrupts, 5-12
P unit diagram, 1-8 program flow unit (P unit), 1-8
P-unit registers, 1-9 standard process flow for maskable
PAB, 1-3, 1-16 interrupts, 5-9
parallel 16-bit operations in D-unit ALU standard process flow for nonmaskable
(C16 bit), 2-44 interrupts, 5-15
PB, 1-3, 1-16 priorities of hardware interrupts, 5-4
PC, 2-20 program control logic, 1-8
PDP, 2-18 program counter, 2-20, 4-5
PDP direct addressing mode, 6-11 program flow registers, 2-20
pending interrupts reflected in IFRs, 2-23 program flow unit (P unit) diagram, 1-8
peripheral data page register, 2-18 program space, 3-2, 3-3, 3-4
pictures, 1-2, 1-6, 1-8, 1-10, 1-12, 3-2, 3-8, 5-9, alignment of fetches from, 3-4
5-12, 5-15 byte addresses (24 bits), 3-3
Index-7
TI Internal Data − Signed NDA Required for Distribution
R
RDM, 2-55, 2-56
REA0 and REA1, 2-33
real-time operating system interrupt
(RTOSINT), 2-24, 2-27, 2-30
debug enable bit (RTOSINTD), 2-30
enable bit (RTOSINTE), 2-27
flag bit (RTOSINTF), 2-24
register reset values, 2-2
register summary, 2-2
register-bit direct addressing mode, 6-11
registers in CPU, 1-9, 1-11, 1-15
address-data flow unit (A unit), 1-11
data computation unit (D unit), 1-15
program flow unit (P unit), 1-9
registers in memory map, 2-4, 6-79
repeat loop levels (0 and 1), 2-33
repeat registers, 2-33
for block-repeat operations, 2-33
for single-repeat operation, 2-33
repeat-operation status in CFCT, 2-20
reset, 2-37, 5-17, 5-18, 5-19, 5-20, 5-21, 5-22
hardware, 5-22
software, 5-17, 5-22
reset instruction (software reset), 5-22
reset values of registers, 2-2
restrictions on accesses to I/O space, 6-104
restrictions on accesses to memory-mapped
registers, 6-79
ROM enabled/disabled (MP/NMC bit), 2-59
rounding mode bit, 2-55
RPTC, 2-33
RSA0 and RSA1, 2-33
RTOSINTD, 2-30
RTOSINTE, 2-27
RTOSINTF, 2-24
Index-8
TI Internal Data − Signed NDA Required for Distribution
T Y
T0−T3, 2-11 Ymem and Xmem, 6-3
Index-9
TI Internal Data − Signed NDA Required for Distribution
Index-10