IP Library Granted Patent US 7,711,934
Granted Patent B2
US 7,711,934 · App. 11/261,654 · Granted May 4, 2010

Processor core and method for managing branch misprediction in an out-of-order processor pipeline

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,711,934
App. No.
11/261,654
Granted
May 4, 2010
Kind
B2
Abstract

A processor core and method for managing branch misprediction in an out-of-order processor pipeline. In one embodiment, the pipeline of the processor core includes a front-end instruction fetch portion, a back-end instruction execution portion, and pipeline control logic. Operation of the instruction fetch portion is decoupled from operation of the instruction execution portion. Following detection of a control transfer misprediction, operation of the instruction fetch portion is halted and instructions residing in the instruction fetch portion are invalidated. When the instruction associated with the misprediction reaches a selected pipeline stage, instructions residing in the instruction execution portion of the pipeline are invalidated and the flow of instructions from the instruction fetch portion to the instruction execution portion of the processor pipeline is restarted. A mispredict instruction identification checker and instruction identification tags are used to determine if a control transfer instruction is permitted to redirect instruction fetching.

Claims (44)

1. A processor having an out-of-order pipeline, comprising:

an instruction fetch portion of the pipeline;

an instruction execution portion of the pipeline, coupled to the instruction fetch portion of the pipeline; and

pipeline control logic, coupled to the instruction fetch portion of the pipeline and the instruction execution portion of the pipeline, wherein the pipeline control logic:

halts movement of instructions from the instruction fetch portion of the pipeline to the instruction execution portion of the pipeline in response to a detection of a control transfer instruction misprediction resulting from a control transfer instruction comprising a control transfer instruction ID checked by a misprediction instruction ID checker;

invalidates instructions residing within the instruction fetch portion of the pipeline;

continues executing instructions in the instruction execution portion of the pipeline after detection of the control transfer instruction misprediction until the control transfer instruction reaches a selected stage of the instruction execution portion of the pipeline;

invalidates instructions residing in the instruction execution portion of the pipeline once the control transfer instruction reaches the selected stage; and

restarts transfer of instructions from the instruction fetch portion of the pipeline to the instruction execution portion of the pipeline.

2. The processor of claim 1 , wherein there are a plurality of program threads, and the pipeline control logic invalidates instructions belonging to one of the plurality of program threads associated with the control transfer instruction misprediction.

3. A computer readable storage medium comprising computer-readable program code to generate a processor having an out-of-order pipeline embodied in software, the processor comprising:

an instruction fetch portion of the pipeline;

an instruction execution portion of the pipeline, coupled to the instruction fetch portion of the pipeline; and

pipeline control logic, coupled to the instruction fetch portion of the pipeline and the instruction execution portion of the pipeline, wherein the pipeline control logic:

halts movement of instructions from the instruction fetch portion of the pipeline to the instruction execution portion of the pipeline in response to a detection of a control transfer instruction misprediction resulting from a control transfer instruction comprising a control transfer instruction ID checked by a misprediction instruction ID checker;

invalidates instructions residing within the instruction fetch portion of the pipeline;

continues executing instructions in the instruction execution portion of the pipeline after detection of the control transfer instruction misprediction until the control transfer instruction reaches a selected stage in the instruction execution portion of the pipeline;

invalidates instructions residing in the instruction execution portion of the pipeline once the control transfer instruction reaches the selected stage; and

restarts transfer of instructions from the instruction fetch portion of the pipeline to the instruction execution portion of the pipeline.

4. The computer readable storage medium of claim 3 , wherein the processor comprises a plurality of program threads, and the pipeline control logic invalidates instructions belonging to one of the plurality of program threads associated with the control transfer instruction misprediction.

5. The computer readable storage medium of claim 3 , wherein the computer-readable program code is a hardware description language software.

6. The computer readable storage medium of claim 5 , wherein the computer-readable program code is a Verilog hardware description language software.

7. The computer readable storage medium of claim 5 , wherein the computer-readable program code is a VHDL hardware description language software.

