Using The Stack Extension; Table 3-2 Registers Involved In Stack Extension - Motorola DSP56600 Manual

Application optimization for digital signal processors
Table of Contents

Advertisement

3.3

USING THE STACK EXTENSION

The hardware stack could be extended to the data memory (X or Y),
and it's depth could be set by the user according to need. After
initialization, the stack extension works automatically without any
user overhead, giving the same functionality as the hardware stack.
The registers participating in stack extension operation are listed in
Table 3-2.
Table 3-2 Registers Involved in Stack Extension Operation
Register
Name
OMR
operating
mode register
SZ
stack extension
size
SP
stack pointer
SC
stack counter
EP
stack extension
pointer
Stack extension initialization bits in the OMR include the XYS (X Y
Select) bit, by which the user selects the data space (X or Y) in which
the stack extension will reside, and the SEN (Stack Extension
Enable) bit, by which the user activates the stack extension after all
the relevant registers are initialized.
The SP register counts the number of entries in the stack. If the stack
extension is disabled, the values of SP are bounded to 0–15, and
selection of other values cause a stack error exception. When the
stack extension is enabled, SP may hold values from 0 up to the
value stored in SZ. A push increments SP by 1, a pop decrements it
by 1.
SZ stores the maximum stack depth. During stack extension
operation, if SP becomes greater than SZ, a stack overflow exception
occurs. SZ has no default value, and therefore, must be initialized
by the user before enabling the stack extension. Set the SZ value
according the amount of memory available to the user, using the
MOTOROLA
Optimizing DSP56300/DSP56600 Applications
Function
stack extension initialization (bits:SEN,XYS)
stack extension status (bits: WRP,EOV,EUN)
maximum stack depth, in word pairs.
current total stack depth, in word pairs
current hardware stack depth.
pointer to the last address written in the
memory extension.
Program Control
Using the Stack Extension
3-7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dsp56300

Table of Contents