# US 2015/0178217 A1 · 2-D Gather Instruction and a 2-D Cache

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

- Number: US 2015/0178217 A1
- Document ID: US20150178217A1
- Status: Published application
- Kind: A1
- Application number: 14/635,403
- Filed: 2015-03-02
- Published: 2015-06-25
- Earliest claimed: 2011-08-29
- Assignees: Intel Corporation
- Inventors: Boris Ginzburg; Oleg Margulis
- Web page: https://patentgrep.com/patent/US20150178217A1

## CPC

- G06F 12/0875: with dedicated cache, e.g. instruction or stack
- G06T 1/60: Memory management
- G06F 2212/452: Instruction code
- G06F 2212/455: Image or video data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A processor may support a two-dimensional (2-D) gather instruction and a 2-D cache. The processor may perform the 2-D gather instruction to access one or more sub-blocks of data from a 2-D image stored in a memory coupled to the processor. The 2-D cache may store the sub-blocks of data in a multiple cache lines. Further, the 2-D cache may support access of more than one cache lines while preserving a 2-D structure of the 2-D image.

## Claims

### Claim 1

A processor comprising:
a decode unit to decode a two-dimensional (2-D) gather instruction;
an execution unit to perform the 2-D gather instruction to access one or more sub-blocks of data from a 2-D image stored in a memory coupled to the processor; and
a 2-D cache to store the one or more sub-blocks of data in multiple cache lines, support access to more than one cache line in a single processing cycle, and preserve a two-dimensional structure of the 2-D image, wherein the 2-D cache includes a plurality of sets and a plurality of ways.

### Claim 2 (depends on 1)

The processor of claim 1, wherein
the execution unit is further to load the one or more sub-blocks into the 2-D cache in response to performing the 2-D gather instruction; and
the 2-D gather instruction is to specify a pointer to the 2-D image, a plurality of coordinates to identify the one or more sub-blocks, and a number of elements in the one or more sub-blocks.

### Claim 3 (depends on 1)

The processor of claim 1, wherein the 2-D cache
is further to support mapping of the one or more sub-blocks to avoid read conflict after loading the one or more sub-blocks; and
further comprises an access logic to map the one or more sub-blocks on to the plurality of sets and the plurality of ways.

### Claim 4 (depends on 3)

The processor of claim 3, wherein the access logic is to
determine a set of the plurality of sets on to which a first coordinate of an image pixel of the one or more sub-blocks are mapped, wherein the set is determined using a result of a modulo operation performed on the first coordinate of the 2-D image and a total number of sets available in the 2-D cache; and
determine a way of the plurality of ways on to which a second coordinate of the image pixel within the one or more sub-blocks are mapped, wherein the way is determined using a result of a modulo operation performed on the second coordinate of the 2-D image and a total number of ways available in the 2-D cache.

### Claim 5 (depends on 3)

The processor of claim 3, wherein the access logic is further to perform a 2-D cache lookup, wherein the cache look-up includes
identifying a memory block within the 2-D cache using the set and the way of the 2-D cache;
retrieving content of a tag field within the memory block; and
determining if a data stored in the memory block is evicted.

### Claim 6 (depends on 5)

The processor of claim 5, wherein the access logic comprises
a read/write logic to access the tag field from the memory block and determine if contents of the tag field is non-evicted; and
a shuffle logic to rearrange the data in the memory blocks in an order of the addresses provided by the 2-D gather instruction, wherein the memory blocks associated with the tag field that are non-evicted are chosen.

### Claim 7 (depends on 1)

The processor of claim 1, further comprising a pre-fetch unit to fetch the 2-D gather instruction.

### Claim 8

A method in a processor comprising:
decoding a two-dimensional (2-D) gather instruction;
performing the 2-D gather instruction to access one or more sub-blocks of data from a 2-D image stored in a memory coupled to the processor;
storing the one or more sub-blocks of data in multiple cache lines of a 2-D cache, wherein the 2-D cache includes a plurality of sets and a plurality of ways;
supporting access to more than one cache line in a single processing cycle; and
preserving a two-dimensional structure of the 2-D image in the 2-D cache.

### Claim 9 (depends on 8)

