Branch Prediction Unit Segmentation for Accuracy and Speed
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing branch prediction methods face challenges in achieving precise predictions due to the time-consuming process of recording branch prediction information for various conditional branch history patterns, leading to low accuracy.
Innovation Solution
The implementation of a branch processing device that includes a branch history storage unit, first and second prediction units, and a selector to output branch prediction information based on past branch history and consecutive branch outcomes, allowing for selective use of prediction information from either unit to improve prediction accuracy.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If branch prediction information is recorded for each conditional branch history pattern, then prediction accuracy can be improved, but the time required to record the information increases significantly
Solution Approach 1:
The patent segments the branch prediction mechanism into two independent prediction units: a first prediction unit that records detailed branch history patterns for high accuracy, and a second prediction unit that uses a simplified approach with consecutive branch outcomes for faster operation. This segmentation allows the system to balance between recording time and prediction accuracy by using the appropriate unit depending on the specific branch instruction characteristics.
2Measurement precision
If detailed branch history patterns are recorded for each conditional branch, then prediction accuracy improves, but the complexity of the prediction mechanism increases
Solution Approach 1:
The patent extracts the essential prediction functionality into two separate prediction units with different levels of complexity. The second prediction unit extracts only the consecutive branch outcomes (taken/not-taken counts) without requiring detailed history pattern recording, thereby reducing the complexity burden while maintaining viable prediction capability for cases where detailed patterns are not yet available.
3Productivity
If branch prediction information is recorded quickly, then prediction efficiency improves, but the accuracy of prediction decreases
Solution Approach 1:
The patent implements a dynamic selection mechanism that adaptively chooses between the two prediction units based on the current state of branch history recording. When detailed history patterns are available, the system dynamically switches to the first prediction unit for high accuracy. When recording is incomplete or time is critical, it dynamically uses the second prediction unit for faster operation, thereby optimizing the trade-off between efficiency and accuracy in real-time.
Data Source
AI summary
An arithmetic processing device includes: first prediction units which output branch prediction information of a fetched conditional branch instruction based on past branch history information of conditional branch instructions; a second prediction unit which stores a branch taken consecutive number of times and a branch not-taken consecutive number of times to a pattern information storage unit, and outputs branch prediction information of a fetched conditional branch instruction based on the past branch taken consecutive number of times or branch not-taken consecutive number of times stored; selecting units which selectively output the branch prediction information output from the first prediction units or the second prediction unit; and a selector which outputs a next instruction address of the conditional branch instruction or a branch target address of the conditional branch instruction to an instruction fetch unit in accordance with the branch prediction information output by the selecting units.


