# US 2022/0035632 A1 · Method and Apparatus for Front End Gather/Scatter Memory Coalescing

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

- Number: US 2022/0035632 A1
- Document ID: US20220035632A1
- Status: Published application
- Kind: A1
- Application number: 16/944,141
- Filed: 2020-07-30
- Published: 2022-02-03
- Earliest claimed: 2020-07-30
- Assignees: Marvell Asia Pte Ltd
- Applicants: Marvell Asia Pte, Ltd.
- Inventors: Harold Wade Cain, III; Rabin Andrew Sugumar; Nagesh Bangalore Lakshminarayana; Daniel Jonathan Ernst; Sanyam Mehta
- Web page: https://patentgrep.com/patent/US20220035632A1

## CPC

- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- 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/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/30181: {Instruction operation extension or modification}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system for processing gather and scatter instructions can implement a front-end subsystem, a back-end subsystem, or both. The front-end subsystem includes a prediction unit configured to determine a predicted quantity of coalesced memory access operations required by an instruction. A decode unit converts the instruction into a plurality of access operations based on the predicted quantity, and transmits the plurality of access operations and an indication of the predicted quantity to an issue queue. The back-end subsystem includes a load-store unit that receives a plurality of access operations corresponding to an instruction, determines a subset of the plurality of access operations that can be coalesced, and forms a coalesced memory access operation from the subset. A queue stores multiple memory addresses for a given load-store entry to provide for execution of coalesced memory accesses.

## Claims

### Claim 1

A system for processing gather and scatter instructions, comprising:
a prediction unit configured to determine a predicted quantity of coalesced memory access operations required by an instruction, the instruction being one of a scatter instruction and a gather instruction; and
a decode unit configured to 1) convert the instruction into a plurality of access operations based on the predicted quantity, and 2) transmit the plurality of access operations and an indication of the predicted quantity to an issue queue;
wherein the prediction unit is further configured to determine the predicted quantity by locating an entry of a table based on a program counter of the instruction.

### Claim 2 (depends on 1)

The system of claim 1, further comprising a load-store unit configured to 1) determine an actual quantity of coalesced memory accesses required by the instruction, and 2) provide an indication of the actual quantity to the prediction unit.

### Claim 3 (depends on 2)

The system of claim 2, wherein the prediction unit is further configured to update a table based on the predicted quantity and the actual quantity.

### Claim 4

A system for processing gather and scatter instructions, comprising:
a prediction unit configured to determine a predicted quantity of coalesced memory access operations required by an instruction, the instruction being one of a scatter instruction and a gather instruction;
a decode unit configured to 1) convert the instruction into a plurality of access operations based on the predicted quantity, and 2) transmit the plurality of access operations and an indication of the predicted quantity to an issue queue; and
a load-store unit configured to 1) determine an actual quantity of coalesced memory accesses required by the instruction, and 2) provide an indication of the actual quantity to the prediction unit wherein the prediction unit is further configured to update a table based on the predicted quantity and the actual quantity
wherein the prediction unit is further configured to update an entry of the table, the entry corresponding to the instruction and including fields indicating the predicted quantity and a confidence score indicating an estimated accuracy of the predicted quantity.

### Claim 5 (depends on 4)

The system of claim 4, wherein the prediction unit is further configured to update at least one of the predicted quantity and the confidence score based on the actual quantity.

### Claim 6 (depends on 2)

The system of claim 2, wherein the load-store unit is further configured to 1) determine a subset of the plurality of access operations that can be coalesced, and 2) form a coalesced memory access operation from the subset.

### Claim 7 (depends on 6)

The system of claim 6, wherein the load-store unit analyzes a portion of the plurality of access operations to determine the subset of the plurality of access operations that can be coalesced.

### Claim 8 (depends on 6)

The system of claim 6, wherein the load-store unit is further configured to 1) assign the coalesced memory access operation to at least one register entry, and 2) execute the coalesced memory access operation via a load-store pipeline.

