Macro-Op Fusion Circuit Reducing Pipeline Flushes

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional processors face inefficiencies in macro-op fusion, leading to increased instruction set complexities and performance degradation due to pipeline flushes and branch prediction errors, which are not fully addressed by existing research and technologies.

Innovation Solution

The implementation of an integrated circuit with an instruction decode buffer and a fusion predictor circuit that detects sequences of macro-ops, determines equivalent micro-ops, and delays or executes them to enable fusion, thereby reducing pipeline flushes and improving performance by converting control-flow instructions into non-branch micro-ops.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If macro-ops are fused in the decode stage, then effective instruction count is reduced, but instruction set complexities increase

Engineering Contradiction:
Improveeffective instruction countVSAvoidinstruction set complexities
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the fusion process into two distinct stages: a fusion detection stage that identifies candidate macro-op sequences, and a fusion execution stage that actually performs the merging. This segmentation allows the complex fusion logic to be isolated and managed separately from the main instruction execution path, reducing overall system complexity while maintaining the productivity benefits of macro-op fusion.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary fusion buffer structure that holds detected macro-op sequences before they are merged into fused instructions. This intermediary buffer acts as a mediator between the decode stage and execution stage, allowing complex fusion operations to be performed without directly complicating the instruction set architecture itself.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If conventional macro-op fusion is implemented, then instruction execution efficiency improves, but pipeline flushes increase

Engineering Contradiction:
Improveinstruction execution efficiencyVSAvoidpipeline flushes
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent performs preliminary detection of fusible macro-op sequences in the decode stage, before the instructions are dispatched to execution. By identifying and marking fusible sequences in advance, the system can execute them as unified fused instructions without triggering pipeline flushes, thus maintaining execution efficiency while avoiding time loss from pipeline disruptions.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent converts the potential harm of pipeline flushes into a benefit by using the decode stage information to proactively identify and fuse macro-ops that would otherwise cause pipeline disruptions. The very stage that traditionally suffers from pipeline flushes (decode) becomes the solution by detecting fusion opportunities and preventing them from occurring in the first place.

Inventive Principle:
Principle #22Blessing in disguise (Convert harm into benefit)

3Speed

If control-flow instructions are executed, then program execution progresses, but branch predictor pollution occurs

Engineering Contradiction:
Improveprogram execution progressionVSAvoidbranch predictor accuracy
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The patent extracts control-flow instructions from the normal execution stream by detecting them as part of fusible macro-op sequences and removing their branch prediction requirements. When a control-flow instruction is identified as fusible, its control-flow semantics are absorbed into the fused instruction, effectively taking it out of the branch prediction system and eliminating the pollution effect.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS11861365B2Macro-op fusion
Publication Date: 2024.01.02 SIFIVE INC
  • US11861365B2 patent drawing
  • US11861365B2 patent drawing
  • US11861365B2 patent drawing

AI summary

Systems and methods are disclosed for macro-op fusion. Sequences of macro-ops that include a control-flow instruction are fused into single micro-ops for execution. The fused micro-ops may avoid the use of control-flow instructions, which may improve performance. A fusion predictor may be used to facilitate macro-op fusion.