The first level cache is built inside the CPU and runs at the same speed as the CPU, which can effectively improve the running efficiency of the CPU. The greater the level of cache, the higher the efficiency of the CPU, but limited by the internal structure of the CPU, the capacity of the first cache is very small.
The CPU cache (cache Memory) is a temporary memory located between the CPU and memory, which is much smaller than memory but has a much faster exchange rate than memory. Caching is mainly to solve the CPU operation speed and memory read and write speed mismatch contradiction, because the CPU operation speed than memory read and write faster, so that the CPU will spend a long time waiting for data to come or write data to memory. The data in the cache is a small part of the memory, but this is a small part of the CPU is about to be accessed in a short time, when the CPU calls a large number of data, you can avoid the memory directly from the cache call, thus speeding up reading speed. Thus, adding a cache to the CPU is an efficient solution, so that the entire internal memory (cache + memory) becomes a cache of high speed, and memory of the large capacity of the storage system. Caching has a significant impact on CPU performance, mainly due to the CPU's data exchange sequence and the bandwidth between the CPU and the cache.
Classification
First-level caching can be divided into one-level data caching (Cache,d-cache) and first-level instruction caching (instruction Cache,i-cache). The two are used to store data and to decode the instructions that execute the data, and both can be accessed by the CPU simultaneously, reducing the conflict caused by contention cache and improving the processor performance. At present, most of the CPU's first-level data cache and the first-level instruction cache has the same capacity, such as AMD's Athlon XP has a 64KB of the first-level data cache and 64KB of the first-level instruction cache, its primary cache is expressed in 64kb+64kb, the rest of the CPU's first-level cache representation
Data cache Design
According to the working principle of different, the current mainstream processor used in the first level of data caching can be divided into real data reading and writing cache and data code instruction tracking cache 2, respectively, they were used by AMD and Intel.