# US 2023/0409325 A1 · Micro-operation supply rate variation

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

- Number: US 2023/0409325 A1
- Document ID: US20230409325A1
- Status: Published application
- Kind: A1
- Application number: 17/838,713
- Filed: 2022-06-13
- Published: 2023-12-21
- Earliest claimed: 2022-06-13
- Assignees: Arm Limited
- Applicants: Arm Limited
- Inventors: Guillaume BOLBENES; Thibaut Elie LANOIS; Houdhaifa BOUZGUARROU; Luca NASSI
- Web page: https://patentgrep.com/patent/US20230409325A1

## CPC

- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/3806: {using address prediction, e.g. return stack, branch history buffer}
- G06F 8/452: {Loops}
- G06F 9/30036: {Instructions to perform operations on packed data, e.g. vector, tile or matrix operations}
- G06F 9/30038: {using a mask}
- G06F 9/30072: {to perform conditional operations, e.g. using predicates or guards}
- G06F 9/325: {for loops, e.g. loop detection or loop counter}
- G06F 9/381: {Loop buffering}
- G06F 9/3836: {Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution}
- G06F 9/3844: {using dynamic branch prediction, e.g. using branch history tables}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Processing circuitry performs processing operations in response to micro-operations. Front end circuitry supplies the micro-operations to be processed by the processing circuitry. Prediction circuitry generates a prediction of a number of loop iterations for which one or more micro-operations per loop iteration are to be supplied by the front end circuitry, where an actual number of loop iterations to be processed by the processing circuitry is resolvable by the processing circuitry based on at least one operand corresponding to a first loop iteration to be processed by the processing circuitry. The front end circuitry varies, based on a level of confidence in the prediction of the number of loop iterations, a supply rate with which the one or more micro-operations for at least a subset of the loop iterations are supplied to the processing circuitry.

## Claims

### Claim 1

An apparatus comprising:
processing circuitry to perform processing operations in response to micro-operations;
front end circuitry to supply the micro-operations to be processed by the processing circuitry; and
prediction circuitry to generate a prediction of a number of loop iterations for which one or more micro-operations per loop iteration are to be supplied by the front end circuitry, where an actual number of loop iterations to be processed by the processing circuitry is resolvable by the processing circuitry based on at least one operand corresponding to a first loop iteration to be processed by the processing circuitry; in which:
the front end circuitry is configured to vary, based on a level of confidence in the prediction of the number of loop iterations, a supply rate with which the one or more micro-operations for at least a subset of the loop iterations are supplied to the processing circuitry.

### Claim 2 (depends on 1)

The apparatus according to claim 1, in which, for supplying the one or more micro-operations for at least the subset of the loop iterations, the front end circuitry is configured to select a lower supply rate for a less-confident prediction of the number of loop iterations than for a more-confident prediction of the number of loop iterations.

### Claim 3 (depends on 1)

The apparatus according to claim 1, in which for supplying the one or more micro-operations for at least the subset of the loop iterations, the front end circuitry is configured to select between at least three different supply rates based on the level of confidence.

### Claim 4 (depends on 1)

The apparatus according to claim 1, in which, for a prediction where the level of confidence meets a supply rate reduction criterion, the front end circuitry is configured to:
supply the one or more micro-operations for an initial subset of loop iterations at a first supply rate; and
supply the one or more micro-operations for a further subset of loop iterations at a second supply rate lower than the first supply rate.

### Claim 5 (depends on 4)

The apparatus according to claim 4, in which:
the one or more micro-operations comprise one or more predicated micro-operations for which, if at least one unnecessary iteration of the one or more micro-operations is processed by the processing circuitry following an over-prediction of the number of loop iterations, processing of the at least one unnecessary iteration is predicated to suppress any architectural effect of the unnecessary iteration of the one or more micro-operations;
the initial subset of loop iterations comprises the number of loop iterations predicted by the prediction circuitry; and
the further subset of loop iterations comprises at least one further loop iteration supplied to the processing circuitry at the second supply rate despite being predicted not to be required for processing by the processing circuitry.

### Claim 6 (depends on 4)

The apparatus according to claim 4, in which the initial subset of loop iterations comprises a baseline number of loop iterations which is independent of the number of loop iterations predicted by the prediction circuitry to be required for processing by the processing circuitry.

### Claim 7 (depends on 6)

The apparatus according to claim 6, in which the baseline number of loop iterations is a fixed number.

### Claim 8 (depends on 6)

The apparatus according to claim 6, in which the prediction circuitry is configured to determine the baseline number of loop iterations based on a lookup of a baseline-iteration number-defining parameter of a prediction data structure, where the baseline-iteration-number-defining parameter is separate from a prediction parameter used to determine the number of loop iterations predicted by the prediction circuitry to be required for processing by the processing circuitry.

