# US 2023/0267002 A1 · Multi-Instruction Engine-Based Instruction Processing Method and Processor

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

- Number: US 2023/0267002 A1
- Document ID: US20230267002A1
- Status: Published application
- Kind: A1
- Application number: 18/309,177
- Filed: 2023-04-28
- Published: 2023-08-24
- Earliest claimed: 2020-10-30
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Jin Wang
- Web page: https://patentgrep.com/patent/US20230267002A1

## CPC

- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 15/78: comprising a single central processing unit
- G06F 9/30047: {Prefetch instructions; cache control instructions}
- G06F 9/3836: {Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution}
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

A processor includes a program block dispatcher, an instruction cache group, and an instruction engine group. A plurality of instruction caches in the instruction cache group are in a one-to-one correspondence with a plurality of instruction engines in the instruction engine group. In a method, the program block dispatcher determines, based on an instruction processing request for processing a first instruction set, a first instruction engine for processing the first instruction set; and determines, based on the one-to-one correspondence between the instruction engines and the instruction caches, a first instruction cache configured to cache the first instruction set. The program block dispatcher sends a program counter in the instruction processing request to the first instruction cache. The first instruction engine obtains the first instruction set from the first instruction cache, to execute an instruction in the first instruction set.

## Claims

### Claim 1

A method implemented by a processor, the method comprising:
receiving, by a program block dispatcher of the processor, an instruction processing request to process a first instruction set;
determining, by the program block dispatcher, from an instruction engine group of the processor, and based on the instruction processing request, a first instruction engine for processing the first instruction set;
sending, by the program block dispatcher, the instruction processing request to a first instruction cache of an instruction cache group of the processor, wherein the first instruction cache corresponds to the first instruction engine; and
obtaining, by the first instruction engine, the first instruction set from the first instruction cache.

### Claim 2 (depends on 1)

The method of claim 1, wherein determining, by the program block dispatcher, the first instruction engine based on the instruction processing request comprises:
obtaining, by the program block dispatcher and based on the instruction processing request, an alternative instruction engine for processing the first instruction set; and
selecting, by the program block dispatcher, the alternative instruction engine as the first instruction engine.

### Claim 3 (depends on 2)

The method of claim 2, wherein the instruction engine group comprises a first alternative instruction engine group, and wherein obtaining, by the program block dispatcher, the alternative instruction engine of the first instruction set based on the instruction processing request comprises using, by the program block dispatcher, when the first instruction set is an instruction set on a non-performance path, a selected instruction engine in the first alternative instruction engine group as the alternative instruction engine of the first instruction set.

### Claim 4 (depends on 2)

The method of claim 2, wherein the instruction engine group comprises a first alternative instruction engine group and a second instruction engine group, and wherein obtaining, by the program block dispatcher, the alternative instruction engine of the first instruction set based on the instruction processing request comprises using, by the program block dispatcher, when the first instruction set is an instruction set on a performance path, a first selected instruction engine in the first alternative instruction engine group or a second selected instruction engine in the second instruction engine group as the alternative instruction engine of the first instruction set.

### Claim 5 (depends on 4)

The method of claim 4, wherein using, by the program block dispatcher, the first selected instruction engine in the first alternative instruction engine group or the second selected instruction engine in the second instruction engine group as the alternative instruction engine of the first instruction set comprises:
using, by the program block dispatcher, when a first condition is met, the first selected instruction engine in the first alternative instruction engine group as the alternative instruction engine of the first instruction set, wherein the first condition is that a queue depth of an instruction processing request queue corresponding to at least one instruction engine in the first alternative instruction engine group is less than a first preset threshold; or
using, by the program block dispatcher, when a second condition is met, the second selected instruction engine in the second instruction engine group as the alternative instruction engine of the first instruction set, wherein the second condition is that queue depths of instruction processing request queues corresponding to all instruction engines in the first alternative instruction engine group exceed the first preset threshold.

### Claim 6 (depends on 4)

The method of claim 4, wherein the second instruction engine group comprises a second alternative instruction engine group and a third alternative instruction engine group, and wherein using, by the program block dispatcher, the second selected instruction engine in the second instruction engine group as the alternative instruction engine of the first instruction set comprises:
using, by the program block dispatcher, the second selected instruction engine in the second alternative instruction engine group of the second instruction engine group as the alternative instruction engine of the first instruction set; and
adding, by the program block dispatcher, when a third condition is met, at least one instruction engine in the third alternative instruction engine group to the second alternative instruction engine group, wherein the third condition is that the second alternative instruction engine group is empty, or queue depths of instruction processing request queues corresponding to all the instruction engines in the second alternative instruction engine group exceed a second preset threshold.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
selecting, by the program block dispatcher, in the third alternative instruction engine group, at least one instruction engine corresponding to an instruction processing request queue whose queue depth is less than a third preset threshold; and
adding the at least one instruction engine to the second alternative instruction engine group.

### Claim 8 (depends on 6)

