Loop Predictor-Directed Instruction Buffer for Processor Performance

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Modern processors face performance and power consumption issues due to conditional branch instructions in loops, particularly in pipelined and superscalar processors, leading to pipeline bubbles and increased energy usage.

Innovation Solution

A processor with an instruction cache, execution engine, and loop predictor that determines a trained loop count, predicting branch instructions based on whether the loop fits within the instruction buffer, thereby optimizing fetching and decoding processes to reduce power consumption and improve performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the processor fetches and decodes loop instructions from the instruction cache for every iteration, then the processor can execute loop body instructions, but the pipeline experiences bubbles and performance decreases due to conditional branch misprediction

Engineering Contradiction:
Improveloop execution speedVSAvoidpipeline bubble time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The processor pre-fetches loop body instructions into the instruction buffer before the loop executes. The loop predictor identifies loops and pre-loads instructions into the buffer, so that when the loop iterates, instructions are already available in the buffer rather than needing to be fetched from cache each time. This preliminary action eliminates pipeline bubbles caused by branch misprediction.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The instruction buffer serves as an intermediary between the instruction cache and the execution engine. Instead of directly fetching from cache for each loop iteration, the buffer acts as a middle layer that stores loop body instructions, allowing the execution engine to retrieve instructions without triggering cache accesses and avoiding the performance penalty of branch misprediction.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If the processor fetches loop instructions from the instruction cache for every iteration, then the instructions can be decoded and executed, but power consumption increases due to repeated fetching and decoding operations

Engineering Contradiction:
Improveloop execution capabilityVSAvoidprocessor power consumption
Core Design Contradiction:
ProductivityVSUse of energy by moving object

Solution Approach 1:

The processor performs the power-consuming fetch and decode operations once before the loop executes, pre-loading instructions into the buffer. During loop iterations, the processor simply retrieves instructions from the buffer without repeating the expensive fetch and decode operations, significantly reducing power consumption while maintaining execution capability.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The processor recycles loop body instructions by keeping them in the instruction buffer across multiple iterations. Instead of discarding instructions after one use and re-fetching them, the buffer retains the instructions for reuse, eliminating redundant fetch and decode operations that consume power.

Inventive Principle:
Principle #34Discarding and recovering

3Reliability

If the processor uses a traditional branch predictor for loop conditional branches, then the fetch unit can predict branch outcomes, but misprediction corrections cause pipeline bubbles and performance loss

Engineering Contradiction:
Improvebranch prediction accuracyVSAvoidinstruction throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The processor extracts the loop body instructions from the main instruction stream and places them in a dedicated buffer. The loop predictor identifies loops and separates their body instructions, so that the conditional branch instruction is the only one fetched from cache while loop body instructions come from the buffer. This extraction eliminates the performance impact of branch misprediction on loop execution.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The loop predictor performs preliminary identification of loop structures and pre-loads loop body instructions into the buffer before execution. This advance preparation allows the processor to handle conditional branches more efficiently by having loop body instructions ready in the buffer, reducing the impact of any branch misprediction on overall throughput.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9891923B2Loop predictor-directed loop buffer
Publication Date: 2018.02.13 VIA ALLIANCE SEMICON CO LTD
  • US9891923B2 patent drawing
  • US9891923B2 patent drawing
  • US9891923B2 patent drawing

AI summary

A loop predictor trains a branch instruction to determine a trained loop count of a loop. When the loop fits in an instruction buffer, the processor stops fetching from an instruction cache, sends the loop instructions to an execution engine from the buffer without fetching from the cache, maintains a loop pop count of times the branch is sent to the execution engine from the buffer, and predicts the branch instruction is taken when the loop pop count is less than the trained loop count and otherwise predicts not taken.