Patent ID: 7007135
Filing Date: 2006-02-28
Classification: G06F

Abstract:
1. A multi-level cache system comprising: a primary cache for storing tag addresses and data; and a secondary cache being accessed by a processor later than the primary cache, the secondary cache including: a data memory for storing data in a plurality of data sets; a tag memory for storing tags in a plurality of tag sets, each tag set including: a field for storing the tags; a field for storing first information representing validity of corresponding data stored in the data memory, and a field for storing second information representing whether the corresponding data is stored in the primary cache; and a control logic circuit for conducting a control operation with reference to the first and second information when an access by the processor is in a miss state for the secondary caches, the control logic circuit selecting data in response to the first information, the second information, a hit/miss signal, and a counter signal; wherein: each of the tag sets further comprises a plurality of tag lines, and each of the data sets comprises a plurality of data lines that correspond to the tag lines, the lines corresponding between the tag and data sets being designated by a same index address; the secondary cache further comprises a plurality of counters, each counter corresponding to a tag line for counting the number of valid data stored in the data lines corresponding to the index address, and for generating the counter signal; the control logic circuit conducts a first cache-miss control operation by selecting data stored in the data memory not in the primary cache as replaceable data with reference to the second information when the counter corresponding to the tag line that corresponds to the data stored generates the counter signal having a counting value that is a threshold value, the threshold value for indicating that the secondary cache is saturated with valid data, and conducts a second cache-miss control operation with reference to the first and second information when the counter generates the counter signal having the counting value that is less than the threshold value, and the counting value of the counter is incremented when a new data line is received by the secondary cache, and decremented when data is removed from the second data cache.