### Claim 9 (depends on 1)

The apparatus according to claim 1, in which:
in response to a determination that, after the front end circuitry has determined to supply the one or more micro-operations for the subset of the loop iterations at a lower supply rate, the processing circuitry has resolved the actual number of loop iterations and there is still at least one remaining iteration for which the one or more micro-operations are not yet obtained or generated for supply to the processing circuitry, the front end circuitry is configured to supply the one or more micro-operations for the at least one remaining iteration at a higher supply rate than the lower supply rate.

### Claim 10 (depends on 1)

The apparatus according to claim 1, in which the processing circuitry is capable of executing the loop iterations out-of-order; and
the front end circuitry is also configured to vary the supply rate based on resource utilisation information indicative of utilisation of back-end processing resource associated with the processing circuitry.

### Claim 11 (depends on 10)

The apparatus according to claim 10, in which the back-end processing resource comprises at least one of:
a store buffer to buffer pending store requests;
prefetch circuitry to prefetch data to a cache;
an issue queue to queue micro-operations supplied by the front end circuitry before the micro-operations are issued to the processing circuitry; and
a reorder buffer to track in-order commitment of out-of-order executed instructions.

### Claim 12 (depends on 1)

The apparatus according to claim 1, in which the prediction circuitry is configured to generate the prediction of the number of loop iterations in response to detecting program flow reaching, or being predicted to reach, an address predicted as corresponding to a loop-terminating branch instruction for controlling, based on whether a loop termination condition is satisfied, whether the processing circuitry should process a further iteration of a loop body or process a following instruction to be processed after a final iteration of the loop body.

### Claim 13 (depends on 12)

The apparatus according to claim 12, in which the loop body comprises operations to;
determine a variable number of bytes to be processed in a current iteration;
perform at least one processing operation based on the variable number of bytes determined for the current iteration, the at least one processing operation including at least one of a load operation and a store operation; and
update, based on the variable number of bytes, a remaining bytes parameter indicative of a remaining number of bytes to be processed.

### Claim 14 (depends on 13)

The apparatus according to claim 13, in which the loop termination condition for a given iteration of the loop-terminating branch instruction is satisfied when the remaining bytes parameter indicates that the number of remaining bytes to be processed is zero.

### Claim 15 (depends on 13)

The apparatus according to claim 13, in which the variable number of bytes to be processed in the current iteration is dependent on alignment of a target address of said at least one of the load operation and the store operation with respect to an alignment boundary.

### Claim 16 (depends on 12)

The apparatus according to claim 12, in which the loop-terminating branch instruction is a combined instruction for controlling the processing circuitry to perform both the loop body and a conditional branch operation conditional on whether the loop termination condition is satisfied.

### Claim 17 (depends on 12)

The apparatus according to claim 12, in which the loop-terminating branch instruction is separate from one or more instructions for controlling the processing circuitry to perform the loop body.

### Claim 18 (depends on 1)

The apparatus according to claim 1, in which the one or more micro-operations comprise one or more micro-operations to control the processing circuitry to perform a memory copy operation to copy data from a first memory region to a second memory region.

### Claim 19

A method comprising:
supplying, with front end circuitry, micro-operations o be processed by processing circuitry; and
performing, with the processing circuitry, processing operations in response to the micro-operations;
generating a prediction of a number of loop iterations for which one or more micro-operations per loop iteration are to be supplied by the front end circuitry, where an actual number of loop iterations to be processed by the processing circuitry is resolvable by the processing circuitry based on at least one operand corresponding to a first loop iteration to be processed by the processing circuitry; and:
varying, based on a level of confidence in the prediction of the number of loop iterations, a supply rate with which the one or more micro-operations for at least a subset of the loop iterations are supplied to the processing circuitry by the front end circuitry.

### Claim 20

A non-transitory computer-readable medium to store computer-readable code for fabrication of an apparatus comprising:
processing circuitry to perform processing operations in response to micro-operations;
front end circuitry to supply the micro-operations to be processed by the processing circuitry; and
prediction circuitry to generate a prediction of a number of loop iterations for which one or more micro-operations per loop iteration are to be supplied by the front end circuitry, where an actual number of loop iterations to be processed by the processing circuitry is resolvable by the processing circuitry based on at least one operand corresponding to a first loop iteration to be processed by the processing circuitry; in which:
the front end circuitry is configured to vary, based on a level of confidence in the prediction of the number of loop iterations, a supply rate with which the one or more micro-operations for at least a subset of the loop iterations are supplied to the processing circuitry.
