Table 3-3 Stack Status Information - Motorola DSP56600 Manual

Application optimization for digital signal processors
Table of Contents

Advertisement

Table 3-3. The use of SP bits for stack status when the stack
extension is disabled, instead of OMR for both cases, is for code
compatibility with the 56K family. The user's stack error interrupt
routine should test the SEN bit (Stack Extension Enable) in OMR to
know what register to consult for stack status information.

Table 3-3 Stack Status Information

Stack
Status
Extension
Info.
Name
disabled
SP
SEN = 0
enabled
OMR
SEN = 1
Following is a full example of stack extension initialization.The
memory area allocated is in addresses Y:1024–1536 (512 locations).
This space can accommodate 256 stack locations in the stack
extension + fourteen locations in the hardware stack.
;========== initializing the stack extension ====================
;recommended only before interrupts are enabled
;care should be taken in cases where the code is used after
;a stack error event so that part of the initialization routine
;will clear sticky bits and resume the engine state to the
;reset initial state
EXTEN_START
MEM_SIZE
;maximum stack size (hardware +;extension),
;in units of two 24-bit words.
STACK_LIMIT
move
move
bset
bset
Note: The stack extension was designed to operate transparently,
with no user software overhead. The mechanism ensures that
within stack size limit, data that is pushed into the stack will
be popped from the top of the stack in the same order. The
actual split of stack data between the hardware stack and the
stack extension is not readily apparent. The user therefore is
advised to access stacked data directly by software only
through the top of the stack.
MOTOROLA
Optimizing DSP56300/DSP56600 Applications
Bit
Function
SE
Stack Error flag
UF
Stack Underflow flag
WRP
Extended Stack Wrap flag
EOV
Extended Stack Overflow
EUN
Extended Stack Underflow
equ
1024
;start address of stack
;extension in data area
equ
512
;stack ext. size in data area
equ
MEM_SIZE/2+14
#EXTEN_START,ep;set ext. pointer in data memory
#STACK_LIMIT,sz;set stack limit
#M_XYS,omr
;select y space
#M_SEN,omr
;enable stack extension
Using the Stack Extension
Comments
All these bits
are sticky
Program Control
3-9

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dsp56300

Table of Contents