Next Fetch Predictor Circuit for Short Branches and Return Fetch Groups

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing processor circuits face inefficiencies in handling multiple control transfer instructions within a fetch group, leading to wasted processing time and power due to mispredictions and redundant instruction fetching.

Innovation Solution

Implementing a next fetch predictor circuit that identifies and alters the order of instructions within a fetch group based on the type of control transfer instruction, such as short backward branches, short forward branches, and return fetch groups, to improve prediction accuracy and reduce redundant fetching.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a fetch group retrieves multiple sequential instructions at once, then processor throughput is improved, but prediction accuracy deteriorates when multiple control transfer instructions are present

Engineering Contradiction:
Improveprocessor throughputVSAvoidprediction accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The fetch group is segmented into multiple sub-fetch groups based on control transfer instruction boundaries. When a control transfer instruction is detected, the fetch group is divided such that instructions before the control transfer form one sub-fetch group, and instructions after form another sub-fetch group. This segmentation allows independent prediction and processing of each sub-fetch group, improving overall prediction accuracy while maintaining high throughput by processing multiple segments in parallel.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary identification of control transfer instructions within the fetch group before final prediction. By detecting control transfer instructions early in the fetch process, the system can pre-segment the fetch group and prepare multiple prediction paths in advance, allowing the predictor circuit to accurately handle multiple control transfers without sacrificing throughput.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If branch prediction circuits predict control transfer instructions, then instruction fetching efficiency is improved, but power consumption increases due to mispredictions and redundant fetching

Engineering Contradiction:
Improveinstruction fetching efficiencyVSAvoidpower consumption
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The system implements feedback mechanisms where prediction outcomes are monitored and used to adjust subsequent prediction behavior. When mispredictions are detected, the system learns from these errors and refines its prediction logic, reducing future mispredictions and associated power waste. The feedback loop enables the predictor to adapt to program patterns, improving efficiency while minimizing energy-consuming corrective actions.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system discards incorrectly fetched instructions resulting from mispredictions and recovers by refetching only the necessary instructions. Rather than processing entire fetch groups when mispredictions occur, the system selectively discards erroneous instructions and refetches only the required portion, reducing power consumption compared to traditional approaches that would reprocess entire fetch groups.

Inventive Principle:
Principle #34Discarding and recovering

3Adaptability or versatility

If the processor handles multiple control transfer instructions in a fetch group, then program complexity is managed, but processing time increases due to sequential handling

Engineering Contradiction:
Improveprogram complexity handlingVSAvoidprocessing time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The fetch group is segmented into multiple sub-fetch groups at control transfer instruction boundaries, allowing each segment to be processed independently and in parallel. This segmentation enables the processor to handle multiple control transfer instructions simultaneously rather than sequentially, reducing processing time while maintaining the ability to manage complex program flows with multiple branches and calls.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system transitions from sequential single-dimensional processing to multi-dimensional parallel processing by creating multiple prediction and execution paths for different sub-fetch groups. Each control transfer instruction generates its own execution path, allowing the processor to explore multiple program flow dimensions simultaneously, thereby reducing overall processing time for complex programs.

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

Data Source

PatentUS20250321744A1Using a Next Fetch Predictor Circuit with Short Branches and Return Fetch Groups
Publication Date: 2025.10.16 APPLE INC
  • US20250321744A1 patent drawing
  • US20250321744A1 patent drawing
  • US20250321744A1 patent drawing

AI summary

An apparatus includes an instruction cache circuit and an instruction fetch circuit. The instruction fetch circuit is configured to retrieve, from the instruction cache circuit, a fetch group that includes a plurality of instructions for execution by a processing circuit, and to make a determination that the fetch group includes a control transfer instruction that is predicted to be taken. A target address associated with the control transfer instruction is directed to an instruction within the fetch group. The instruction fetch circuit is further configured to, based on the determination, alter instructions within the fetch group in a manner that is based on a type of the control transfer instruction.