Motorola DSP56305 Manuel d'utilisateur Page 51

  • 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 50
4-2 Optimizing DSP56300/DSP56600 Applications MOTOROLA
Using the DMA
Conserving Core MIPS by Working In Parallel
The core may contend with the DMA in one of two cases only:
1. Accessing the same internal memory block (contiguous 256
RAM words or 3 K ROM words), in which case the DMA
stalls—otherwise simultaneous core and DMA access to the
internal memory is possible without any delays
2. Accessing an external address through Port A, in which case
either the core or the DMA stalls, depending upon the
programmed priority
These restrictions are not severe and allow high utility of the
parallel potential.
The following example demonstrates a double-buffering scheme.
The DMA loads one buffer from the external memory while the core
processes the data block loaded previously into a second buffer.
When the core finishes, the DMA fills the second area while the core
processes the data block that the DMA has just loaded. The DMA
reads the data from an external memory using DMA channel 0. The
block size is BLOCK_SIZE data words. The core uses R0 as the
pointer to the data area under work, and R1 to point to memory
locations where the top addresses of the two memory areas are
stored. Modulo 1 Addressing mode is used with R1 to quickly load
R0 with the block address and switch between the two memory
areas. In this application, it is up to the user to stop processing the
data in mid-block if the data transferred is not an exact multiple of
the block size.
;============ general definitions and initialization.
;initial address of the first data area
BASE_AREA1 equ 512
BASE_AREA2 equ 1024 ;initial addr. of 2nd data area
BLOCK_SIZE equ 512 ;size of each data area
AREA_POINTER equ 16 ;two consecutive addresses where the
;values BASE_AREA1,2 will be stored for
;use every area switch.
;the base address of the external
;memory from which the DMA will load
EXTERNAL_BASE equ 32768
;total size of the memory to be loaded
TOTAL_DATA_SIZEequ 51200 ;
;check if TOTAL_DATA_SIZE is divided exactly by BLOCK_SIZE
IF ((TOTAL_DATA_SIZE%BLOCK_SIZE)==0)
NUMBER_OF_TRANSequTOTAL_DATA_SIZE/BLOCK_SIZE
ELSE
NUMBER_OF_TRANSequ(TOTAL_DATA_SIZE/BLOCK_SIZE)+1
ENDIF
move #AREA_POINTERS,r1
Vue de la page 50
1 2 ... 46 47 48 49 50 51 52 53 54 55 56 ... 111 112

Commentaires sur ces manuels

Pas de commentaire