Multi-Level PHT Swapping for Low-Latency Branch Prediction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing branch prediction systems face inefficiencies in managing data swaps between first and second-level pattern history tables (PHT-1 and PHT-2) due to latency issues and inaccurate predictions, leading to performance bottlenecks in core execution pipelines.

Innovation Solution

A branch prediction logic system utilizing a multi-level PHT structure with a line presence bit (LPB) in a prediction update queue (PUQ) to determine data swaps between PHT-1 and PHT-2 based on the presence of metadata, optimizing data eviction and reducing latency penalties.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If data swaps between PHT-1 and PHT-2 are performed frequently to maintain prediction accuracy, then branch prediction accuracy is improved, but latency increases due to swap operations

Engineering Contradiction:
Improvebranch prediction accuracyVSAvoidlatency
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent implements dynamic data swap operations between PHT-1 and PHT-2 based on line presence bit (LPB) status and metadata availability. The system adaptively determines when to swap data, transitioning from static to dynamic swap timing. This resolves the contradiction by making the swap frequency conditional rather than fixed, improving accuracy only when necessary while minimizing latency penalties.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the parameter of data swap timing based on the LPB state and metadata presence. When LPB indicates a hit in PHT-2, the system triggers a swap to bring updated data to PHT-1. This parameter-based control mechanism optimizes the trade-off between maintaining prediction accuracy and minimizing swap-induced latency.

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If a multi-level PHT structure is implemented to improve prediction accuracy, then branch prediction accuracy is improved, but device complexity increases

Engineering Contradiction:
Improvebranch prediction accuracyVSAvoidsystem complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent divides the PHT into two levels: PHT-1 for frequently accessed branch data and PHT-2 for less frequently accessed or backup data. This segmentation allows the system to maintain high prediction accuracy by having multiple specialized tables while managing complexity through clear division of functions. Each level serves a specific purpose, reducing the burden on any single table.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The multi-level PHT structure implements a nested hierarchy where PHT-2 serves as a backup or extension to PHT-1. Data can be swapped between levels, creating a nested relationship similar to the doll principle. This nesting allows the system to achieve higher accuracy through multiple layers of prediction data while managing complexity through hierarchical organization rather than parallel independent structures.

Inventive Principle:
Principle #7Nested doll (Nesting)

3Loss of time

If data is retained in PHT-2 to avoid swaps, then latency is reduced, but prediction accuracy deteriorates due to outdated data

Engineering Contradiction:
ImprovelatencyVSAvoidprediction accuracy
Core Design Contradiction:
Loss of timeVSMeasurement precision

Solution Approach 1:

The system performs preliminary actions by pre-loading or pre-swapping data between PHT-1 and PHT-2 based on predicted branch patterns. The line presence bit mechanism anticipates when data will be needed and prepares swaps in advance, reducing the impact of swap operations on latency while ensuring data freshness for accurate predictions.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements a feedback mechanism through the line presence bit that monitors the state of PHT-2 and triggers swaps when outdated data is detected. This feedback loop ensures that PHT-1 contains current data for accurate predictions while PHT-2 serves as a buffer, dynamically adjusting the balance between latency and accuracy based on actual data freshness requirements.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS12547408B2Multi-level PHT entry swaps based on first level miss and second level hit
Publication Date: 2026.02.10 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US12547408B2 patent drawing
  • US12547408B2 patent drawing
  • US12547408B2 patent drawing

AI summary

A branch prediction logic system includes a branch history table (BHT), a multi-level history table, and a prediction update queue. The BHT includes a plurality of lines, each line corresponding to at least one branch instruction and containing history information specific to the at least one branch instruction. A first pattern history table (PHT-1) stores first branch data corresponding to the at least one branch instruction included in a given line of the BHT and a second pattern history table (PHT-2) stores second branch data corresponding to the at least one branch instruction included in a given line. The prediction update queue stores a line presence bit having one of a “1” logic state or a “0” logic state. The branch prediction logic system performs a data swap between the PHT-2 and the PHT-1 based on the logic state of the line presence bit.