P R O G R A M M I N G T H E A P P L I C A T I O N D M A - Intel 81342 Developer's Manual

Table of Contents

Advertisement

A p p l i c a t i o n D M A U n i t — I n t e l
5 . 1 1

P r o g r a m m i n g t h e A p p l i c a t i o n D M A

T h e s o f t w a r e f o r i n i t i a t i n g a t r a n s f e r u s i n g t h e A p p l i c a t i o n D M A f a l l s i n t o t h e f o l l o w i n g
c a t e g o r i e s :
• A D M A i n i t i a l i z a t i o n
A n e x a m p l e f o r e a c h c a t e g o r y i s s h o w n i n t h e f o l l o w i n g s e c t i o n s a s p s e u d o c o d e f l o w .
5 . 1 1 . 1
A p p l i c a t i o n D M A I n i t i a l i z a t i o n
T h e A D M A i s d e s i g n e d t o h a v e i n d e p e n d e n t c o n t r o l o f t h e i n t e r r u p t s , e n a b l e s , a n d
c o n t r o l . T h e i n i t i a l i z a t i o n c o n s i s t s o f v i r t u a l l y n o o v e r h e a d a s s h o w n i n
F i g u r e 7 2 . P s e u d o C o d e : A p p l i c a t i o n D M A I n i t i a l i z a t i o n
ACCR = 0x0000 0000 ; Disable the Application DMA
Call setup_adma
5 . 1 1 . 2
S t a r t T r a n s f e r
T h e A D M A c o n t r o l r e g i s t e r p r o v i d e s i n d e p e n d e n t c o n t r o l e a c h t i m e t h e A D M A i s
c o n f i g u r e d . T h i s p r o v i d e s t h e g r e a t e s t f l e x i b i l i t y t o t h e a p p l i c a t i o n s p r o g r a m m e r . T h e
e x a m p l e s h o w n i n
w i t h t h e A D M A f o r f o u r s o u r c e s .
F i g u r e 7 3 . P s e u d o C o d e : X O R T r a n s f e r O p e r a t i o n
; Set up descriptor in Intel XScale
d.nda
= 0
d.SAR0 = 0x0 A000 0400/* Source address of Data Block 1
d.SAR1 = 0x0 A000 0800/* Source address of Data Block 2
d.SAR2 = 0x0 A000 0C00/* Source address of Data Block 3
d.SAR3 = 0x0 A000 1000/* Source address of Data Block 4
d.DADR
d.ABCR = 1024
d.ADCR = 0x0000 001F/* XOR operation on 4 Source Blocks */
; Check for Inactive ADMA & no pending interrupts
if (ACSR != 0) exit/* If ADMA is not ready, exit */
; Start Operation
ANDAR = &d
ACCR = 0x00000001
D e c e m b e r 2 0 0 7
O r d e r N u m b e r : 3 1 5 0 3 7 - 0 0 2 U S
®
8 1 3 4 1 a n d 8 1 3 4 2
• S t a r t T r a n s f e r
F i g u r e 7 3
d e s c r i b e s t h e p s e u d o c o d e f o r i n i t i a t i n g a n X O R o p e r a t i o n
/* No chaining */
= 0x0 B000 0100/* Destination address of XOR-ed data */
/* Byte Count of 1024 */
/* Store the result & interrupt processor */
; Set up descriptor address
; Set ADMA Enable bit
®
microarchitecture local memory at address d
®
I n t e l
• S u s p e n d A D M A
F i g u r e 7 2
.
*/
*/
*/
*/
8 1 3 4 1 a n d 8 1 3 4 2 I / O P r o c e s s o r s
D e v e l o p e r ' s M a n u a l
5 1 1

Advertisement

Table of Contents
loading

This manual is also suitable for:

81341

Table of Contents