Configurable Cache Replacement for Non-Power-of-Two Ways

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Cache systems using pseudo least-recently used (PLRU) replacement schemes with a non-power-of-two number of ways become sub-optimal due to unbalanced selection of cache lines, leading to inefficient performance.

Innovation Solution

A configurable cache replacement scheme that utilizes a status tree to select a first way from a first half of the set of ways and, if unavailable, selects a second way from the second half, ensuring balanced distribution of cache replacements by updating the status tree to point away from the selected ways.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If a pseudo LRU (PLRU) cache replacement scheme is used, then the cache replacement speed is improved and hardware complexity is reduced, but the accuracy of selecting the least-recently used way deteriorates when the number of ways is not a power of two

Engineering Contradiction:
Improvecache replacement speedVSAvoidaccuracy of LRU way selection
Core Design Contradiction:
SpeedVSMeasurement precision

Solution Approach 1:

The patent applies dynamics by making the cache replacement scheme configurable rather than fixed. The system can dynamically switch between PLRU mode (for speed) and other replacement modes (for accuracy) based on the number of ways and performance requirements. This is achieved through control logic that selects different replacement algorithms based on configuration parameters, allowing the system to adapt to different operational conditions.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the parameter of the replacement scheme from a fixed PLRU algorithm to a configurable algorithm that can adjust its behavior based on the number of ways. When the number of ways is not a power of two, the system can modify its replacement strategy to maintain accuracy while still benefiting from the hardware efficiency of PLRU where applicable.

Inventive Principle:
Principle #35Parameter changes

2Adaptability or versatility

If the number of ways is not a power of two, then the cache architecture becomes more flexible and adaptable, but the PLRU cache replacement scheme becomes sub-optimal and performance deteriorates

Engineering Contradiction:
Improvecache architecture flexibilityVSAvoidcache replacement performance
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent makes the cache replacement system dynamic by allowing it to adapt its behavior based on the number of ways configured. When ways are not a power of two, the system dynamically adjusts its replacement strategy to maintain optimal performance, rather than being constrained by the fixed PLRU algorithm designed for power-of-two configurations.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent creates a universal cache replacement system that can handle both power-of-two and non-power-of-two configurations effectively. By incorporating multiple replacement strategies and selection logic, the system achieves multi-functionality, working optimally across different cache configurations rather than being specialized for only power-of-two ways.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Measurement precision

If a true LRU way selection is implemented, then the accuracy of cache replacement is improved, but the hardware complexity and speed deteriorate compared to PLRU

Engineering Contradiction:
Improveaccuracy of LRU way selectionVSAvoidhardware circuit complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent applies dynamics by providing a configurable replacement system that can switch between true LRU (for accuracy) and PLRU (for simplicity and speed) based on the specific application requirements and cache configuration. This allows the system to optimize for accuracy when needed while avoiding the hardware complexity of true LRU when PLRU suffices.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the replacement algorithm parameter based on configuration, allowing the system to select between different replacement strategies. When true LRU is selected, the system implements the accurate but complex algorithm; when PLRU is selected, it uses the simpler approximation. This parameter-based selection resolves the contradiction by allowing the system to choose the appropriate level of complexity for each use case.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS12450170B2Configurable cache replacement
Publication Date: 2025.10.21 ADVANCED MICRO DEVICES INC
  • US12450170B2 patent drawing
  • US12450170B2 patent drawing
  • US12450170B2 patent drawing

AI summary

The disclosed device includes a cache organized by sets and ways and a control circuit that selects a first way for a cache replacement from a first half of a set of ways. The control circuit also selects another way from a second half of the set of ways, and uses the second way for the cache replacement when the first way is unavailable. Various other methods, systems, and computer-readable media are also disclosed.