Motorola DSP56305 User Manual Page 85

  • Download
  • Add to my manuals
  • Print
  • Page
    / 112
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 84
6-12 Optimizing DSP56300/DSP56600 Applications MOTOROLA
Pipeline Interlocks
Program Flow-Control Pipeline Interlocks
cmp B,x0 ;compare to threshold
blt cont
move (r4)+ ;increment counter
sub x0,b ;subtract threshold from sum
cont
add b,a
LoopEnd
;efficient version - loop reordered.
;the main point - the CMP and subsequent branch are split between two
;iterations
;execution time of one iteration (condition true): 7 clocks
move X:(r0)+,B ;read first data to B
cmp B,x0 ;first compare - before loop.
DO #(N-1),LoopEnd1
blt <cont ;SR updated in previous loop iteration
move (r4)+
sub x0,b
cont
add b,a
move X:(r0)+,B ;read next data to B
cmp B,A
LoopEnd1
cmp B,A ;after SR pop, new CMP is needed.
blt contin1
move (r4)+
sub x0,b
cont1
add b,a
Page view 84
1 2 ... 80 81 82 83 84 85 86 87 88 89 90 ... 111 112

Comments to this Manuals

No comments