Motorola DSP56305 Manuel d'utilisateur Page 65

  • 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 64
5-4 Optimizing DSP56300/DSP56600 Applications MOTOROLA
Instruction Cache and Memory Features
The Instruction Cache
independent addresses. The instruction addresses must have one of
the allocated tag fields, and only eight different tag fields can be
allocated at any given time.
An application that depends on the cache for efficient execution
should be designed taking into account the sector allocation. If
possible, important code segments that are planned to be cached
should be written to fit the smallest possible number of 128 (256)
word units, so that they occupy the minimum number of cache
sectors. Also, care should be taken to place segments that are
planned to be cached in addresses that are inside a sector and not
cross sector borders needlessly.
For example, a routine that is 100 words long should start at an
address whose seven (eight) LSBs are between 0 and $1b ($9b),
otherwise it will “spill over” and use two cache sectors instead of
the one into which it could fit. Small code segments could be packed
together to fit into a smaller number of sectors, keeping fragments
of unused sector space at a minimum.
5.1.2 Control of Sector Allocation
Allocation of sectors is done automatically—they are allocated as
instructions are fetched. If an instruction does not have a sector with
a fitting tag, it is a “sector miss”. If a sector is available, it's tag
register is written with the tag field of the instruction's address, and
the instruction from that address is written to the cache. There is no
wait penalty for a sector miss.
When all eight sectors are used, and a sector miss occurs, the cache
controller chooses a sector that will be written over. The controller
keeps track of the sector use, and uses the Least-Recently-Used
(LRU) sector for replacement.
The data that was in that sector is lost for hit detection even if that
sector will be allocated again later with the same tag. A newly
allocated sector should be filled with data fetched from the external
memory, with the resulting wait states.
The user has at his disposal a set of specialized cache control
instructions, for better management of sector allocation. The
following operations can be performed:
1. Lock a sector (PLOCK,PLOCKR)—A sector that is locked will
not be a part of the LRU arbitration for sectors to be replaced
Vue de la page 64
1 2 ... 60 61 62 63 64 65 66 67 68 69 70 ... 111 112

Commentaires sur ces manuels

Pas de commentaire