The method of claim 6, further comprising:
recording, by the program block dispatcher, an instruction engine selection difference; and
deleting, by the program block dispatcher, when the instruction engine selection difference exceeds a fourth preset threshold, all the instruction engines in the second alternative instruction engine group, wherein the instruction engine selection difference indicates a quantity difference between a first quantity of times of selecting the first selected instruction engine from the first alternative instruction engine group and a second quantity of times of selecting the second selected instruction engine from the second alternative instruction engine group.

### Claim 9 (depends on 2)

The method of claim 2, wherein selecting, by the program block dispatcher, the alternative instruction engine as the first instruction engine comprises selecting, by the program block dispatcher, the alternative instruction engine corresponding to an instruction processing request queue with a minimum queue depth as the first instruction engine.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
sending, by the first instruction cache, when the first instruction cache detects an end indicator of the first instruction set, scheduling information to the program block dispatcher, wherein the scheduling information indicates that the first instruction engine can process a next instruction processing request.

### Claim 11

A processor comprising:
an instruction cache group comprising a plurality of instruction caches;
an instruction engine group comprising a plurality of instruction engines, wherein the plurality of instruction caches in the instruction cache group are in a one-to-one correspondence with the plurality of instruction engines in the instruction engine group; and
a program block dispatcher configured to:
receive an instruction processing request to process a first instruction set;
determine a first instruction engine based on the instruction processing request; and
send the instruction processing request to a first instruction cache corresponding to the first instruction engine, wherein the first instruction engine processes the first instruction set in the instruction engine group, and wherein the first instruction engine is configured to obtain the first instruction set from the first instruction cache.

### Claim 12 (depends on 11)

The processor of claim 11, further comprising:
a plurality of instruction processing request queues in a one-to-one correspondence with the plurality of instruction engines, wherein the plurality of instruction processing request queues are further in a one-to-one correspondence with the plurality of instruction caches; and
the program block dispatcher is further configured to determine, based on an instruction processing request queue corresponding to the first instruction engine, the first instruction cache corresponding to the first instruction engine.

### Claim 13 (depends on 11)

The processor of claim 11, wherein the program block dispatcher is further configured to:
obtain, based on the instruction processing request, an alternative instruction engine that can be configured to process the first instruction set; and
select the alternative instruction engine as the first instruction engine.

### Claim 14 (depends on 13)

The processor of claim 13, wherein the instruction engine group comprises a first alternative instruction engine group; and the instruction engine group is further configured to use, when the first instruction set is an instruction set on a non-performance path, an instruction engine in the first alternative instruction engine group as the alternative instruction engine of the first instruction set.

### Claim 15 (depends on 13)

The processor of claim 13, wherein the instruction engine group comprises a first alternative instruction engine group and a second instruction engine group; and the program block dispatcher is further configured to use, when the first instruction set is an instruction set on a performance path, a first instruction engine in the first alternative instruction engine group or a second instruction engine in the second instruction engine group as the alternative instruction engine of the first instruction set.

### Claim 16 (depends on 15)

The processor of claim 15, wherein the program block dispatcher is further configured to:
use, when a first condition is met, the first instruction engine in the first alternative instruction engine group as the alternative instruction engine of the first instruction set, wherein the first condition is that a queue depth of an instruction processing request queue corresponding to at least one instruction engine in the first alternative instruction engine group is less than a first preset threshold; or
use, when a second condition is met, the second instruction engine in the second instruction engine group as the alternative instruction engine of the first instruction set, wherein the second condition is that queue depths of instruction processing request queues corresponding to all instruction engines in the first alternative instruction engine group exceed the first preset threshold.

### Claim 17 (depends on 15)

The processor of claim 15, wherein the second instruction engine group comprises a second alternative instruction engine group and a third alternative instruction engine group, and wherein the program block dispatcher is specifically configured to:
use an instruction engine in the second alternative instruction engine group of the second instruction engine group as the alternative instruction engine of the first instruction set; and
add, when a third condition is met, at least one third instruction engine in the third alternative instruction engine group to the second alternative instruction engine group, wherein the third condition is that the second alternative instruction engine group is empty, or queue depths of instruction processing request queues corresponding to all instruction engines in the second alternative instruction engine group exceed a second preset threshold.

### Claim 18 (depends on 17)

The processor of claim 17, wherein the program block dispatcher is further configured to:
select, in the third alternative instruction engine group, at least one fourth instruction engine corresponding to an instruction processing request queue whose queue depth is less than a third preset threshold; and
add the at least one fourth instruction engine to the second alternative instruction engine group.

### Claim 19 (depends on 18)

The processor of claim 18, wherein the program block dispatcher is further configured to:
record an instruction engine selection difference; and
delete, when the instruction engine selection difference exceeds a fourth preset threshold, all instruction engines in the second alternative instruction engine group, wherein the instruction engine selection difference indicates a quantity difference between a first quantity of times of selecting the first instruction engine from the first alternative instruction engine group and a second quantity of times of selecting the second instruction engine from the second alternative instruction engine group.

### Claim 20 (depends on 13)

The processor of claim 13, wherein the program block dispatcher is further configured to select the alternative instruction engine corresponding to an instruction processing request queue with a minimum queue depth as the first instruction engine.
