Address Generation Unit
SC140 DSP Core Reference Manual
2-35
2.3.2.1 Address Registers (R0
–
R15)
The sixteen 32-bit address registers R0–R15 can contain addresses or general-purpose data. These are
32-bit read/write registers. The 32-bit address in a selected address register is used in calculating the
effective address of an operand. The contents of an address register can point directly to data, or can be
used as an index.
The sixteen address registers R0–R15 are composed of two separate banks, a low bank (R0–R7) and a high
bank (R8–R15). The high bank can be used alternatively as a base address register bank (B0–B7). Each
address register Rn of the high bank can serve as an address register on condition that the corresponding
B
n
-8
register is not used. Both R
n
and B
n
-8
are mapped to the same physical register. For example, R8 is
available only if R0 is not being used in modulo addressing since this requires the base address register B0.
Use of both R
n
and B
n-8
notations as source and destination of move-like instructions is permitted,
regardless of the use of the physical register as Base modulo or as a pointer. For example:
MOVE.L #ADDRESS, B0
...
MOVE.W (R8), D0
See
Section 2.3.2.6, “Modifier Control Register (MCTL),”
for further information. The high bank of
registers can only be used as pointers in the linear mode of addressing since the other modes of addressing
are only encoded for the low bank in the MCTL register.
In addition, an address register can be post-updated according to the addressing mode selected. If an
address register is updated, one of the modifier registers (Mj) can be used to specify the type of update
arithmetic. Offset registers (Ni) are used for post-incrementing and indexing by offset.
The address register modification can be performed by either of the two AAUs. Most addressing modes
modify the selected address register in a read-modify-write fashion. The address register is read, its
contents are modified by the associated modulo arithmetic unit, and the register is written with the
appropriate output of the AAU. The form of address register modification performed by the address
arithmetic unit is controlled by the contents of the offset and modifier registers described in the following
sections.
2.3.2.2 Stack Pointer Registers (NSP, ESP)
The SC140 core has two stack pointer registers: the normal stack pointer (NSP) and the exception stack
pointer (ESP). These 32-bit registers are used implicitly in all PUSH and POP instructions. Only one stack
pointer is active at one time according to the mode:
•
In Normal working mode, the NSP is used.
•
In Exception working mode, the ESP is used.
The EXP bit in the status register (SR) determines the active working mode. The active stack pointer (SP)
is used explicitly for memory references when used with the address register indirect modes. The stack
pointers point to the next unoccupied location in the stacks. They are post-incremented on all the implicit
PUSH operations and pre-decremented on all the implicit POP operations.
Note:
Both stack pointer registers must be initialized explicitly by the programmer after reset.
Summary of Contents for SC140 DSP Core
Page 12: ...xii SC140 DSP Core Reference Manual ...
Page 18: ...xviii SC140 DSP Core Reference Manual ...
Page 32: ...1 6 SC140 DSP Core Reference Manual Core Architecture Features ...
Page 180: ...4 70 SC140 DSP Core Reference Manual Trace Unit Registers ...
Page 250: ...6 70 SC140 DSP Core Reference Manual Programming Rules ...
Page 314: ...7 64 SC140 DSP Core Reference Manual NOP Definition ...
Page 463: ...DI SC140 DSP Core Reference Manual A 149 15 8 7 0 DI 1 1 4 1 0 0 1 1 1 1 1 0 1 1 1 1 1 0 1 ...
Page 478: ...A 164 SC140 DSP Core Reference Manual EI ...
Page 618: ...A 304 SC140 DSP Core Reference Manual MOVES 4F s15 sssssssssssssss Signed 15 bit offset ...
Page 638: ...A 324 SC140 DSP Core Reference Manual MPYR ...
Page 746: ...A 432 SC140 DSP Core Reference Manual ZXTA x ...
Page 758: ...I 10 Index ...
Page 759: ...SC140 DSP Core Reference Manual i ...
Page 760: ......