Non-Sequential Instruction Prefetching for Branch Prediction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional instruction prefetching techniques are ineffective for software with frequent branch instructions, as they do not provide performance and power management improvements due to the likelihood of non-execution of prefetched sequential instructions.

Innovation Solution

Implementing a prefetch operation on non-sequential instruction addresses by using a predicted branch target address during higher-order memory access, which conserves power by avoiding retrieval of instructions if the predicted branch target address hits in the instruction cache, and initiates a higher-order memory access if it misses.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If sequential instruction prefetching is performed, then processor performance is improved for software with few branches, but power consumption increases due to retrieving instructions that may not be executed

Engineering Contradiction:
Improveprocessor performanceVSAvoidpower consumption
Core Design Contradiction:
ProductivityVSUse of energy by moving object

Solution Approach 1:

The patent performs prefetch operations in advance during higher-order memory access to determine whether branch target instructions are present in the instruction cache before actually fetching them. This preliminary check avoids the power consumption of retrieving instructions that may not be executed, while still maintaining the performance benefit of having instructions ready when needed.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system uses its own branch prediction circuits and cache structure to automatically determine which instructions to prefetch. The instruction cache itself provides the information needed to make prefetch decisions through its hit/miss status, eliminating the need for external control logic and reducing overall system complexity.

Inventive Principle:
Principle #25Self-service

2Use of energy by moving object

If prefetch operation is performed on predicted branch target address, then power consumption is reduced by avoiding retrieval of instructions when they are already in cache, but processor performance may be compromised if branch prediction is inaccurate

Engineering Contradiction:
Improvepower consumptionVSAvoidprocessor performance
Core Design Contradiction:
Use of energy by moving objectVSProductivity

Solution Approach 1:

The patent employs branch prediction circuits that use feedback from past branch outcomes to improve future predictions. The system continuously learns from branch behavior patterns, adjusting its prediction accuracy over time. This feedback mechanism ensures that prefetch decisions become increasingly accurate, maintaining processor performance while reducing power consumption from unnecessary instruction retrievals.

Inventive Principle:
Principle #23Feedback

3Reliability

If instruction cache hit/miss lookup is performed for every sequential address, then complete instruction availability is ensured, but power consumption increases due to frequent cache access operations

Engineering Contradiction:
Improveinstruction availabilityVSAvoidpower consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

Instead of performing complete cache lookups for every sequential address, the patent performs partial prefetch operations only on predicted branch target addresses during higher-order memory access. This partial action approach checks only the most likely candidates for instruction fetching, ensuring instruction availability for critical paths while dramatically reducing the number of power-consuming cache access operations.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS7917731B2Method and apparatus for prefetching non-sequential instruction addresses
Publication Date: 2011.03.29 QUALCOMM INC
  • US7917731B2 patent drawing
  • US7917731B2 patent drawing
  • US7917731B2 patent drawing

AI summary

A processor performs a prefetch operation on non-sequential instruction addresses. If a first instruction address misses in an instruction cache and accesses a higher-order memory as part of a fetch operation, and a branch instruction associated with the first instruction address or an address following the first instruction address is detected and predicted taken, a prefetch operation is performed using a predicted branch target address, during the higher-order memory access. If the predicted branch target address hits in the instruction cache during the prefetch operation, associated instructions are not retrieved, to conserve power. If the predicted branch target address misses in the instruction cache during the prefetch operation, a higher-order memory access may be launched, using the predicted branch instruction address. In either case, the first instruction address is re-loaded into the fetch stage pipeline to await the return of instructions from its higher-order memory access.