Semiconductor Pipeline Branch Prediction Error Handling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In semiconductor devices performing pipeline processing, branch prediction errors lead to operation delays and redundant operations, particularly when a conditional branch instruction is involved, causing inefficiencies and delays due to the need to abandon and re-read instructions.

Innovation Solution

A semiconductor device design that includes a flip-flop for holding instructions and a memory for transmitting and receiving instructions, with control signals from the arithmetic portion, allowing the device to manage instruction flow and prevent redundant operations by holding the existing instruction even if branch prediction is incorrect.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If branch prediction is used to allow the reading portion to keep operating, then circuit operation speed is improved, but operation delay increases when prediction is wrong

Engineering Contradiction:
Improvecircuit operation speedVSAvoidoperation delay
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-fetching instructions into the reading portion using branch prediction before they are actually needed. When a branch instruction is encountered, the prediction unit speculatively fetches instructions from the predicted target address, allowing the pipeline to continue operating without waiting for the actual branch outcome. This preliminary fetching action resolves the contradiction by maintaining high-speed operation while having a mechanism to handle prediction errors.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements feedback through the branch outcome detection mechanism that monitors actual branch execution results and compares them with predictions. When a prediction error is detected, the feedback signal triggers the abandonment of incorrectly fetched instructions and initiates refetching from the correct address. This feedback loop resolves the contradiction by enabling rapid correction of prediction errors, minimizing operation delay while maintaining overall high-speed operation.

Inventive Principle:
Principle #23Feedback

2Reliability

If the reading portion abandons existing instructions when branch prediction is wrong, then correct instructions can be read, but redundant operations occur and operation delay increases

Engineering Contradiction:
Improveinstruction correctnessVSAvoidpipeline processing efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies discarding and recovering by abandoning (discarding) incorrectly predicted instructions in the reading portion when a branch prediction error is detected, then recovering by refetching the correct instructions from the actual branch target. This mechanism ensures instruction correctness while minimizing productivity loss through rapid recovery, resolving the contradiction between reliability and productivity.

Inventive Principle:
Principle #34Discarding and recovering

3Reliability

If the same instruction is re-read after being abandoned, then the arithmetic portion can process correct instructions, but redundant operations increase processing time

Engineering Contradiction:
Improveinstruction accuracyVSAvoidreprocessing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies skipping by rapidly flushing abandoned instructions from the reading portion pipeline when a prediction error is detected, and immediately refetching correct instructions. This rushing through of the error correction process minimizes the time loss from reprocessing, resolving the contradiction between ensuring instruction accuracy and minimizing reprocessing time.

Inventive Principle:
Principle #21Skipping (Rushing through)

Data Source

PatentUS8824194B2Semiconductor device and method for driving the same
Publication Date: 2014.09.02 SEMICON ENERGY LAB CO LTD
  • US8824194B2 patent drawing
  • US8824194B2 patent drawing
  • US8824194B2 patent drawing

AI summary

In a semiconductor device performing pipeline processing with the use of a reading portion reading an instruction and an arithmetic portion performing an operation in accordance with the instruction, the instruction held in the reading portion is transmitted from the flip-flop to the memory when branch prediction turns out to be wrong. Note that the arithmetic portion controls transmission and reception of the instruction between the flip-flop and the memory which are included in the reading portion. This enables elimination of redundant operations in the reading portion in the case where an instruction read by the reading portion after the branch prediction turns out to be wrong is a subroutine, or the like. That is, the instruction held in the memory is transmitted back to the flip-flop without rereading of the same instruction by the reading portion, whereby the instruction can be output to the arithmetic portion.