Branch Prediction Circuitry High Branch Density Tracker
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing branch prediction circuitry in data processing apparatuses faces performance degradation due to mispredictions when handling predict blocks with high branch densities, as the associativity of the target prediction storage is often insufficient to accommodate the number of active branch instructions, leading to eviction of useful entries and increased power consumption.
Innovation Solution
Incorporating a high branch density (HBD) tracker that identifies predict blocks with more than N branch instructions, allowing the use of additional sets in the target prediction storage to store target addresses for these blocks, thereby increasing prediction accuracy without increasing the associativity of the storage structure.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the associativity of the target prediction storage is increased to accommodate more branch instructions, then prediction accuracy improves, but device complexity and power consumption increase
Solution Approach 1:
The target prediction storage is segmented into multiple sets, where each set can be independently selected based on the branch density of the predict block. This allows the system to provide additional storage entries for high branch density blocks without increasing the associativity of the entire storage structure, thereby resolving the contradiction between prediction accuracy and device complexity.
Solution Approach 2:
The system dynamically selects which sets of the target prediction storage to use based on the branch density of the current predict block. For high branch density blocks, additional sets are activated; for normal blocks, only the associated set is used. This dynamic adaptation improves prediction accuracy when needed while avoiding the complexity and power consumption of a permanently larger storage structure.
2Reliability
If the associativity of the target prediction storage is increased to accommodate more branch instructions, then prediction accuracy improves, but power consumption increases
Solution Approach 1:
The target prediction storage is divided into multiple sets that can be selectively activated. By segmenting the storage structure, the system only activates the necessary number of sets based on branch density, avoiding the continuous power consumption that would result from maintaining a permanently larger associativity for all cases.
Solution Approach 2:
The system dynamically adjusts the number of active storage sets based on the branch density of the predict block. This dynamic behavior ensures that power consumption is proportional to the actual prediction needs, improving accuracy when high branch density is detected while conserving energy during normal operation.
3Reliability
If additional sets are used for high branch density predict blocks, then prediction accuracy improves, but the complexity of the prediction circuitry increases
Solution Approach 1:
The prediction circuitry is segmented into components that handle different branch density scenarios. The HBD tracker and set selection logic are separate modules that work with the existing N-way set associative structure, adding complexity only where needed for high branch density blocks rather than redesigning the entire prediction circuitry.
Solution Approach 2:
The HBD tracker acts as an intermediary component that monitors branch density and controls the selection of additional sets. This intermediary layer manages the complexity by providing a simple interface between the predict block input and the target prediction storage, activating additional sets only when the HBD tracker identifies high branch density scenarios.
Data Source
AI summary
An apparatus and method are provided for making predictions for branch instructions. The apparatus has a prediction queue for identifying instructions to be fetched for execution, and branch prediction circuitry for making predictions in respect of branch instructions, and for controlling which instructions are identified in the prediction queue in dependence on the predictions. During each prediction iteration, the branch prediction circuitry makes a prediction for a predict block comprising a sequence of M instructions. The branch prediction circuitry comprises a target prediction storage having a plurality of entries that are used to identify target addresses for branch instructions that are predicted as taken, the target prediction storage being arranged as an N-way set associative storage structure comprising a plurality of sets. Each predict block has an associated set within the target prediction storage. The branch prediction circuitry further comprises a high branch density (HBD) tracker arranged to identify, as a HBD predict block, a predict block whose sequence of M instructions contains more than N branch instructions. For each identified HBD predict block, at least one additional set is identified in the target prediction storage to be used in addition to the associated set to identify target addresses for branch instructions that are predicted as taken within that HBD predict block.


