Claims
- 1. An apparatus, comprising:
a first level cache memory including a plurality of cache lines, each cache line being operable to store an address tag and data; and a next lower level cache memory including a plurality of cache lines, each cache line being operable to store an address tag, status flags, and data, the status flags of each cache line including an L-flag indicating whether any of the cache lines of the first level cache memory contain a copy of the data stored in that cache line of the next lower level cache memory.
- 2. The apparatus of claim 1, wherein the L-flag of each cache line is a single bit, which when true indicates that a corresponding cache line of the first level cache memory contains a copy of the data stored in that cache line of the next lower level cache memory, and which when false indicates that no cache line of the first level cache memory contains a copy of the data stored in that cache line of the next lower level cache memory.
- 3. The apparatus of claim 2, wherein the true level of the L-flag bit is one of a logic high and a logic low, and the false level of the L-flag bit is the other of the logic high and the logic low.
- 4. The apparatus of claim 1, wherein the first level cache memory is an L1 cache memory, and the next lower level cache memory is an L2 cache memory.
- 5. The apparatus of claim 1, further comprising a processor operable to set the L-flag of a given cache line of the next lower level cache memory to indicate whether or not a corresponding one the of the cache lines of the first level cache memory has been refilled with a copy of the data stored in the given cache line of the next lower level cache memory.
- 6. The apparatus of claim 1, further comprising a processor operable to prohibit overwriting data into a given cache line of the next lower level cache memory when the L-flag of the given cache line indicates that a corresponding one the of the cache lines of the first level cache memory contains a copy of the data stored in the given cache line of the next lower level cache memory.
- 7. The apparatus of claim 6, wherein the processor is further operable to permit overwriting data into a given cache line of the next lower level cache memory when a valid flag of the status flags of the given cache line indicates that any data stored in the given cache line are invalid.
- 8. The apparatus of claim 7, wherein the processor is further operable to permit overwriting data into a given cache line of the next lower level cache memory when a valid flag of the status flags of the given cache line indicates that data stored in the given cache line are valid and the L-bit of the given cache line indicates that a corresponding one the of the cache lines of the first level cache memory does not contain a copy of the data stored in the given cache line.
- 9. The apparatus of claim 1, wherein the first level cache memory is a direct mapped cache memory.
- 10. The apparatus of claim 1, wherein the next lower level cache memory is an N-way set associative cache memory.
- 11. An apparatus, comprising:
a first level cache memory including a plurality of M1 cache lines, each cache line being operable to store an address tag and data; a next lower level N-way set associative unified cache memory, each of the N-way sets including a plurality of M2 cache lines, each cache line being operable to store an address tag, status flags, and data, and M2 being greater than M1; and an additional memory associated with the next lower level cache memory and including a plurality of M1 memory lines, each memory line including respective L-flags for multiple cache lines of each N way set of the next lower level cache memory, each L-bit indicating whether any of the cache lines of the first level cache memory contain a copy of the data stored in the given cache line of the next lower level cache memory.
- 12. The apparatus of claim 11, wherein the number of L-flags in each memory line of the additional memory is equal to M2/M1*N.
- 13. The apparatus of claim 11, wherein each L-flag is a single bit, which when true indicates that a cache line of the first level cache memory contains a copy of the data stored in an associated cache line of the next lower level cache memory, and which when false indicates that no cache line of the first level cache memory contains a copy of the data stored in the associated cache line of the next lower level cache memory.
- 14. The apparatus of claim 13, wherein the true level of the L-flag bit is one of a logic high and a logic low, and the false level of the L-flag bit is the other of the logic high and the logic low.
- 15. The apparatus of claim 11, wherein the first level cache memory is an L1 cache memory, and the next lower level cache memory is an L2 cache memory.
- 16. The apparatus of claim 11, further comprising a processor operable to set the respective L-flags of the additional memory to indicate whether or not corresponding cache lines of the first level cache memory have been refilled with data stored in the cache lines of the next lower level cache memory.
- 17. The apparatus of claim 16, wherein the processor is further operable to set the L-flags of a given memory line of the additional memory substantially simultaneously.
- 18. The apparatus of claim 11, further comprising a processor operable to prohibit overwriting data into a given cache line of the next lower level cache memory when the L-flag of the given cache line indicates that a corresponding one the of the cache lines of the first level cache memory contains a copy of the data stored in the given cache line of the next lower level cache memory.
- 19. The apparatus of claim 18, wherein the processor is further operable to permit overwriting data into a given cache line of the next lower level cache memory when a valid flag of the status flags of the given cache line indicates that any data stored in the given cache line are invalid.
- 20. The apparatus of claim 19, wherein the processor is further operable to permit overwriting data into a given cache line of the next lower level cache memory when a valid flag of the status flags of the given cache line indicates that data stored in the given cache line are valid and the L-flag of the given cache line indicates that a corresponding one the of the cache lines of the first level cache memory does not contain a copy of the data stored in the given cache line.
- 21. The apparatus of claim 11, wherein the first level cache memory is a direct mapped cache memory.
- 22. The apparatus of claim 11, wherein the first level cache memory is an N-way set associative cache memory.
- 23. An apparatus, comprising:
a first level N-way set associative cache memory, each of the N-way sets of the first level cache memory including a plurality of M1 cache lines, each cache line being operable to store an address tag and data; a next lower level N-way set associative unified cache memory, each of the N-way sets of the next lower level cache memory including a plurality of M2 cache lines, each cache line being operable to store an address tag, status flags, and data, and M2 being greater than M1; and an additional memory associated with the next lower level cache memory and including a plurality of M1 memory lines, wherein:
each memory line of the additional memory includes respective groups of bits associated with each of the N-way sets of the first level cache memory such that each group of bits of the additional memory is associated with a respective one of the cache lines of the first level cache memory, each group of bits includes an index offset bits, way set bits, and an L-flag, the index offset bits in combination with an index provide a pointer to one cache line of each of the N-way sets of the next lower level cache memory, the way set bits provide a pointer to one of the N-way sets of the next lower level cache memory, and the L-flags indicate whether the associated cache line of the first level cache memory contains a copy of the data stored in the cache line of the next lower level cache memory that is pointed to by the index offset bits, the index, and the way set bits.
- 24. The apparatus of claim 23, wherein:
the first level cache memory includes multiple N-way set associative cache memories, and each of the N-way sets of the multiple cache memories includes a plurality of M1 cache lines; each of the respective groups of bits of each memory line of the additional memory is associated with one of the cache lines of one of the N-way sets of one of the multiple cache memories.
- 25. The apparatus of claim 23, wherein each L-flag is a single bit, which (i) when true indicates that the cache line of the first level cache memory, associated with the group of bits containing that L-flag, contains a copy of the data stored in the cache line of the next lower level cache memory that is pointed to by the index offset bits, the index, and the way set bits contained within that group of bits; and (ii) when false indicates that the associated cache line of the first level cache memory does not contain a copy of the data stored in the associated cache line of the next lower level cache memory.
- 26. The apparatus of claim 25, wherein the true level of the L-flag bit is one of a logic high and a logic low, and the false level of the L-flag bit is the other of the logic high and the logic low.
- 27. The apparatus of claim 23, wherein the first level cache memory is an L1 cache memory, and the next lower level cache memory is an L2 cache memory.
- 28. The apparatus of claim 23, further comprising a processor operable to set the respective L-flags of the additional memory to indicate whether or not corresponding cache lines of the first level cache memory have been refilled with data stored in the cache lines of the next lower level cache memory.
- 29. The apparatus of claim 28, wherein the processor is further operable to set the L-flags of a given memory line of the additional memory substantially simultaneously.
- 30. The apparatus of claim 23, further comprising a processor operable to prohibit overwriting data into a given cache line of the next lower level cache memory when the L-flag associated with the given cache line indicates that a corresponding one the of the cache lines of the first level cache memory contains a copy of the data stored in the given cache line of the next lower level cache memory.
- 31. The apparatus of claim 30, wherein the processor is further operable to permit overwriting data into a given cache line of the next lower level cache memory when a valid flag of the status flags of the given cache line indicates that any data stored in the given cache line are invalid.
- 32. The apparatus of claim 31, wherein the processor is further operable to permit overwriting data into a given cache line of the next lower level cache memory when a valid flag of the status flags of the given cache line indicates that data stored in the given cache line are valid and the L-flag associated with the given cache line indicates that a corresponding one the of the cache lines of the first level cache memory does not contain a copy of the data stored in the given cache line.
- 33. The apparatus of claim 23, wherein N=1 such that the first level cache memory is a direct mapped cache.
- 34. A method, comprising:
controlling a first level cache memory including a plurality of cache lines, each cache line being operable to store an address tag and data; controlling a next lower level cache memory including a plurality of cache lines, each cache line being operable to store an address tag, status flags, and data, the status flags of each cache line including an L-flag; and setting the L-flag of a given cache line of the next lower level cache memory to indicate whether or not a corresponding one the of the cache lines of the first level cache memory has been refilled with a copy of the data stored in the given cache line of the next lower level cache memory.
- 35. The method of claim 34, further comprising prohibiting overwriting data into a given cache line of the next lower level cache memory when the L-flag of the given cache line indicates that a corresponding one the of the cache lines of the first level cache memory contains a copy of the data stored in the given cache line of the next lower level cache memory.
- 36. The method of claim 35, further comprising permitting overwriting data into a given cache line of the next lower level cache memory when a valid flag of the status flags of the given cache line indicates that any data stored in the given cache line are invalid.
- 37. The method of claim 36, further comprising permitting overwriting data into a given cache line of the next lower level cache memory when a valid flag of the status flags of the given cache line indicates that data stored in the given cache line are valid and the L-bit of the given cache line indicates that a corresponding one the of the cache lines of the first level cache memory does not contain a copy of the data stored in the given cache line.
- 38. The method of claim 34, wherein the L-flag of each cache line is a single bit, which when true indicates that a corresponding cache line of the first level cache memory contains a copy of the data stored in that cache line of the next lower level cache memory, and which when false indicates that no cache line of the first level cache memory contains a copy of the data stored in that cache line of the next lower level cache memory.
- 39. The method of claim 38, wherein the true level of the L-flag bit is one of a logic high and a logic low, and the false level of the L-flag bit is the other of the logic high and the logic low.
- 40. The method of claim 34, wherein the first level cache memory is an L1 cache memory, and the next lower level cache memory is an L2 cache memory.
- 41. The method of claim 34, wherein the first level cache memory is a direct mapped cache memory.
- 42. The method of claim 34, wherein the next lower level cache memory is an N-way set associative cache memory.
- 43. A method, comprising:
controlling a first level cache memory including a plurality of M1 cache lines, each cache line being operable to store an address tag and data; controlling a next lower level N-way set associative unified cache memory, each of the N-way sets including a plurality of M2 cache lines, each cache line being operable to store an address tag, status flags, and data, and M2 being greater than M1; controlling an additional memory associated with the next lower level cache memory and including a plurality of M1 memory lines, each memory line including respective L-flags for multiple cache lines of each N way set of the next lower level cache memory; and setting the respective L-flags of the additional memory to indicate whether or not corresponding cache lines of the first level cache memory have been refilled with data stored in the cache lines of the next lower level cache memory.
- 44. The method of claim 43, further comprising setting the L-flags of a given memory line of the additional memory substantially simultaneously.
- 45. The method of claim 43, further comprising prohibiting overwriting data into a given cache line of the next lower level cache memory when the L-flag of the given cache line indicates that a corresponding one the of the cache lines of the first level cache memory contains a copy of the data stored in the given cache line of the next lower level cache memory.
- 46. The method of claim 45, further comprising permitting overwriting data into a given cache line of the next lower level cache memory when a valid flag of the status flags of the given cache line indicates that any data stored in the given cache line are invalid.
- 47. The method of claim 46, further comprising permitting overwriting data into a given cache line of the next lower level cache memory when a valid flag of the status flags of the given cache line indicates that data stored in the given cache line are valid and the L-flag of the given cache line indicates that a corresponding one the of the cache lines of the first level cache memory does not contain a copy of the data stored in the given cache line.
- 48. The method of claim 43, wherein the number of L-flags in each memory line of the additional memory is equal to M2/M1*N.
- 49. The method of claim 43, wherein each L-flag is a single bit, which when true indicates that a cache line of the first level cache memory contains a copy of the data stored in an associated cache line of the next lower level cache memory, and which when false indicates that no cache line of the first level cache memory contains a copy of the data stored in the associated cache line of the next lower level cache memory.
- 50. The method of claim 49, wherein the true level of the L-flag bit is one of a logic high and a logic low, and the false level of the L-flag bit is the other of the logic high and the logic low.
- 51. The method of claim 43, wherein the first level cache memory is an L1 cache memory, and the next lower level cache memory is an L2 cache memory.
- 52. The method of claim 43, wherein the first level cache memory is a direct mapped cache memory.
- 53. The method of claim 43, wherein the first level cache memory is an N-way set associative cache memory.
- 54. A method, comprising:
controlling a first level N-way set associative cache memory, each of the N-way sets of the first level cache memory including a plurality of M1 cache lines, each cache line being operable to store an address tag and data; controlling a next lower level N-way set associative unified cache memory, each of the N-way sets of the next lower level cache memory including a plurality of M2 cache lines, each cache line being operable to store an address tag, status flags, and data, and M2 being greater than M1; controlling an additional memory associated with the next lower level cache memory and including a plurality of M1 memory lines, wherein (i) each memory line of the additional memory includes respective groups of bits associated with each of the N-way sets of the first level cache memory such that each group of bits of the additional memory is associated with a respective one of the cache lines of the first level cache memory, (ii) each group of bits includes an index offset bits, way set bits, and L-flag, (iii) the index offset bits in combination with an index provide a pointer to one cache line of each of the N-way sets of the next lower level cache memory, and (iv) the way set bits provide a pointer to one of the N-way sets of the next lower level cache memory; and setting the respective L-flags of the additional memory to indicate whether or not corresponding cache lines of the first level cache memory have been refilled with data stored in the cache lines of the next lower level cache memory that are pointed to by the index offset bits, the index, and the way set bits.
- 55. The method of claim 54, further comprising setting the L-flags of a given memory line of the additional memory substantially simultaneously.
- 56. The method of claim 54, further comprising prohibiting overwriting data into a given cache line of the next lower level cache memory when the L-flag associated with the given cache line indicates that a corresponding one the of the cache lines of the first level cache memory contains a copy of the data stored in the given cache line of the next lower level cache memory.
- 57. The method of claim 56, further comprising overwriting data into a given cache line of the next lower level cache memory when a valid flag of the status flags of the given cache line indicates that any data stored in the given cache line are invalid.
- 58. The method of claim 57, further comprising permitting overwriting data into a given cache line of the next lower level cache memory when a valid flag of the status flags of the given cache line indicates that data stored in the given cache line are valid and the L-flag associated with the given cache line indicates that a corresponding one the of the cache lines of the first level cache memory does not contain a copy of the data stored in the given cache line.
- 59. The method of claim 54, wherein:
the first level cache memory includes multiple N-way set associative cache memories, and each of the N-way sets of the multiple cache memories includes a plurality of M1 cache lines; each of the respective groups of bits of each memory line of the additional memory is associated with one of the cache lines of one of the N-way sets of one of the multiple cache memories.
- 60. The method of claim 54, wherein each L-flag is a single bit, which (i) when true indicates that the cache line of the first level cache memory, associated with the group of bits containing that L-flag, contains a copy of the data stored in the cache line of the next lower level cache memory that is pointed to by the index offset bits, the index, and the way set bits contained within that group of bits; and (ii) when false indicates that the associated cache line of the first level cache memory does not contain a copy of the data stored in the associated cache line of the next lower level cache memory.
- 61. The method of claim 60, wherein the true level of the L-flag bit is one of a logic high and a logic low, and the false level of the L-flag bit is the other of the logic high and the logic low.
- 62. The method of claim 54, wherein the first level cache memory is an L1 cache memory, and the next lower level cache memory is an L2 cache memory.
- 63. The method of claim 54, wherein N=1 such that the first level cache memory is a direct mapped cache.
CROSS REFERENCE TO RELATED APPLICATIONS
[0001] The present application claims the benefits of U.S. Provisional Patent Application No. 60/378,198, filed May 6, 2002, entitled METHODS AND APPARATUS FOR PROVIDING HIERARCHICAL CACHE MEMORY, and U.S. Provisional Patent Application No. 60/382,201, filed May 21, 2002, entitled METHODS AND APPARATUS FOR PROVIDING HIERARCHICAL CACHE MEMORY, the entire disclosures of which are hereby incorporated by reference.
Provisional Applications (2)
|
Number |
Date |
Country |
|
60378198 |
May 2002 |
US |
|
60382201 |
May 2002 |
US |