Design Article![]() How to use DSP caches, part 1Staff, Texas Instruments5/21/2007 3:00 AM EDT[Part 2 explains how to configure caches and how to use them correctly, all with a focus on maintaining cache coherence. It shows how DMA transfers affect cached memory, and how to manage DMA transfers with double buffering.]
A processor cache is an area of high-speed memory that stores information near the processor. This helps make the processing of common instructions efficient and therefore speeds up computation time. In this paper, cache-based memory system will be compared to flat memory systems. The importance of cache in high-speed processor architectures will be explained and this article will also provide a brief introduction to the fundamental concepts of cache and cache terminology. Using Texas Instrument's TMS320C64x DSP architecture, a detailed explanation will teach developers how cache works, how to configure and how to correctly use cache. Throughout the paper the focus will be on cache coherence. Memory Organization If the CPU clock is increased to 600 MHz, wait-states will occur unless the memory speed is also increased to 600 MHz. Unfortunately, a same size internal memory running at 600 MHz would be far too expensive for most applications. Leaving it at 300 MHz is also not an option, since this would effectively reduce the CPU clock. Suppose an algorithm attempted to access memory every cycle. Then each memory access would suffer a one-cycle stall, effectively doubling the cycle count and canceling out the doubling in clock speed.
![]() Figure 1. Flat vs. Hierarchical Memory Architecture. The solution is to use a memory hierarchy with a fast but small memory close to the CPU that can be accessed without stalls. The memories become larger but slower the further away from the CPU. The memory levels closest to the CPU typically act as a cache for the lower level memories. Principles of Locality
|
|