Multithreaded Processor Instruction Scheduling for Speculative Stall Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In multithreaded microprocessors capable of issuing instructions from multiple threads in each clock cycle, the challenge lies in efficiently scheduling speculative instructions to avoid resource conflicts and minimize stalls caused by uncertain branch predictions.

Innovation Solution

A method and system that dynamically determine the highest priority instruction, ensuring it is not speculative, and issue it along with compatible non-speculative instructions in the same clock cycle, using priority ranking and resource compatibility testing to prevent resource conflicts and minimize speculative instruction impact.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If speculative instructions are issued in a multithreaded processor, then instruction throughput is improved, but resource conflicts and stalls increase

Engineering Contradiction:
Improveinstruction throughputVSAvoidresource conflict avoidance
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The processor dynamically switches between single-threaded and multithreaded operation modes based on the presence of speculative instructions. When speculative instructions are detected, the processor operates in single-threaded mode to avoid resource conflicts. When no speculative instructions are present, it operates in multithreaded mode to maximize throughput. This dynamic adaptation resolves the contradiction by adjusting the operational mode to match the instruction mix.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The invention changes the parameter of thread issuance capability based on instruction type. The processor can issue instructions from multiple threads simultaneously when they are non-speculative, but switches to issuing only one thread when speculative instructions are detected. This parameter change allows the system to optimize for throughput when safe and avoid conflicts when speculation is involved.

Inventive Principle:
Principle #35Parameter changes

2Speed

If multiple instructions are issued in each clock cycle, then processing speed is improved, but scheduling complexity increases

Engineering Contradiction:
Improveprocessing speedVSAvoidscheduling complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The scheduling complexity is dynamically adjusted based on the presence of speculative instructions. When speculative instructions are detected, the processor simplifies scheduling by limiting issuance to a single thread, reducing the complexity of determining compatibility among multiple instructions. When no speculative instructions are present, the processor can safely issue multiple instructions from different threads, utilizing full scheduling complexity to maximize throughput.

Inventive Principle:
Principle #15Dynamics

3Productivity

If speculative instructions are issued, then instruction fetch efficiency is improved, but stall probability increases

Engineering Contradiction:
Improveinstruction fetch efficiencyVSAvoidstall time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The instruction stream is segmented into speculative and non-speculative portions. The processor handles these segments differently: non-speculative instructions can be issued freely in multithreaded mode, while speculative instructions trigger a switch to single-threaded mode. This segmentation allows the system to maximize fetch efficiency for safe instructions while minimizing stalls when speculation must be handled conservatively.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10360038B2Method and apparatus for scheduling the issue of instructions in a multithreaded processor
Publication Date: 2019.07.23 MIPS TECH INC
  • US10360038B2 patent drawing
  • US10360038B2 patent drawing
  • US10360038B2 patent drawing

AI summary

A method to dynamically determine which instructions from a plurality of available instructions to issue in each clock cycle in a multithreaded processor capable of issuing a plurality of instructions in each clock cycle, comprises the steps of: determining a highest priority instruction from the plurality of available instructions; determining the compatibility of the highest priority instruction with each of the remaining available instructions; and issuing the highest priority instruction together with other instructions compatible with the highest priority instruction in the same clock cycle; wherein the highest priority instruction cannot be a speculative instruction. The effect of this is that speculative instructions are only ever issued together with at least one non-speculative instruction.