Motorola DSP56305 Manuel d'utilisateur Page 76

  • 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 75
Pipeline Interlocks
Data ALU Pipeline Interlocks
MOTOROLA Optimizing DSP56300/DSP56600 Applications 6-3
and Status Interlock may be avoided by adding some useful
instructions in between the instructions. The following paragraph
will demonstrate few ways to overcome the Arithmetic Interlock.
6.1.2 Avoiding Data ALU Pipeline Interlocks
There are few common ways to avoid the Arithmetic Interlock. The
first is to change the order of the instructions such that a sequence
that caused the interlocks will not be part of the re-ordered code.
The second is to unroll the loop and use two accumulators in an
interleaving manner.
6.1.2.1 Code Reorder
The following DSP56000 program code is part of Real input FFT
based on Glenn Bergland algorithm. It is taken from Appendix B of
the
DSP56000 Family Manual
(Figure B-5, sheet 7):
move x:(r0)+,x1y:(r4)-,y1 ;x1=b, y1=d, r4 ptr back to c
mpy x1,y0,B x:(r3)+,r7 ;A=bWr,
mac x0,y1,B x:(r3)+,r1 ;B=bWr+dWi=T1, get first index
sub B,A ;A=a-T1=c’, get second index
addl A,B
A,x:(r1)
;B=a+T1=a’, PUT c’ to x:b
mpy y1,y0,A
B,x:(r7)
;B=dWr, B=c PUT a’
mac -x1,x0,Ay:(r4)+n4,B ;A=dWi-bWr=T2, B=c, r4 ptr to
;next c
sub B,A x:(r2)+,x0y:(r6)+,y0 ;A=T2-c=d’,x0=next Wi,y0=next
;Wr
addl A,B
A,y:(r1)
;B=T2+c=b’,update r4,A=next a,
;PUT d’
move x:(r0)+,A
B,y:(r7)
;PUT b’, A=next a
move y:(r4)+,B ;B=next c
This code consists of four arithmetic stalls that are caused by the
accumulator read operation in the fifth, sixth, ninth, and tenth
instructions. By reordering the parallel moves we can write a similar
code that consists of no pipeline interlocks at all (notice that pointers
r4 and r0 were switched).
move x:(r4)+,x1y:(r0)-,y1 ;x1=b, y1=d, r0 ptr back to c
mpy x1,y0,B x:(r3)+,r7 ;A=bWr,
mac x0,y1,B x:(r3)+,r1 ;B=bWr+dWi=T1, get first index
sub B,A ;A=a-T1=c’, get second index
addl A,B ;B=a+T1=a’, PUT c’ to x:b
mpy y1,y0,A A,x:(r1) ;B=dWr, B=c PUT a’
mac -x1,x0,AB,x:(r7)y:(r0)+n0,B ;A=dWi-bWr=T2, B=c, r0 ptr to
;next c
sub B,A x:(r2)+,x0y :(r6)+,y0;A=T2-c=d’,x0=next Wi,
;y0=next Wr
addl A,B ;B=T2+c=b’,update r0,
Vue de la page 75
1 2 ... 71 72 73 74 75 76 77 78 79 80 81 ... 111 112

Commentaires sur ces manuels

Pas de commentaire