Trace Cache Filter for Internal Branch Inclusion

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional processor designs face challenges in implementing trace caches due to the cost of handling unexpected branch exits and the substantial processor area and power required by trace cache and its control circuitry.

Innovation Solution

The proposed solution involves configuring control circuitry for a trace cache to assemble traces with restricted internal conditional branches, designating stable branches based on execution history, and using a biased branch predictor to improve trace cache performance and reduce complexity.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If trace cache is implemented with traditional designs, then instruction fetch bandwidth is improved, but processor area and power consumption increase substantially

Engineering Contradiction:
Improveinstruction fetch bandwidthVSAvoidprocessor area
Core Design Contradiction:
ProductivityVSArea of stationary object

Solution Approach 1:

The patent segments the trace cache into multiple sets (e.g., 4 sets) with a smaller number of ways each, replacing a traditional single large cache. This segmentation reduces the total processor area required while maintaining the instruction fetch bandwidth improvement benefits of trace caching.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent uses a biased branch predictor that only predicts certain branches (those with historical bias) rather than all branches. This partial action approach reduces the complexity and area of the branch predictor circuitry while still capturing the majority of branch behavior, thereby reducing overall processor area.

Inventive Principle:
Principle #16Partial or excessive action

2Productivity

If trace cache is implemented with traditional designs, then instruction fetch bandwidth is improved, but power consumption increases substantially

Engineering Contradiction:
Improveinstruction fetch bandwidthVSAvoidpower consumption
Core Design Contradiction:
ProductivityVSUse of energy by stationary object

Solution Approach 1:

By segmenting the trace cache into multiple smaller sets, the patent reduces the total power consumption compared to a single large cache. Each set can be independently managed and powered, allowing for more efficient power distribution and reduced overall energy usage while maintaining fetch bandwidth improvements.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The biased branch predictor only actively predicts branches with historical bias patterns, reducing the computational overhead and power consumption compared to predicting all branches. This partial prediction approach maintains effective instruction fetch while reducing power consumption.

Inventive Principle:
Principle #16Partial or excessive action

3Productivity

If trace cache is implemented with traditional designs, then performance is improved, but complexity on the critical path increases

Engineering Contradiction:
ImproveperformanceVSAvoidcomplexity on critical path
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The biased branch predictor only processes and predicts branches that exhibit historical bias patterns, rather than analyzing all branches. This partial action significantly reduces the complexity on the critical path while maintaining performance benefits for the majority of branch instructions.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The multi-set trace cache structure simplifies the critical path by allowing independent set management and reducing the complexity of trace selection and replacement logic compared to a single large cache, thereby maintaining performance while reducing critical path complexity.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS12265823B2Trace cache with filter for internal control transfer inclusion
Publication Date: 2025.04.01 APPLE INC
  • US12265823B2 patent drawing
  • US12265823B2 patent drawing
  • US12265823B2 patent drawing

AI summary

Disclosed techniques relate to trace caches. Trace cache circuitry may identify traces that satisfy one or more criteria. Generally, internal branches of a trace should satisfy a threshold bias level in a particular direction. To achieve this goal, the processor may initially assume that branches meet the threshold, track their usefulness in the trace context over time, and prevent inclusion of branches that fall below a usefulness threshold (which indicates that those branches are not sufficiently biased). Branches that do not meet the threshold may be added to a Bloom filter, for example. Usefulness may be tracked during trace training, when valid in a trace cache, or both.