Cache Way Selection Using Precomputed Offset Arrays
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In processor-based systems, cache modules face challenges in quickly selecting an available cache way for storing data after a cache miss, especially when some cache ways are locked, which can lead to inefficiencies in information retrieval and storage.
Innovation Solution
A cache controller system that selects an initially available cache way and, if locked, searches for an unlocked cache way using predefined offsets, ensuring a uniform distribution to maximize cache hit rates by identifying and utilizing unlocked cache ways efficiently.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If cache ways are locked to prevent data eviction, then data retention is improved, but cache way selection time increases
Solution Approach 1:
The patent applies preliminary action by pre-calculating and storing offset values in an offset array during system initialization or idle periods. When a cache way needs to be selected, the system simply retrieves the pre-computed offset from the array rather than performing complex calculations in real-time, thus resolving the contradiction between maintaining locked cache ways and achieving fast selection.
Solution Approach 2:
The patent segments the cache way selection process into distinct components: generating a base index, retrieving a pre-stored offset value, and combining them to select the final cache way. This segmentation allows the time-consuming offset calculation to be separated from the critical path of cache way selection, improving performance while maintaining reliability.
2Manufacturing precision
If pseudo-random selection is used among unlocked cache ways, then uniform distribution is improved, but selection complexity increases
Solution Approach 1:
The patent introduces an offset array as an intermediary data structure that pre-stores pseudo-random offset values. This intermediary component decouples the complexity of generating uniform pseudo-random distribution from the cache way selection logic, allowing the selection process to remain simple while achieving uniform distribution through the pre-computed offsets.
Solution Approach 2:
The system performs the complex pseudo-random offset generation in advance and stores the results in the offset array. During actual cache operation, the system only needs to retrieve pre-computed values, transforming the complex pseudo-random selection into a simple table lookup operation.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A method for selecting a cache way, the method includes: selecting an initially selected cache way out of multiple cache ways of a cache module for receiving a data unit; the method being characterized by including: searching, if the initially selected cache way is locked, for an unlocked cache way, out of at least one group of cache ways that are located at predefined offsets from the first cache way.