Speculative Instruction Pipeline Clearing Mechanism

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing processor designs face performance delays due to the need to wait for the retirement of speculative condition determination instructions before clearing the pipeline and initiating instruction fetching on a correct path when speculation is incorrect, leading to reduced instruction execution speed.

Innovation Solution

Implementing an instruction processing apparatus with an instruction fetching circuitry that caches speculative execution instructions, an executing circuitry that executes speculative condition determination instructions to obtain execution results, and an instruction retiring circuitry that clears instructions when an older instruction is retired, allowing immediate clearing of the pipeline when speculation is incorrect.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the processor waits for the retirement of speculative condition determination instructions before clearing the pipeline, then instruction accuracy is maintained, but instruction execution speed deteriorates

Engineering Contradiction:
Improveinstruction accuracyVSAvoidinstruction execution speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The patent segments the instruction processing pipeline into multiple stages (fetching, decoding, scheduling, execution, retirement) and implements independent clearing mechanisms for different pipeline stages. When speculation is incorrect, the instruction fetching circuitry can clear fetched instructions independently, while the instruction retiring circuitry clears retired instructions separately, allowing parallel clearing operations that maintain accuracy while improving speed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements preliminary action by having the instruction fetching circuitry clear fetched speculative instructions immediately when incorrect speculation is detected, before these instructions reach the retirement stage. This preliminary clearing prevents incorrect instructions from propagating through the entire pipeline, maintaining accuracy while eliminating the need to wait for retirement.

Inventive Principle:
Principle #10Preliminary action

2Speed

If the processor clears the pipeline immediately when speculation is incorrect, then instruction execution speed improves, but pipeline complexity increases

Engineering Contradiction:
Improveinstruction execution speedVSAvoidpipeline complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent extracts the clearing function into dedicated clearing circuitry within each pipeline stage (fetching circuitry with first clearing unit, retiring circuitry with second clearing unit). This separation allows the clearing operation to be performed by specialized hardware components rather than requiring complex control logic throughout the entire pipeline, thus improving speed while managing complexity through functional decomposition.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces execution result information as an intermediary signal that mediates between the execution stage and other pipeline stages. When the execution result indicates incorrect speculation, this intermediary signal triggers the clearing operations in the fetching and retiring circuitries, coordinating the clearing action without requiring direct complex inter-stage communication.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If speculative instructions are cached in the instruction fetching circuitry, then instruction fetching efficiency improves, but loss of time increases when incorrect speculation occurs

Engineering Contradiction:
Improveinstruction fetching efficiencyVSAvoidtime to clear incorrect instructions
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by implementing immediate clearing of fetched speculative instructions in the instruction fetching circuitry as soon as incorrect speculation is detected, without waiting for these instructions to be fully processed or retired. This preliminary clearing action eliminates the time loss that would otherwise occur while incorrect instructions remain cached, while the caching mechanism continues to provide fetching efficiency for correct instructions.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements feedback by using the execution result of speculative condition determination instructions to control the clearing operation in the instruction fetching circuitry. When the execution result indicates incorrect speculation, this feedback signal immediately triggers the clearing of fetched instructions, creating a closed-loop control system that minimizes time loss by responding dynamically to execution outcomes.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS11675595B2Starting reading of instructions from a correct speculative condition prior to fully flushing an instruction pipeline after an incorrect instruction speculation determination
Publication Date: 2023.06.13 ALIBABA GROUP HOLDING LTD
  • US11675595B2 patent drawing
  • US11675595B2 patent drawing
  • US11675595B2 patent drawing

AI summary

An apparatus includes instruction fetching circuitry to read a set of instructions, including a speculative execution instruction and a speculative condition determination instruction; cache the instructions; and read the speculative execution instruction corresponding to the speculative condition of the speculative condition determination instruction. If an execution result of the speculative condition determination instruction indicates the speculative condition is incorrect, clear the instructions cached in the instruction fetching circuitry. Instruction decoding circuitry decodes instructions. Executing circuitry executes instructions, including executing the speculative condition determination instruction to obtain the execution result. Instruction retiring circuitry caches instructions executed by the executing circuitry, and in response to an instruction older than the speculative condition determination instruction being retired, instructs the executing circuitry to clear instructions in the executing circuitry and clear the instructions cached in the instruction retiring circuitry.