# US 2015/0106595 A1 · Prioritizing instructions based on type

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2015/0106595 A1
- Document ID: US20150106595A1
- Status: Published application
- Kind: A1
- Application number: 14/340,932
- Filed: 2014-07-25
- Published: 2015-04-16
- Earliest claimed: 2013-07-31
- Assignees: Imagination Technologies Limited
- Applicants: Imagination Technologies Limited
- Inventors: Anand Khot; Hugh Jackson
- Web page: https://patentgrep.com/patent/US20150106595A1

## CPC

- G06F 9/384: {Register renaming}
- G06F 9/3016: {Decoding the operand specifier, e.g. specifier format}
- G06F 9/32: Address formation of the next instruction, e.g. by incrementing the instruction counter (G06F9/38 takes precedence)
- G06F 9/3836: {Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution}
- G06F 9/3851: {from multiple instruction streams, e.g. multistreaming}
- G06F 9/3856: {Reordering of instructions, e.g. using queues or age tags}
- G06F 9/3888: {controlled by a single instruction for multiple threads [SIMT] in parallel}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and reservation stations for selecting instructions to issue to a functional unit of an out-of-order processor. The method includes classifying each instruction into one of a number of categories based on the type of instruction. Once classified an instruction is stored in an instruction queue corresponding to the category in which it was classified. Instructions are then selected from one or more of the instruction queues to issue to the functional unit based on a relative priority of the plurality of types of instructions. This allows certain types of instructions (e.g. control transfer instructions, flag setting instructions and/or address generation instructions) to be prioritized over other types of instructions even if they are younger.

## Claims

### Claim 1

A method of selecting instructions to issue to a functional unit in an out-of-order processor, the method comprising:
receiving a plurality of instructions at a reservation station, each instruction being one of a plurality of types of instructions and being classified into one of a plurality of categories based on the type of instruction;
storing, at the reservation station, each instruction in one of a plurality of instruction queues, each instruction queue being associated with one of the plurality of categories, each instruction queue being assigned a priority and a maximum number of instructions assessable in a clock cycle; and
selecting, at the reservation station, instructions from one or more of the instruction queues to issue to the functional unit in order of the assigned priorities so that instructions are selected based on a relative priority of the plurality of types of instructions;
wherein the selecting instructions from a particular instruction queue comprises assessing, in a clock cycle, each of one or more instructions in that particular instruction queue up to the maximum number of instructions for that particular queue to determine if that instruction is ready and has not been previously issued.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the method further comprises classifying, at one of the reservation station and a decode and renaming stage, each instruction into one of the plurality of categories based on the type of instruction

### Claim 3 (depends on 1)

The method according to claim 1, wherein instructions are selected from the instruction queues in order of the priorities until a maximum number of instructions have been selected.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the functional unit comprises one or more pipelines and the maximum number of instructions selected is equal to the number of pipelines.

### Claim 5 (depends on 1)

The method according to claim 1, wherein selecting instructions from a particular instruction queue further comprises establishing a window covering instructions to be assessed in that particular queue, the window being defined by a head pointer pointing to a head instruction and a tail pointer pointing to a tail instruction.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the head instruction is the oldest instruction in the particular instruction queue that has not been issued.

### Claim 7 (depends on 5)

The method according to claim 5, wherein the head instruction is the oldest instruction in the particular instruction queue that is ready and has not been issued.

### Claim 8 (depends on 5)

The method according to claim 5, wherein the tail instruction is the (X−1)th instruction in the particular instruction queue following the head instruction, wherein X is the maximum number of instructions assessable in the particular instruction queue.

### Claim 9 (depends on 1)

The method according to claim 1, wherein selecting instructions from a particular instruction queue comprises selecting up to a maximum number of instructions from the particular instruction queue.

### Claim 10 (depends on 1)

The method according to claim 1, wherein the plurality of categories comprises a category for at least one of control transfer instructions, flag setting instructions and address generation instructions.

### Claim 11 (depends on 1)

The method according to claim 1, wherein the plurality of categories comprises a category for control transfer instructions, a category for flag setting instructions and a category for address generation instructions.

### Claim 12 (depends on 10)

The method according to claim 10, wherein the instruction queue associated with the category for control transfer instructions is assigned the highest priority.

### Claim 13 (depends on 1)

The method according to claim 1, further comprising issuing, at the reservation station, the selected instructions to the functional unit for execution.

### Claim 14 (depends on 13)

The method according to claim 13, wherein the functional unit comprises one or more pipelines and issuing the selected instruction to the functional unit comprises issuing each selected instruction to one of the pipelines.

### Claim 15 (depends on 1)

The method according to claim 1, wherein the out-of-order processor is a multi-threaded processor and instructions are selected from the instruction queues based on a relative priority of the plurality of types of instructions and within a type of instruction, instructions are selected from all threads in the multi-threaded processor.

### Claim 16

A reservation station to select instructions to issue to a functional unit in an out-of-order processor, the reservation station comprising:
an instruction classifier configured to receive a plurality of instructions, each instruction being one of a plurality of instruction types and configured to classify into one of a plurality of categories based on the type of instruction;
a plurality of instruction queues in communication with the instruction classifier, each instruction queue configured to receive instructions from the instruction classifier that have been classified into a particular category and store the received instructions, each instruction queue being assigned a priority and a maximum number of instructions assessed in a clock cycle; and
an instruction scheduler in communication with each of the plurality of instruction queues, the instruction scheduler configured to select instructions from one or more of the instruction queues to issue to the functional unit in order of the assigned priorities so that instructions are selected based on a relative priority of the plurality of types of instructions;
wherein selecting instructions from a particular instruction queue comprises assessing, in a clock cycle, each of one or more instructions in the particular instruction queue up to the maximum number of instructions for that particular queue to determine if the instruction is ready and has not been previously issued.

### Claim 17 (depends on 16)

The reservation station according to claim 16, wherein selecting instructions from a particular instruction queue further comprises establishing a window covering the instructions in a particular queue to be assessed, the window being defined by a head pointer pointing at a head instruction and a tail pointer pointing at a tail instruction.

### Claim 18 (depends on 16)

A processor comprising the reservation station of claim 16.

### Claim 19 (depends on 16)

A computer readable storage medium having encoded thereon computer readable program code for generating a processor comprising the reservation station of claim 16.

### Claim 20 (depends on 1)

A computer readable storage medium having encoded thereon computer readable program code for generating a processor configured to perform the method of claim 1.
