METHOD AND APPARATUS FOR REDUCING CACHE SNOOPING OVERHEAD IN A MULTILEVEL CACHE SYSTEM

Abstract: A memory system for reducing cache snooping overhead for a multilevel cache system that a highest cache level connected to a main memory and a lowest cache level connected to a processor or other memory accessing device. Each intermediate level cache is connected to a cache level one level above and below that cache. The highest cache level detects a memory access on a shared memory bus, and determines if that memory access resides in that cache. If there is a hit in that cache, the highest cache level checks a hit flag for every storage location within that highest level cache to determine if the memory access also hits a storage location within the next lower cache level. If there is a hit in the next lower cache level, that cache also checks a hit flag for every storage location within that cache to determine if the memory access also hits a storage location within the next lower cache level. This process continues until the memory access does not hit a particular cache level or until the lowest cache level is reached.

Description: METHOD AND APPARATUS FOR REDUCING CACHE SNOOPING OVERHEAD IN A MULTILEVEL CACHE SYSTEM BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and apparatus for reducing the cache access, or snooping, overhead required in a multilevel cache system to determine if a cache hit or miss occurred in each of those caches. 2. Description of the Related Art One way to increase the performance of a computer system is to decrease the time needed to supply a processor with the information it requires from a memory by lowering the time lapse between the memory's receipt of the address from the processor and the transmission of the required information to the processor. This time lapse is determined by the "speed" of the memory. Currently, the cost of memory increases dramatically with its speed. In systems requiring large amounts of memory, the use of the fastest memory available is often cost prohibitive. Access to system memory is also slowed by delays encountered on the system data and address buses. Such delays result from limited bus bandwidth and contention for system resources. Using a bank of relatively high-speed memory, called "cache" memory, to act as a buffer for a larger bank of slower memory, such as system (or main) memory, can improve the average information-request to information- supply speed. Specifically, in a processing system having a cache memory, the processor initially requests information it needs from the cache. If the information is stored in the cache memory, a cache hit (hit) has occurred and the requested information is provided to the processor from the cache memory at the faster rate. If the required information is not stored in the cache memory, a cache miss (miss) has occurred and the requested information is retrieved from the system memory at the slower transfer rate. One way to determine the presence or absence of information in a cache is to maintain a list of the addresses stored in the cache in a TAG array and compare the address requested by the processor with the addresses in the TAG array. A multilevel cache system contains more than one cache level in the access path of the processor to the main memory. A processor is connected to a level 1 cache, which is connected to a level 2 cache, with itself might be connected to a level 3 cache, etc. Multiple processors using multiple cache levels can access a common main memory via a shared memory bus. This bus usually connects the caches at the highest level assigned to each processor. Each processor, including the caches for that processor, can run independently of the other processors sharing the same main memory until a processor requires data which is not in any of the caches in the access path of that processor. Usually, each of the caches in a multi-level cache system provides "inclusion", meaning that a cache at level n+1 contains all of the addresses and data contained in the level n cache accessed by the corresponding processor. In systems having multiple levels of cache memory, if the lowest level cache experiences a cache miss, the next level cache tries to service the processor's information request from the information it has stored within. If the next higher level cache also experiences a miss, then the next higher level cache in the sequence will try to service the request. This procedure will continue until a hit occurs or until the highest level cache experiences a miss. In the case of a miss in the highest level cache, the processor's information request is serviced from the main memory. In order to maintain consistency of information among the caches, accesses on the shared memory bus must be monitored by all of those caches which are not connected to the processor or other device performing an external access to the system memory (master processor or bus master). Such monitoring is performed by a snooping process in which each of those caches observes the external accesses and determines whether the address corresponding to the external access is an address resident in its cache, for example, by examining the TAG array. If so. a cache hit occurs and the necessary actions are taken in the corresponding cache. These actions can include invalidating that address location or reading from main memory to get the updated version of the data for that address location in the cache. In a two level cache system, the level 2 cache snoops the external accesses over the shared memory bus. If the access does not hit the level 2 cache, inclusion of all the level 1 addresses in the level 2 cache implies that a level 1 cache miss also has occurred. Since a miss has occurred in the level 2 cache, no action need be taken in either the level 1 or level 2 cache. When snooping results in a level 2 cache hit, a level 2 cache controller issues a snoop inquiry to the corresponding level 1 cache to determine whether the level 1 cache contains that address. If the level 1 cache snoop results in a miss, no further action is taken in the level 1 cache, and only the level 2 cache performs the required action. If the level 1 cache snoop results in a hit, the level 1 cache can perform the necessary action with respect to the address, such as invalidating that address location. In this case, when the processor subsequently accesses that address in the level 1 cache, for example in a memory read, it finds that the data is invalid, and goes on retrieve the data from a higher level cache or from main memory. Multi-level cache snooping protocols are disclosed in Computer Architecture: A Quantitative Approach (1990), chapter 8.8, by David A. Patterson and John L. Hennessy. For example, on page 471 , Patterson and Hennessy disclose how caches are updated in a multi-level cache system using multiple processors. There are four possible cache update situations: 1 ) a read miss, in which a processor requests a read from memory, and the requested address does not reside in any cache; 2) a read hit, in which a processor requests a read from memory and the requested address does reside in a cache assigned to that processor; 3) a write miss, in which a processor writes to memory, and the address to be written does not reside in any cache; and 4) a write hit, in which a processor writes to memory, and the address to be written does reside in a cache assigned to that processor. A read hit does not change the state of the cache. If a read miss occurs, data corresponding to that address location in the cache is written back to the main memory if it has been updated by the processor. Each of the other caches snoop on the read miss to see if the address is in its cache. If a cache has the address and is in the Read/ Write state, the data corresponding to that address is written to memory and that address is changed to the invalid state. The processor requesting the read that generated the read miss retrieves the current data from main memory. The updated data is placed in a cache for that processor. If a processor writes into an address location, and a write hit occurs, an invalidate signal goes out over the bus. Each of the other caches monitors the bus and checks to see if it has the address. If so, the cache invalidates that address. In the case of a write miss, each of the caches with the address goes to the invalid state. Each snoop of the level 1 cache in a multi-level cache system requires that the TAG array of the level 1 cache be accessed. If the TAG array is single ported, each snoop stalls the processor's access to the level 1 cache, resulting in lower performance. This problem is compounded as the number of levels in the multi-level cache system increases. SUMMARY OF THE INVENTION In view of the limitations of the related art, it is an object of the invention to provide a method and apparatus for an improved multilevel cache system which reducing cache snooping overhead. It is another object of the invention to avoid unnecessary snooping of lower level caches. According to one aspect of the present invention, a memory system has a processor or other memory accessing device, and a level 1 cache connected to the processor to service its memory requests. There is also a level 2 cache, connected to the level 1 cache and a main memory. The level 2 cache services memory requests from the processor that the level 1 cache cannot service. The level 2 cache contains a level 1 hit array for each storage location within the level 2 cache. This level 1 hit array indicates whether the information within a particular storage location within the level 2 cache also resides in the level 1 cache assigned to the same processor. According to another aspect of the invention, a memory system has a processor and multiple levels of cache assigned to that processor, wherein the number of cache levels is greater than two. The level 1 cache is operatively connected to the processor, the level 2 cache is operatively connected to the level 1 cache and higher level caches are operatively connected next lower level cache. The highest level cache, called level n, is connected to the level n-1 cache and the main memory. Each cache level greater than level one contains a hit array for each storage location within the cache. This hit array indicates whether the information at a particular storage location in the current level cache also resides in the cache one level below the current level cache in the chain of caches assigned to the same processor. According to another aspect of the invention, a multi-level cache system for reducing snooping overhead includes a highest level cache connected to a shared memory bus. This highest level cache includes a means for monitoring the shared memory bus for external memory accesses. According to the invention, when a cache hit occurs, an appropriate action is taken by the cache, such as setting an invalidation flag for that address location in the cache. The hit flag for that address is checked to determine if that address on the shared memory bus is also in the cache one level below the level of the current cache. If so, the highest level cache notifies the cache one level below it by a notification means to take appropriate action with respect to that address in that level cache as well. Each cache level, except for the lowest level cache, has a hit flag update array, which is used to keep track of the memory addresses that currently are in the cache one level below it. If that a memory hit occurs in a cache and the hit flag indicates that the address is not in the cache at the next lowest level, no action need be taken in the lower level cache. As a result, there is no snoop of the lower level cache by the higher level cache. This reduces the snooping overhead in a multi-level cache system. BRIEF DESCRIPTION OF THE DRAWINGS The invention, together with further objects and advantages thereof, may best be understood by making reference to the following description taken in conjunction with the accompanying drawings, in the several figures of which like reference numerals identify like elements, and wherein: Figure 1 illustrates in block diagram form a two-level cache system in a multi-processor environment according to the preferred embodiment of the invention; Figure 2 illustrates in block diagram form the elements of a level 1 and level 2 cache according to the preferred embodiment of the invention, Figure 3 is a flow diagram of the method used to reduce the cache snooping overhead, Figure 4 is a flow diagram of the method used to update the hit flag array, and Figure 5 shows the signals and timings used in a replacement address cycle according to the invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The invention is disclosed herein in the context of a two level cache system by way of illustration and not limitation, and it will be known to those of ordinary skill that the invention is equally applicable to multilevel cache systems containing multiple levels of caches. Figure 1 shows a two-level cache memory system including a processor or other memory accessing device 10, a level 1 cache 20, a level 2 cache 30, a shared memory bus 40, and a main memory 50. Multiple processors or other memory accessing devices 1 1, 12 can be connected to the main memory 50 via their own two-level cache systems 21, 31, 22, 32. Any number of such processors and caches can be configured as shown in Figure 1. When a processor, for example, processor 10, requests information from an address in main memory 50, the corresponding level 1 cache 20 first checks to see if that address is stored therein. This check can be accomplished under the control of a cache controller 21 1 as shown in Figure 2, by comparing the requested address to addresses listed in a TAG array 213, which is a stored array including a list of addresses stored in the level 1 cache 20. Referring back to Figure 1, if the level 1 cache 20 does not have the requested address in any of its storage locations, the level 2 cache 30 will next try to service the processor address request. If the level 2 cache 30 does not have that address in any of its storage locations, the processor's address request is serviced by accessing the requested address from main memory 50. Figure 2 shows the elements of a level 1 cache 20 and a level 2 cache 30. The level 1 cache 20 contains a cache controller 211, a cache data memory 215 for storing data in the level 1 cache 20, a TAG status array 213 for indicating which addresses of main or system memory 50 are stored in the level 1 cache 20, and a status array 217 indicating which data stored in the level 1 cache 20 is valid. The level 2 cache 30 contains corresponding elements, including cache data memory 205, a TAG status array 203 indicating which addresses of the main or system memory 50 are stored in the level 2 cache 30, and a status array 209 indicating which data stored in the level 2 cache 30 is valid. By inclusion, all of the addresses stored in the level 1 cache 20 are stored in the level 2 cache 30. However, conventional systems do not provide any indication in the level 2 cache 30 of whether a line (i.e., a memory address and corresponding data) stored in the level 2 cache 30 is also stored in the level 1 cache 20. Thus, according to the invention, level 2 cache 30 also contains a hit array 207. Hit array 207 contains a flag for each line in the level 2 cache 30 indicating whether or not that line is also stored in the level 1 cache 20. For cache systems with more than two levels, all cache levels greater than level one have a structure exactly like that of the level 2 cache 30. In each case, a hit flag for each line stored in the cache exists in the hit array of the cache to indicate whether or not the memory address corresponding to that line also resides in the next lower level cache assigned to the same processor. As discussed further herein, the incorporation of a hit array according to the invention reduces the need for snooping by the higher level caches to the lower level caches. Referring back to Figure 1, each highest level cache 30, 31, 32 in each hierarchy of cache memories detects an external memory access over the shared memory bus 40 resulting from a request not serviced by another processor's cache. Each highest level cache 30, 31, 32 then determines if the address of the external memory access corresponds to an address residing in its cache by comparing the memory address accessed against the addresses in the TAG status array 203 (see Figure 2) for every storage location within that cache. If there is no match, no action is taken by that cache. Further, since by inclusion the highest level cache includes all the addresses of the lower level caches, no action need be taken by any of the lower level caches assigned to the same processor. If the address of the external memory access results in a hit in the TAG status array, i.e., the external memory address accessed matches an entry in the TAG status array of the highest level cache, the highest level cache takes appropriate action, for example, invalidating the corresponding address. In addition, according to the invention, the highest level cache controller checks the corresponding entry in hit array for the address that matches the external memory access. If the entry indicates that the address corresponding to the external memory access also is currently in the cache one level immediately below the highest level cache, the cache one level below is notified by the highest level cache controller to take appropriate action with respect to that address in the next lower level cache. The process continues until the hit array indicates that the address of the external memory access is not found in the next lower level cache. If this indication does not occur, the process continues all the way down the cache hierarchy until the level 1 cache is reached. The incorporation of the hit array into each cache at levels other than level 1 provides an immediate indication of whether or not the accessed address is in the next lower level cache, thereby eliminating the need for the higher level cache to snoop the TAG status array of the lower level cache to determine if the accessed address is present in the lower level cache. As a result, a higher level cache can often execute the necessary actions without accessing the next lower level cache at all. For example, for a level 1 cache (LI cache) 20 having a size of 8 KBytes and a level 2 cache (L2 cache) 30 having a size of 128 KBytes, there is a high probability that a line in the L2 cache 30 is not contained in the LI cache 20. With the hit array 207 according to the invention indicating which lines in the L2 cache 30 are found in the LI cache 20, it is not necessary to snoop into the LI cache 20 to determine if one of the larger number of lines in the L2 cache 30 is also stored in the much smaller LI cache 20. This reduces snooping overhead and improves system performance by reducing the time spent snooping the lower level caches. A flow diagram of the method according to the invention for a two level cache hierarchy is shown in Figure 3. In step 301, the level 2 cache monitors the shared memory bus for memory accesses. When an external memory access occurs, as in step 302, the level 2 cache checks the address of the memory access against all of the tag- addresses stored in the level 2 cache, as in step 303. One way this can be accomplished is by comparing the memory access address to the addresses in the TAG status array, as previously discussed herein. If there is no tag-address hit within the level 2 cache, then no further action needs to be taken with respect to that memory access, as shown in step 304. If a tag-address hit occurs within the level 2 cache, then the level 2 cache must perform some required cache update operations with respect to the storage location corresponding to the tag-address hit, as shown in step 305. These update operations may include setting a status flag to invalid for that storage location, or performing a memory read operation in order to obtain the most current version of the information corresponding to that memory access hit from the main memory. If there is a hit in the level 2 cache, the level 2 cache also checks the hit array for the entry corresponding to the storage location that was hit, as shown in step 306. If the hit array indicates that this tag-address is not also in the level 1 cache, there is no need to snoop the level 1 cache and no further faction is taken, as shown as in step 307. If the hit array flags that the accessed address is also in the level 1 cache, then the level 2 cache controller sends a command to the level 1 cache to update the storage location within the level 1 cache corresponding to the memory access, as shown in step 308. This procedure as described above is for a two-level cache system, but will work equally as well for multilevel cache systems of greater than two levels. The hit array according to the invention is not limited to any particular implementation. For example, a separate array can be formed with each address in the cache having a corresponding flag having a first state indicating that the line is also in the next lower level cache and a second state indicating that the corresponding line is not in the next lower level cache. Alternatively, the hit array can be implemented simply by adding such a flag to each of the entries in the TAG status array. For the system according to the invention to operate properly, the higher level cache, e.g., the L2 cache 30, must monitor the activity in the lower level cache, e.g., the LI cache 20, in order to determine what lines actually are in the lower level cache. New lines are added to the LI cache 20 only during a cache line fill operation. Such a cache line fill can be easily monitored by the L2 cache controller 201 (see Figure 2), because during such a cache line fill, the LI cache 20 usually generates the required addresses for the cache line fill to be completed, and thereby the L2 cache 30 can read these required addresses off of the appropriate bus and update its hit array 207 accordingly. Detecting the removal of a line from the LI cache 20, such as by cache line replacement, requires additional steps, since the LI cache 20 typically does not indicate when a line is replaced. According to the invention, such changes can be detected either by employing dummy snoops or by a replacement address cycle. If no special cycle is used to detect removal or replacement of a line from the lower level LI cache 20, the higher level L2 cache hit array 207 has more lines indicating a hit than actually are present in the LI cache 20. Snoops generated by the L2 cache controller 201 to such addresses in the LI cache 20 result in a miss, because the address is not actually present in the LI cache 20. Such snoops can be termed dummy snoops. The L2 cache 30 detects the miss and sets the corresponding entry in the L2 hit array 207 to indicate that the line is not present in the LI cache 20. As a result, further snoops into the LI cache 20 are eliminated. Since this approach does not require any monitoring of replacement activity in the lower level cache, it is easy to implement. Although such dummy snoops reduce the number of snoops to the LI cache 20 by eliminating the need to snoop the LI cache 20 after a miss occurs, the occurrence of misses in the snooping process suggests that further performance improvement is possible. Such performance improvement is achieved by employing a replacement address cycle according to the invention. In such a replacement address cycle, during a cache line refill, the lower level cache indicates which line it is going to replace, as discussed further herein, thereby eliminating the occurrence of dummy snoops. Figure 4 illustrates a method in which the level 2 cache keeps its hit array current in order to determine whether or not a level 1 cache snoop is required. In step 401 , the level 2 cache monitors the level 1 cache for a level 1 cache line fill. A level 1 cache line fill occurs when an address from main memory is read into the level 1 cache. When the level 2 cache detects a level 1 cache line fill, the level 2 cache updates the flag in the hit array corresponding to the address read into the level 1 cache to indicate that this address also resides within the level 1 cache, as shown in step 402. Due to inclusion, all main memory writes to the level 1 cache also get written into the level 2 cache. Thus, a level 1 cache fill always results in setting a hit flag in the level 2 cache. In a replacement address cycle according to the invention, as shown in step 403. the LI cache generates the starting address of the cache line fill. The LI cache then puts the address of the line being replaced on the external memory address bus and indicates whether or not the line is going to be replaced. A line is being replaced if a signal (REPL#) is asserted after the first data word has been transferred. REPL# is asserted when the replacement address B is put on the address bus, as shown in Figure 5. If no line is being replaced, REPL# is not asserted at all. In this way, the L2 cache controller can determine which line in the LI cache is being replaced, and reset the corresponding flag in the LI hit array stored in the L2 cache. Using the starting address, the L2 cache controller generates the cache line fill address sequence by itself. In another aspect according to the invention, another signal R_MOD can be produced to indicate whether or not the line being replaced is modified. This signal can be used by an external controller to detect whether or not a copyback access will follow. In a copyback, a request is transmitted to the cache controller to copy back a specific line from the cache to the external bus to be written into main memory. As shown in Figure 5, R MOD is valid at the same time that REPL# is asserted. R_MOD is not valid if REPL# is not asserted. It is to be understood that although the characteristics and advantages of the present invention have been set forth in the foregoing description, the disclosure is illustrative only. All of the variations discussed above, as far as they are within the true intention and scope of this invention, are included in the claims.

Claims: CLAIMS What is claimed is: 1. A memory system, comprising: a memory accessing device; a level 1 cache operatively connected to said memory accessing device, said level 1 cache containing a plurality of storage locations; and a level 2 cache operatively connected to said level 1 cache and a main memory, said level 2 cache containing a plurality of storage locations and a hit flag corresponding to each of said plurality of storage locations in said level 2 cache, said hit flag being indicative of whether information stored in a corresponding one of said plurality of storage locations in said level 2 cache is also stored in said level 1 cache. 2. A memory system, comprising: a processor; a level 1 cache operatively connected to said processor, said level 1 cache containing a plurality of storage locations; and a level i cache, where i is an integer from 2 to n, said level i cache operatively connected to a level i-1 cache, said level i cache containing a plurality of storage locations and a hit flag corresponding to each of said plurality of storage locations in said level i-1 cache, said hit flag being indicative of whether information stored in a corresponding one of said storage locations in said level i cache is also stored in said level i-1 cache, and wherein said level n cache is operatively connected to a main memory. 3. In a processing system having a processor, wherein said processor generates an address representative of required data, having a multilevel cache system connected to said processor, having a shared memory bus connected to a main memory and said multilevel cache system, said multilevel cache system comprising: a level 1 cache that supplies information in response to an address request from said processor, said level 1 cache operatively connected with a level 2 cache and said processor for receiving said address request from said processor, said level 1 cache including a plurality of storage locations for storing data, and a TAG array indicating addresses stored in said level 1 cache; a level i cache, where i is an integer from 2 to n, said level i cache supplying information in response to an address request from said processor, said level i cache operatively connected with said processor for receiving said address request, said level i cache including a plurality of storage locations for storing data, a TAG array indicating addresses stored in said level i cache and a hit flag for each of said plurality of storage locations in said level i cache, and wherein said level n cache is operatively connected to said main memory over said shared memory bus; monitoring means in said level n cache for detecting a memory access to said main memory over said shared memory bus; lower level cache notification means in said level i cache for notifying said level i-1 cache that said memory access coincides with one of said plurality of storage locations in said level i-1 cache; and hit flag update means in said level i cache for updating a hit flag corresponding to one of said plurality of storage locations in said level i cache. 4. In a processing system having a processor, wherein said processor generates an address representative of required data, having a two level cache system connected to said processor, having a shared memory bus connected to a main memory and said two level cache system, said two level cache system comprising: a level 1 cache that supplies information in response to an address request from said processor, said level 1 cache operatively connected with said processor for receiving said address request, said level 1 cache including a first plurality of storage locations for storing data, tag-address of said data, and status of said data; a level 2 cache that supplies information in response to said address request from said processor, said level 2 cache operatively connected with said level 1 cache and said processor for receiving said address request from said processor, said level 2 cache including a second plurality of storage locations for storing data, a tag-address of said data, a status of said data, and a hit flag of said data, and wherein said level 2 cache is operatively connected to said main memory over said shared memory bus; monitoring means in said level 2 cache for detecting a memory access to said main memory over said shared memory bus; lower level cache notification means in said level 2 cache for notifying said level 1 cache that said memory access coincides with one of said first plurality of storage locations in said level 1 cache; hit flag update means in said level 2 cache for updating a hit flag corresponding to one of said second plurality of storage locations in said level 2 cache. 5. A multi-level cache system as recited in Claim 3, wherein said level i cache also includes a level i cache controller for performing said lower level cache notification means and said hit flag update means, and where said level n cache controller also performs said monitoring means. 6. A two level cache system as recited in Claim 4, wherein said level 2 cache also includes a level 2 cache controller for performing said lower level cache notification means and said hit flag update means, and where said level 2 cache controller also performs said monitoring means. 7. A multi-level cache system as recited in Claim 5, wherein said hit flag update means updates a hit flag corresponding to said one of said plurality of storage locations within said level i cache based upon information written into one of said plurality of storage locations in said level i-1 cache from said main memory. 8. A multi-level cache system as recited in Claim 7, wherein said hit flag corresponding to said one of said plurality of storage locations in said level i cache is set to one of a first state, indicating that information stored in said one of said plurality of storage locations in said level i cache does not reside in any of said plurality of storage locations in said level i-1 cache, and a second state, indicating that said information stored in said one of said plurality of storage locations in said level i cache does reside in one of said plurality of storage locations in said level i-1 cache. 9. A multi-level cache system as recited in Claim 3, wherein said hit flag update means updates a hit flag corresponding to said one of said plurality of storage locations in said level i cache based upon information written into said level i-1 cache from said main memory. 10. A multi-level cache system as recited in Claim 9, wherein said information written into said level i-1 cache from said main memory corresponds to a particular memory address, and said hit flag updated by said hit flag update means in said level i cache corresponds to said one of said plurality of storage locations in said level i cache that has a corresponding address in said TAG array matching said particular memory address. 11. A two level cache system as recited in Claim 4, wherein said hit flag corresponding to said one of said second plurality of storage locations in said level 2 cache is set to one of a first state, indicating that information stored in said one of said second plurality of said storage locations in said level 2 cache does not reside in any of said first plurality of storage locations in said level 1 cache, and a second state, indicating that said information stored in said one of said second plurality of storage locations in said level 2 cache does reside in one of said first plurality of storage locations in said level 1 cache. 12. A multi-level cache system as recited in Claim 3, wherein said hit-flag update means is accomplished by said level i cache monitoring data transfers to and from said level i-1 cache, and wherein said level i cache determines all tag-addresses currently in said plurality of storage locations in said level i-1 cache. 13. A multi-level cache system as recited in Claim 3, further comprising: a replacement bus connected to said level 1 cache and to said level i cache, where i is an integer from 2 to n, said replacement bus being in a first state when an address stored in one of said level 1 through level n caches is to be replaced and being in a second state otherwise, wherein when an address stored in said level i-1 cache is to be replaced with a new address, said new address is placed onto said shared memory bus connecting all of said level 1 through level n caches at a same time said replacement bus is in said first state, and wherein said hit flag update means in said level i cache changes a corresponding hit flag for said address to be replaced to indicate that said address to be replaced is no longer in said level i-1 cache. 14. A two level cache system as recited in Claim 4, further comprising: a replacement bus connected to said level 1 cache and to said level 2 cache, said replacement bus being in a first state when an address stored in said level 1 cache is to be replaced and being in a second state otherwise, wherein when an address stored in said level 1 cache is to be replaced with a new address, said new address is placed onto said shared memory bus connecting said level 1 cache and said level 2 cache at a same time said replacement bus is in said first state, and wherein said hit flag update means in said level 2 cache changes a corresponding hit flag for said address to be replaced to indicate that said address to be replaced is no longer in said level 1 cache. 15. A multi-level cache system as recited in Claim 10, wherein said level i cache detects a replacement address cycle initiated by said level i-1 cache, in which said level i-1 cache outputs an address onto said shared memory bus corresponding to an address stored in one of said plurality of storage locations in said level i-1 cache to be replaced, and said hit flag update means in said level i cache updates a hit flag corresponding to said address on said shared memory bus accordingly. 16. A two level cache system as recited in Claim 4, wherein said level 2 cache detects a replacement address cycle initiated by said level 1 cache, in which said level 1 cache outputs an address onto said shared memory bus corresponding to an address stored in one of said first plurality of storage locations in said level 1 cache to be replaced, and said hit flag update means in said level 2 cache updates a hit flag corresponding to said address on said shared memory bus accordingly. 17. A method for reducing cache snooping overhead in an n-level cache system with a processor and a main memory, where n is an integer greater than 1, the method comprising the steps of: a level n cache monitoring a shared memory bus, said level n cache detecting a memory access on said shared memory bus, said level n cache comparing said memory access to a tag-address for each of a plurality of storage locations in said level n cache, said level j cache notifying a level j-1 cache that said memory access coincides with one of said tag- addresses stored within said level j-1 cache, where j is an integer from 2 to n, said level j cache updating a hit flag corresponding to one of a plurality of storage locations in said level j cache, wherein said hit flag indicates whether information currently stored in one of said plurality of storage locations in said level j cache is also currently stored in said level j-1 cache. 18. The method for reducing cache snooping overhead in an n-level cache system as recited in Claim 17, wherein said level j cache updates a hit flag corresponding to a particular one of said plurality of storage locations in said level j cache whenever said level j-1 cache performs a cache line replacement.

Inventors: KRANICH UWE, KRANICH, UWE
Applicants: ADVANCED MICRO DEVICES INC, ADVANCED MICRO DEVICES, INC.
Application year: 1996
Main classification: G06F12
IPC codes: G06F12