The method of claim 8, further comprising
loading the one or more sub-blocks into the 2-D cache in response to performing the 2-D gather instruction;
specifying a pointer to the 2-D image in response to execution of the 2-D gather instruction; and
identifying the one or more sub-blocks and a number of elements in the one or more sub-blocks using a plurality of coordinates.

### Claim 10 (depends on 8)

The method of claim 8, further comprising mapping the one or more sub-blocks in the 2-D cache to avoid read conflict after loading the one or more sub-blocks, wherein the mapping includes mapping the one or more sub-blocks on to the plurality of sets and the plurality of ways of the 2-D cache.

### Claim 11 (depends on 10)

The method of claim 10, further comprising
determining a set of the plurality of sets on to which a first coordinate of an image pixel of the one or more sub-blocks are mapped, wherein the set is determined using a result of a modulo operation performed on the first coordinate of the 2-D image and a total number of sets available in the 2-D cache; and
determining a way of the plurality of ways on to which a second coordinate of the image pixel within the one or more sub-blocks are mapped, wherein the way is determined using a result of a modulo operation performed on the second coordinate of the 2-D image and a total number of ways available in the 2-D cache.

### Claim 12 (depends on 10)

The method of claim 10, further comprising performing a 2-D cache lookup, wherein the cache look-up includes
identifying a memory block within the 2-D cache using the set and the way of the 2-D cache;
retrieving content of a tag field within the memory block; and
determining if a data stored in the memory block is evicted.

### Claim 13 (depends on 12)

The method of claim 12, further comprising
accessing the tag field from the memory block and determining if content of the tag field is non-evicted; and
rearranging the data in the memory blocks in an order of the addresses provided by the 2-D gather instruction, wherein the memory blocks associated with the tag field that are non-evicted are chosen.

### Claim 14

The method of clam 8, further comprising pre-fetching the 2-D gather instruction.

### Claim 15

A system comprising,
a memory;
a machine readable storage medium;
a plurality of input-output devices; and
a processor comprising a plurality of cores and a plurality of caches, including a two-dimensional (2-D) cache, wherein the 2-D cache includes a plurality of sets and a plurality of way, and wherein the processor is to
decode a 2-D gather instruction;
perform the 2-D gather instruction to access one or more sub-blocks of data from a 2-D image stored in the memory;
store the one or more sub-blocks of data in multiple cache lines of the 2-D cache;
support access to more than one cache line in a single processing cycle; and
preserve a two-dimensional structure of the 2-D image.

### Claim 16 (depends on 15)

The system of claim 15, wherein the processor is further to
load the one or more sub-blocks into the 2-D cache in response to performing the 2-D gather instruction;
specify a pointer to the 2-D image in response to performing the 2-D gather instruction; and
identify the one or more sub-blocks and a number of elements in the one or more sub-blocks using a plurality of coordinates.

### Claim 17 (depends on 15)

The system of claim 15, wherein the processor is further to
support mapping of the one or more sub-blocks, in the 2-D cache, to avoid read conflict after loading the one or more sub-blocks; and
support mapping the one or more sub-blocks on to the plurality of sets and the plurality of ways of the 2-D cache.

### Claim 18 (depends on 17)

The system of claim 17, wherein the processor is to
determine a set of the plurality of sets on to which a first coordinate of an image pixel of the one or more sub-blocks are mapped, wherein the set is determined using a result of a modulo operation performed on the first coordinate of the 2-D image and a total number of sets available in the 2-D cache; and
determine a way of the plurality of ways on to which a second coordinate of the image pixel within the one or more sub-blocks are mapped, wherein the way is determined using a result of a modulo operation performed on the second coordinate of the 2-D image and a total number of ways available in the 2-D cache.

### Claim 19 (depends on 17)

The system of claim 17, wherein the processor is further to support performing a 2-D cache lookup, wherein the cache look-up includes
identifying a memory block within the 2-D cache using the set and the way of the 2-D cache,
retrieving content of a tag field within the memory block, and
determining if a data stored in the memory block is evicted.

### Claim 20 (depends on 19)

The system of claim 19, wherein the processor is further to
support accessing the tag field from the memory block and determining if content of the tag field is non-evicted; and
support rearranging the data in the memory blocks in an order of the addresses provided by the 2-D gather instruction, wherein the memory blocks associated with the tag field that are non-evicted are chosen.