8. A method for clearing an out-of-order processor pipeline after a control transfer instruction misprediction, the method comprising:

(1) detecting a conditional program counter redirect misprediction during execution of a control transfer instruction in an instruction comprising a control transfer instruction ID checked by a misprediction instruction ID checker execution portion of a processor pipeline;

(2) halting movement of instructions from an instruction fetch portion of the processor pipeline to the instruction execution portion of the processor pipeline in response to the detected misprediction;

(3) invalidating instructions residing within the instruction fetch portion of the processor pipeline;

(4) continuing to execute instructions residing within the instruction execution portion of the processor pipeline until the control transfer instruction reaches a selected stage in the instruction execution portion of the processor pipeline;

(5) invalidating instructions in the instruction execution portion of the pipeline once the control transfer instruction reaches the selected stage; and

(6) restarting transfer of instructions from the instruction fetch portion of the pipeline to the instruction execution portion of the pipeline.

9. The method of claim 8 , wherein (1) comprises detecting a conditional program counter redirect misprediction during execution of one of a branch instruction and a jump instruction.

10. The method of claim 8 , further comprising recoding at least one compressed format instruction.

11. The method of claim 8 , wherein there are a plurality of program threads, and (3) comprises invalidating instructions belonging to one of the plurality of program threads associated with the control transfer instruction.

12. The method of claim 8 , wherein there are a plurality of program threads, and (4) comprises invalidating instructions belonging to one of the plurality of program threads associated with the control transfer instruction.

13. A processor, comprising:

a pipeline capable of executing instructions out of program order, the pipeline having an instruction fetch portion and an instruction execution portion, wherein the instruction fetch portion of the pipeline transfers instructions to the instruction execution portion of the pipeline; and

pipeline control logic that

controls the instruction fetch portion of the pipeline to halt transferring instructions to the instruction execution portion of the pipeline when the instruction execution portion of the pipeline detects a misprediction associated with a control transfer instruction comprising a control transfer instruction ID checked by a misprediction instruction ID checker,

controls the instruction execution portion of the pipeline to continue executing instructions in the instruction execution portion of the pipeline when the misprediction is detected until the control transfer instruction reaches a selected stage in the instruction execution portion of the pipeline,

controls the instruction execution portion of the pipeline to invalidate instructions in the instruction execution portion of the pipeline once the control transfer instruction reaches the selected stage, and

controls the instruction fetch portion of the pipeline to restart transferring instructions to the instruction execution portion of the pipeline.

14. The processor of claim 13 , wherein the pipeline control logic controls the instruction execution portion of the pipeline to invalidate only instructions in the instruction execution portion of the pipeline associated with one of a plurality of program threads.

15. The processor of claim 13 , wherein the selected stage of the instruction execution portion of the pipeline is a stage prior to writing results generated by an arithmetic logic unit to a register file.

16. The processor of claim 13 , wherein the processor is capable of processing variable length instructions.

Assignments (5)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 2, 2014
From: BRIDGE CROSSING, LLC
To: ARM FINANCE OVERSEAS LIMITED
Reel/Frame 033074/0058 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 12, 2013
From: MIPS TECHNOLOGIES, INC.
To: BRIDGE CROSSING, LLC
Reel/Frame 030202/0440 →
RELEASE OF SECURITY INTEREST Recorded Dec 16, 2008
From: JEFFERIES FINANCE LLC, AS COLLATERAL AGENT
To: MIPS TECHNOLOGIES, INC.
Reel/Frame 021985/0015 →
SECURITY AGREEMENT Recorded Aug 24, 2007
From: MIPS TECHNOLOGIES, INC.
To: JEFFERIES FINANCE LLC, AS COLLATERAL AGENT
Reel/Frame 019744/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 31, 2005
From: KISHORE, KARAGADA RAMARAO; SVENDSEN, KJELD; RAJAGOPALAN, VIDYA
To: MIPS TECHNOLOGIES, INC.
Reel/Frame 017155/0199 →