Motorola DSP56305 Manuel d'utilisateur Page 37

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 112
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 36
3-8 Optimizing DSP56300/DSP56600 Applications MOTOROLA
Program Control
Using the Stack Extension
following formula, which takes into account that each increment in
SZ corresponds to two memory locations:
For example, if the memory extension space available is 1024 words,
SZ should be set to 1024/2 + 14 = 526. SZ should be set to an even
number since stack extension transfers are done in pairs.
SC is a 5-bit register that stores the number of entries in the
hardware stack. SC is related to the stack only when the stack
extension is enabled. A push increments SC by 1, until the value 14 is
reached. If SC equals 14 and a push occurs, the push is executed, and
the least recently used stack entry (2 words) is copied to the
extension, leaving SC with the same value of 14 (hardware stack-full
state). A pop decrements SC by 1, until the value 2 is reached. If SC
equals 2 and SP > SC, when a stack pop occurs, the pop is executed,
and the top entry of the extension (2 words) is copied from the
memory to the stack, replacing the entry just read, thus leaving SC
with the same value of 2 (hardware stack-empty state).
Note: In principle there is no forced connection between the values
of SP and SC.
EP holds the pointer to the data memory location where the
extension is stored. The address space (X or Y) is selected by setting
the XYS bit in the OMR. EP has no default value and should be
initialized by the user. Each push that activates the extension causes
two memory writes, after which EP is incremented by 2, since one
stack entry is composed of 2 words. Similarly, each pop that
activates the extension causes 2 memory reads, after which EP is
decremented by 2. There is no restriction on the value of EP
(internal or external memory space), however in the DSP56300
family, the user should be aware that setting EP to point to external
memory will generate external accesses with possible wait states,
depending on the external memory type. The DSP56600 family does
not support external data accesses.
When the stack extension is disabled, the stack status information
resides in Bits 4 and 5 of SP (named SE and UF, respectively).
Normally, the stack error routine should consult these bits. When
using the stack extension, however, all stack status information
resides in the OMR. The SP bits do not reflect stack status
information as they are now part of the stack pointer value. The
stack status bits are also functionality different, as summarized in
SZ available memory extension size 2 14+=
Vue de la page 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 111 112

Commentaires sur ces manuels

Pas de commentaire