The present invention relates to integrated circuits; more particularly, the present invention relates to interfacing integrated circuits.
Almost all computer systems currently in existence implement a cache memory system. A cache memory is typically a random access memory (RAM) that a computer microprocessor accesses more quickly than it can access main memory. As the microprocessor processes data, it looks first in the cache, and if it finds the data in the cache, the microprocessor does not have to do the more time-consuming reading of data from larger main memory.
Typically, computer systems implement a conventional cache organization that implements caches L1 through L2 or L3. When processing data, the microprocessor first looks in the L1 cache for the data. If the data is not found in the L1 cache, the L2 cache is searched for the data. Finally the L3 cache is searched if the data is not found in the L2 cache.
A problem with the conventional cache organization is that data associated with various instructions are more critical than others, and thus need to be processed faster (e.g., 1 latency cycle). However, conventional cache operation does not account for the fast retrieval of such critical data from the cache system. For example, both critical data and non-critical data (e.g., data requiring up to 4 latency cycles) may be stored in the L1 cache. Storing non-critical data at the fast L1 cache is inefficient because it reduces the number of critical loads data that may be stored in the L1 cache. Thus, the larger, slower L2 or L3 caches must be searched to retrieve critical data that will are not stored within the L1 cache, exceeding the 1 latency cycle.
The present invention will be understood more fully from the detailed description given below and from the accompanying drawings of various embodiments of the invention. The drawings, however, should not be taken to limit the invention to the specific embodiments, but are for explanation and understanding only.
A cache mechanism is described. According to one embodiment, the cache mechanism features a modified cache hierarchy that includes a vital cachelet that does not cache data for semi-vital and non-vital loads. This enables the vital cachelet to be more efficiently utilized by a smaller set of loads (e.g., vital loads). Similarly, a semi-vital cachelet does not cache data for non-vital loads. In a further embodiment, loads are directly assigned to the various cachelets, which are accessed in parallel by different loads. Further, load. assignment is performed statically, and load/store units can be directly attached to the cachelets.
Reference in the specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. The appearances of the phrase “in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment.
In the following description, numerous details are set forth. It will be apparent, however, to one skilled in the art, that the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the present invention
A chipset 107 is also coupled to bus 105. Chipset 107 includes a memory control hub (MCH) 110. In one embodiment, MCH 110 is coupled to an input/output control hub (ICH) 140 via a hub interface. ICH 140 provides an interface to input/output (I/O) devices within computer system 100. For instance, ICH 140 may be coupled to a Peripheral Component Interconnect bus adhering to a Specification Revision 2.1 bus developed by the PCI Special Interest Group of Portland, Oreg.
In one embodiment, MCH 110 includes a memory controller 112 that is coupled to a main system memory 115. Main system memory 115 stores data and sequences of instructions and code represented by data signals that may be executed by CPU 102 or any other device included in system 100. In one embodiment, main system memory 115 includes dynamic random access memory (DRAM); however, main system memory 115 may be implemented using other memory types.
According to one embodiment, cache memories 152, 154 and 156 are coupled to CPU 102. In a further embodiment, caches 152, 154 and 156 implement a novel cache organization that provide load data to CPU 102 as the data is needed by dependent instructions. Thus, the number of tardy data arrivals at CPU 102 is reduced and caches are more efficiently utilized, resulting in improved CPU performance.
In one embodiment, loads are classified by vitality, and are directly assigned to caches 152, 154 and 156, which are small and fast caches, referred to as cachelets. In a further embodiment, the cachelets are designed with different latencies to better track load behavior. Load vitality is defined based on the distance between a load and its use (e.g., load-use distance).
According to one embodiment, loads are classified into three classes: vital (use immediately), semi-vital (use in 2 to 3 cycles), and non-vital (no use for at least 4 cycles). These loads are then assigned to appropriately timed cachelets: cache 152 (e.g., vital cachelet (single cycle)), cache 154 (e.g., semi-vital cachelet (2 cycles)), and cache 156 (e.g., the non-vital cache (4 cycles)). Although described herein with respect to three cachelets, one of ordinary skill in the art will appreciate that other quantities of cachelets (e.g., 4, 5, 6, etc.) may be implemented.
In one embodiment, cache 152 is a very fast (e.g., 1 cycle latency) and very small (e.g., 256 B) cache that stores data only for vital loads. Cache 152 is placed in parallel with cache 154, which is a fast (e.g., 2 cycle latency) and small (e.g., 1 KB) cache. Load data that is needed immediately is assigned to the single cycle cache 152. Loads that are semi-vital are assigned directly to cache 154. In one embodiment, cache 152 and cache 154 together operate at the same level in the cache hierarchy. All non-vital loads are assigned to cache 156 that has a 4-cycle latency. If a vital load misses cache 152, it then accesses cache 156.
According to one embodiment, allocation of data is carried out based on load classification. Thus, vital loads update cache 152 and cache 156, while semi-vital loads update the cache 154 and cache 156. Non-vital loads allocate data in cache 156. Note that a coherence issue may occur between cache 152 and cache 154 because both may have the same data simultaneously.
To accommodate this, stores are broadcasted to both cache 152 and 154, as well as cache 156. Such store bandwidth is not a performance limiter. This on-demand allocation and replication allows the caches to be more efficiently utilized. The inclusion principle that is evident in a conventional cache organization is not enforced between caches 152 and 154. Thus, there is more effective cache space with in the disclosed system when compared to a conventional cache organization.
To implement the disclosed cache mechanism, load classification is to be performed prior to cache access. In one embodiment, a compiler performs load classification. However in other embodiments, load classification may be performed using other software, or hardware mechanisms. The compiler knows the distance between most loads and their uses. Consequently, the compiler does an effective job at vitality classification.
At processing block 220, semi-vital loads are identified. In one embodiment, information from the vital load identification and profiling are used to determine the semi-vital loads. Profiling is again performed to identify the loads that miss frequently in cache 154 and lines that are not reused. At processing block 230, non-vital loads are identified. In one embodiment, the profile information from vital load and semi-vital identification is used to determine the loads that frequently miss in cache 154 and with cache lines that are not reused.
The above-described cache mechanism features a reorganized and optimized data cache hierarchy that takes advantage of the fact that not every load data is needed immediately. Thus, assignment of a load to the cache hierarchy is not done with the traditional top-down approach. Instead the assignment of a load and the allocation of its data is performed by a vitality classifier. Non-vital loads are assigned to the slowest cache, and the more vital load(s) are assigned to the fast and small cache(s). The fast and small cache(s) only allocate data for the more vital loads, and provide a high hit rate for these loads.
The cache mechanism benefits from the direct assignment of loads to the various cachelets, and provides more bandwidth to the CPU core since the cachelets are accessed in parallel by different loads. Another benefit of the cache mechanism is the cache access latency. Load assignment is performed statically, and load/store units can be directly attached to the cachelets.
Whereas many alterations and modifications of the present invention will no doubt become apparent to a person of ordinary skill in the art after having read the foregoing description, it is to be understood that any particular embodiment shown and described by way of illustration is in no way intended to be considered limiting. Therefore, references to details of various embodiments are not intended to limit the scope of the claims which in themselves recite only those features regarded as the invention.
Number | Name | Date | Kind |
---|---|---|---|
6668306 | Rakvic et al. | Dec 2003 | B1 |
6865736 | Holmberg et al. | Mar 2005 | B1 |
20010021959 | Holmberg et al. | Sep 2001 | A1 |
Number | Date | Country | |
---|---|---|---|
20050210197 A1 | Sep 2005 | US |