### Claim 9 (depends on 2)

The system of claim 2, wherein the load-store unit is further configured to determine a misprediction of the prediction unit based on a comparison of the predicted quantity and the actual quantity.

### Claim 10 (depends on 1)

The system of claim 1, wherein the plurality of access operations has a quantity equal to the predicted quantity.

### Claim 11 (depends on 1)

The system of claim 1, wherein the predicted quantity corresponds to a field of the entry.

### Claim 12 (depends on 1)

The system of claim 1, wherein the prediction unit is further configured to update the field based on an indication of a misprediction.

### Claim 13 (depends on 1)

The system of claim 1, wherein the prediction unit is further configured to refrain from updating the table if the predicted quantity exceeds an actual quantity of coalesced memory accesses required by the instruction.

### Claim 14 (depends on 1)

The system of claim 1, wherein the decode unit, in response to a misprediction, is further configured to re-transmit the plurality of access operations with an indication of an actual quantity of coalesced memory accesses required by the instruction.

### Claim 15

A method of processing gather and scatter instructions, comprising:
determining a predicted quantity of coalesced memory access operations required by an instruction, the instruction being one of a scatter instruction and a gather instruction;
converting the instruction into a plurality of access operations based on the predicted quantity;
transmitting the plurality of access operations and an indication of the predicted quantity to an issue queue; and
determining the predicted quantity by locating an entry of a table based on a program counter of the instruction.

### Claim 16 (depends on 15)

The method of claim 15, further comprising:
determining an actual quantity of coalesced memory accesses required by the instruction; and
providing an indication of the actual quantity to a prediction unit.

### Claim 17 (depends on 16)

The method of claim 16, further comprising updating a table based on the predicted quantity and the actual quantity.

### Claim 18

A method of processing gather and scatter instructions, comprising:
determining a predicted quantity of coalesced memory access operations required by an instruction, the instruction being one of a scatter instruction and a gather instruction;
converting the instruction into a plurality of access operations based on the predicted quantity;
transmitting the plurality of access operations and an indication of the predicted quantity to an issue queue;
determining an actual quantity of coalesced memory accesses required by the instruction;
providing an indication of the actual quantity to a prediction unit updating a table based on the predicted quantity and the actual quantity; and
updating an entry of the table, the entry corresponding to the instruction and including fields indicating the predicted quantity and a confidence score indicating an estimated accuracy of the predicted quantity.

### Claim 19 (depends on 18)

The method of claim 18, further comprising updating at least one of the predicted quantity and the confidence score based on the actual quantity.

### Claim 20 (depends on 16)

The method of claim 16, further comprising:
determining a subset of the plurality of access operations that can be coalesced; and
forming a coalesced memory access operation from the subset.

### Claim 21 (depends on 20)

The method of claim 20, further comprising analyzing a portion of the plurality of access operations to determine the subset of the plurality of access operations that can be coalesced.

### Claim 22 (depends on 20)

The method of claim 20, further comprising
assigning the coalesced memory access operation to at least one register entry; and
executing the coalesced memory access operation via a load-store pipeline.

### Claim 23 (depends on 16)

The method of claim 16, further comprising determining a misprediction based on a comparison of the predicted quantity and the actual quantity.

### Claim 24 (depends on 15)

The method of claim 15, wherein the plurality of access operations has a quantity equal to the predicted quantity.

### Claim 25 (depends on 15)

The method of claim 15, wherein the predicted quantity corresponds to a field of the entry.

### Claim 26 (depends on 15)

The method of claim 15, further comprising updating the field based on an indication of a misprediction.

### Claim 27 (depends on 15)

The method of claim 15, further comprising refraining from updating the table if the predicted quantity exceeds an actual quantity of coalesced memory accesses required by the instruction.

### Claim 28 (depends on 15)

The method of claim 15, further comprising, in response to a misprediction, re-transmitting the plurality of access operations with an indication of an actual quantity of coalesced memory accesses required by the instruction.
