Branch Target Prediction Using Segmented Address Tables

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing branch prediction techniques face challenges in accurately predicting branch targets for instructions with multiple branch targets, such as those found in switch/case statements, due to the complexity of determining the correct branch target address based on past executions.

Innovation Solution

An arithmetic processing apparatus is designed with a plurality of branch target address tables for each branch instruction, storing histories of past branch target addresses, and a branch target prediction unit that predicts branch target addresses by referencing these tables, allowing for improved accuracy in predicting branch targets.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If branch prediction techniques use branch history to predict branch targets, then prediction accuracy is improved, but it becomes difficult to predict branch targets for instructions with multiple branch targets (such as switch/case statements)

Engineering Contradiction:
Improvebranch target prediction accuracyVSAvoidability to handle multiple branch targets
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

The patent segments the branch target address into multiple fields: a base address field and an offset field. The base address contains the common prefix for all branch targets, while the offset field varies to distinguish between different branch targets. This segmentation allows the prediction mechanism to handle multiple branch targets efficiently by storing and predicting both components separately.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a new dimension to branch target prediction by storing not just the full branch target address but also the offset from a base address. This dimensional decomposition transforms the prediction problem from predicting one large address value to predicting a base address and a smaller offset value, improving prediction accuracy for multiple branch targets.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Productivity

If branch target addresses are predicted before execution, then processing performance is improved, but the correctness of prediction depends on accurate determination of branch target addresses

Engineering Contradiction:
Improveprocessing performanceVSAvoidprediction correctness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent performs preliminary determination of branch target addresses by storing base addresses and offsets in branch target address tables before actual branch execution. This allows the prediction unit to pre-calculate and store prediction values, which can then be quickly retrieved and used for speculative execution, improving performance while maintaining reliability through pre-validated prediction data.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements feedback mechanisms where actual branch target addresses from executed instructions are fed back to update and refine the branch target address tables. This feedback loop allows the prediction system to learn from actual execution patterns and improve the accuracy of base address and offset predictions, thereby enhancing both reliability and performance over time.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS8751776B2Method for predicting branch target address based on previous prediction
Publication Date: 2014.06.10 FUJITSU LTD
  • US8751776B2 patent drawing
  • US8751776B2 patent drawing
  • US8751776B2 patent drawing

AI summary

A branch target address table is provided for each branch instruction having a plurality of branch targets. Each branch target address table stores a history of a plurality of branch target addresses determined in the past by executing a corresponding branch instruction. A branch target prediction unit predicts a predicted branch target address with respect to a branch instruction with reference to the history of branch target addresses stored in the branch target address table corresponding to the branch instruction. The predicted branch target address obtained as a result of the prediction is stored, for example, in a predicted branch target address storage unit in association with the branch instruction, and is referenced by an instruction fetch control unit at the time of prefetching a branch target instruction.