Motorola DSP56305 User Manual Page 63

  • Download
  • Add to my manuals
  • Print
  • Page
    / 112
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 62
5-2 Optimizing DSP56300/DSP56600 Applications MOTOROLA
Instruction Cache and Memory Features
The Instruction Cache
Activating the cache requires only setting the CE bit in the SR. The
following instruction activates the cache:
bset #19,SR
Because of pipelining, allow four instructions to execute before
assuming the cache is active. Disabling the cache is done by clearing
that bit.
Note: For obvious reasons, the user should not enable the cache
while running from the cacheable memory area itself.
To demonstrate the benefit of cache use, consider the example in
Table 5-1, taken from a benchmark for FIR lattice filter (the
DSP56300 Family Manual
, Appendix C).
In the example, each external fetch inserts 3 wait states. Therefore,
the execute time needed for each instruction in the loop is 4 cycles: 1
cycle for execution, and 3 wait states for the instruction that is being
fetched in parallel. In other words, due to the pipelining, the wait
states of an instruction stalls the execution of the instruction
Table 5-1 Example for Cycle Count with Cache Enabled Versus
Disabled
Program Code
Program
Words
Hit
Cycles
External
Miss
Cycles
movep x:IN,b
114
move x:(r0)+,x0 y:(r4)+,y0
114
move b,a
114
do #N,_END
2511
macr x0,y0,b b,y1
114
tfr x0,a x:(r0)+
114
macr y1,y0,a x:(r0),x0 y:(r4)+,y0
114
_END
movep b,x:OUT
114
move a,x:(r0)+ y:(r4)-,y0
114
Total: 3N+10 12N+31
Page view 62
1 2 ... 58 59 60 61 62 63 64 65 66 67 68 ... 111 112

Comments to this Manuals

No comments