IP Library Granted Patent US 7,366,885
Granted Patent B1
US 7,366,885 · App. 10/858,791 · Granted Apr 29, 2008

Method for optimizing loop control of microcoded instructions

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,366,885
App. No.
10/858,791
Granted
Apr 29, 2008
Kind
B1
Abstract

A method for optimizing loop control of microcoded instructions includes identifying an instruction as a repetitive microcode instruction such as a move string instruction, for example, having a repeat prefix. The repetitive microcode instruction may include a loop of microcode instructions forming a microcode sequence. The microcode sequence is stored within a storage of a microcode unit. The method also includes storing a loop count value associated with the repetitive microcode instruction to a sequence control unit of the microcode unit. The method further includes determining a number of iterations to issue the microcode sequence for execution by an instruction pipeline based upon the loop count value. In response to receiving the repetitive microcode instruction, the method includes continuously issuing the microcode sequence for the number of iterations.

Claims (36)

1. A method comprising:

identifying an instruction as a repetitive microcode instruction, wherein said repetitive microcode instruction includes a loop of microcode instructions forming a microcode sequence stored within a microcode unit;

storing a loop count value associated with said repetitive microcode instruction to a sequence control unit of said microcode unit;

determining a number of iterations to issue said microcode sequence for execution by an instruction pipeline based upon said loop count value;

in response to receiving said repetitive microcode instruction, continuously issuing said microcode sequence for said number of iterations;

storing an encoded value corresponding to said loop count value within an operation resulting from at least partial decoding of said repetitive microcode instruction, wherein said operation is included within a trace stored within a trace cache; and

predicting said loop count value based upon a number of past iterations of the repetitive microcode instruction and updating said encoded value stored within said trace cache.

2. The method as recited in claim 1 , wherein said repetitive microcode instruction includes a move string instruction preceded by a repeat prefix.

3. The method as recited in claim 1 , wherein storing a loop count value includes executing a microcode instruction, as part of said repetitive microcode instruction, that transfers said loop count value from a processor general purpose register to a loop count storage of said sequence control unit.

4. The method as recited in claim 1 , wherein storing a loop count value includes control logic moving said loop count value from a processor general purpose register to said loop count storage in response to receiving said repetitive microcode instruction.

5. The method as recited in claim 1 , wherein storing a loop count value includes control logic receiving and storing said encoded value to said loop count storage in response to receiving said operation from said trace cache.

6. A processor comprising:

an instruction scan unit configured to identify an instruction as a repetitive microcode instruction, wherein said repetitive microcode instruction corresponds to a loop of microcode instructions forming a microcode sequence for execution by an instruction pipeline;

a microcode instruction unit coupled to said instruction scan unit, wherein said microcode instruction unit includes:

a microcode storage configured to store said microcode sequence; and

a sequence control unit coupled to said microcode storage and configured to store a loop count value associated with said repetitive microcode instruction in a loop count storage;

wherein said sequence control unit is further configured to determine a number of iterations to issue said microcode sequence based upon said loop count value; and

wherein said sequence control unit is further configured to continuously issue said microcode sequence for said number of iterations in response to receiving said repetitive microcode instruction from said instruction scan unit;

a trace cache including a plurality of entries, each configured to store a trace including an operation resulting from at least partial decoding of said repetitive microcode instruction, wherein said operation includes an encoded value corresponding to said loop count value; and

a loop prediction unit configured to predict said loop count value based upon a number of past iterations of the repetitive microcode instruction and to update said encoded value stored within said trace cache.

7. The processor as recited in claim 6 , wherein said repetitive microcode instruction includes a move string instruction preceded by a repeat prefix.

8. The processor as recited in claim 6 , wherein said repetitive microcode instruction further includes a microcode instruction configured to transfer said loop count value from a processor general purpose register to a loop count storage of said sequence control unit.

9. The processor as recited in claim 6 , wherein said microcode instruction unit further includes a control unit configured to move said loop count value from a processor general purpose register to said loop count storage.

10. The processor as recited in claim 6 , wherein said sequence control unit is further configured to store said encoded value in said loop count storage in response to receiving said operation from said trace cache.

11. A computer system comprising:

a processor configured to execute instructions in an instruction pipeline; and

a system memory coupled to said processor and configured to store said instructions;

wherein said processor includes:

an instruction scan unit configured to identify a given instruction as a repetitive microcode instruction, wherein said repetitive microcode instruction corresponds to a loop of microcode instructions forming a microcode sequence for execution by said instruction pipeline;

a microcode instruction unit coupled to said instruction scan unit, wherein said microcode instruction unit includes:

a microcode storage configured to store said microcode sequence;

a sequence control unit coupled to said microcode storage and configured to store a loop count value associated with said repetitive microcode instruction in a loop count storage;

wherein said sequence control unit is further configured to determine a number of iterations to issue said microcode sequence based upon said loop count value;

wherein said sequence control unit is further configured to continuously issue said microcode sequence for said number of iterations in response to receiving said repetitive microcode instruction from said instruction scan unit;

a trace cache including a plurality of entries, each configured to store a trace including an operation resulting from at least partial decoding of said repetitive microcode instruction, wherein said operation includes an encoded value corresponding to said loop count value; and

a loop prediction unit configured to predict said loop count value based upon a number of past iterations of the repetitive microcode instruction and to update said encoded value stored within said trace cache.

Assignments (7)
RELEASE OF SECURITY INTEREST Recorded May 12, 2021
From: WILMINGTON TRUST, NATIONAL ASSOCIATION
To: GLOBALFOUNDRIES U.S. INC.
Reel/Frame 056987/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 29, 2021
From: GLOBALFOUNDRIES US INC.
To: MEDIATEK INC.
Reel/Frame 055173/0781 →
RELEASE OF SECURITY INTEREST Recorded Nov 20, 2020
From: WILMINGTON TRUST, NATIONAL ASSOCIATION
To: GLOBALFOUNDRIES INC.
Reel/Frame 054636/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 2, 2020
From: GLOBALFOUNDRIES INC.
To: GLOBALFOUNDRIES U.S. INC.
Reel/Frame 054633/0001 →
SECURITY AGREEMENT Recorded Nov 29, 2018
From: GLOBALFOUNDRIES INC.
To: WILMINGTON TRUST, NATIONAL ASSOCIATION
Reel/Frame 049490/0001 →
AFFIRMATION OF PATENT ASSIGNMENT Recorded Aug 18, 2009
From: ADVANCED MICRO DEVICES, INC.
To: GLOBALFOUNDRIES INC.
Reel/Frame 023119/0083 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 2, 2004
From: RADHAKRISHNAN, ARUN; MUTHUSAMY, KARTHIKEYAN
To: ADVANCED MICRO DEVICES, INC.
Reel/Frame 015433/0761 →