# US 2012/0254540 A1 · Method and system for optimizing prefetching of cache memory lines

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

- Number: US 2012/0254540 A1
- Document ID: US20120254540A1
- Status: Published application
- Kind: A1
- Application number: 13/078,356
- Filed: 2011-04-01
- Published: 2012-10-04
- Earliest claimed: 2011-04-01
- Assignees: Intel Corporation
- Inventors: LEIGANG KOU; JEFF WIEDEMEIER; MIKE FILIPPO
- Web page: https://patentgrep.com/patent/US20120254540A1

## CPC

- G06F 12/0862: with prefetch
- G06F 12/0864: using pseudo-associative means, e.g. set-associative or hashing
- G06F 9/383: {Operand prefetching (cache prefetching G06F12/0862)}
- G06F 12/0215: {with look ahead addressing means}
- G06F 2212/6026: Prefetching based on access pattern detection, e.g. stride based prefetch
- G06F 2212/6028: Prefetching based on hints or prefetch instructions
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method and system to optimize prefetching of cache memory lines in a processing unit. The processing unit has logic to determine whether a vector memory operand is cached in two or more adjacent cache memory lines. In one embodiment of the invention, the determination of whether the vector memory operand is cached in two or more adjacent cache memory lines is based on the size and the starting address of the vector memory operand. In one embodiment of the invention, the pre-fetching of the two or more adjacent cache memory lines that cache the vector memory operand is performed using a single instruction that uses one issue slot and one data cache memory execution slot. By doing so, it avoids additional software prefetching instructions or operations to read a single vector memory operand when the vector memory operand is cached in more than one cache memory line.

## Claims

### Claim 1

An apparatus comprising:
logic to:
determine that data of a vector memory operand is cached in two adjacent cache memory lines based on a size of the vector memory operand and a starting address of the vector memory operand; and
pre-fetch the two adjacent cache memory lines using a single data cache memory execution slot responsive to the determination.

### Claim 2 (depends on 1)

The apparatus of claim 1, further comprising:
a data cache memory having the plurality of cache memory lines; and
a tag memory having a first partition and a second partition, wherein the first partition comprises entries associated with cache memory lines having an even set index, and wherein the second partition comprises entries associated with cache memory lines having an odd set index.

### Claim 3 (depends on 2)

The apparatus of claim 2, wherein the logic to pre-fetch the two adjacent cache memory lines using the single data cache memory execution slot is to:
compare a physical address of the data of the vector memory operand with the entries in the first partition and the entries in the second partition.

### Claim 4 (depends on 3)

The apparatus of claim 3, wherein the logic to pre-fetch the two adjacent cache memory lines using the single data cache memory execution slot is further to:
generate a corresponding cache miss indication for the first partition and the second partition based on the comparison of the physical address of the data of the vector memory operand with the entries in the first partition and the entries in the second partition.

### Claim 5 (depends on 4)

The apparatus of claim 4, wherein the logic to pre-fetch the two adjacent cache memory lines using the single data cache memory execution slot is further to:
allocate a corresponding fill buffer for the first partition and the second partition based on the corresponding generated cache miss indication for the first partition and the second partition.

### Claim 6 (depends on 4)

The apparatus of claim 4, wherein the logic to pre-fetch the two adjacent cache memory lines using the single data cache memory execution slot is further to:
generate a corresponding cache miss request for the first partition and the second partition based on the corresponding generated cache miss indication for the first partition and the second partition.

### Claim 7 (depends on 3)

The apparatus of claim 3, further comprising:
a translation look aside buffer (TLB) to convert a linear address of the vector memory operand to the physical address of the vector memory operand.

### Claim 8

A system comprising:
a memory; and
a processing unit coupled with the memory, comprising:
logic to:
determine that data of a vector memory operand is cached in two adjacent cache memory lines based on a size of the vector memory operand and a starting address of the vector memory operand; and
pre-fetch two adjacent cache memory lines using a single data cache memory execution slot.

### Claim 9 (depends on 8)

The system of claim 8, wherein the processing unit further comprises:
a data cache memory having the plurality of cache memory lines; and
a tag memory having a first partition and a second partition, wherein the first partition comprises entries associated with cache memory lines having an even set index, and wherein the second partition comprises entries associated with cache memory lines having an odd set index.

### Claim 10 (depends on 9)

The system of claim 9, wherein the logic to pre-fetch the two adjacent cache memory lines using the single data cache memory execution slot is to:
determine the size of the data; and
compare a physical address of the data of with the entries in the first partition and the entries in the second partition.

### Claim 11 (depends on 10)

The system of claim 10, wherein the logic to pre-fetch the two adjacent cache memory lines using the single data cache memory execution slot is further to:
generate a corresponding cache miss indication for the first partition and the second partition based on the comparison of the physical address of the data with the entries in the first partition and the entries in the second partition.

### Claim 12 (depends on 11)

The system of claim 11, wherein the logic to pre-fetch the two adjacent cache memory lines using the single data cache memory execution slot is further to:
allocate a corresponding fill buffer for the first partition and the second partition based on the corresponding generated cache miss indication for the first partition and the second partition.

### Claim 13 (depends on 12)

The system of claim 12, wherein the logic to pre-fetch the two adjacent cache memory lines using the single data cache memory execution slot is further to:
generate a corresponding cache miss request for the first partition and the second partition based on the corresponding generated cache miss indication for the first partition and the second partition.

### Claim 14 (depends on 8)

The system of claim 8, wherein the processing unit further comprises:
a translation look aside buffer (TLB) to convert a linear address of the data to the physical address of the data.

### Claim 15 (depends on 9)

The system of claim 9, wherein the data cache memory is one of a level one (L1), a level two (L2), and a level three (L3), data cache memory.

### Claim 16

A method comprising:
determining that data of a vector memory operand is cached in two adjacent cache memory lines based on a size of the vector memory operand and a starting address of the vector memory operand; and
pre-fetching two adjacent cache memory lines using a single data cache memory execution slot.

### Claim 17 (depends on 16)

The method of claim 16, wherein pre-fetching the two adjacent cache memory lines using the single data cache memory execution slot comprises:
determining the size of the data; and
comparing a physical address of the data of with entries in a first partition and entries in a second partition, wherein the first partition comprises entries associated with cache memory lines having an even set index, and wherein the second partition comprises entries associated with cache memory lines having an odd set index.

### Claim 18 (depends on 17)

The method of claim 17, wherein pre-fetching the two adjacent cache memory lines using the single data cache memory execution slot further comprises:
generating a corresponding cache miss indication for the first partition and the second partition based on the comparison of the physical address of the data of the vector memory operand with the entries in the first partition and the entries in the second partition.

### Claim 19 (depends on 18)

The method of claim 18, wherein pre-fetching the two adjacent cache memory lines using the single data cache memory execution slot further comprises:
allocating a corresponding fill buffer for the first partition and the second partition based on the corresponding generated cache miss indication for the first partition and the second partition.

### Claim 20 (depends on 19)

The method of claim 19, wherein pre-fetching the two adjacent cache memory lines using the single data cache memory execution slot further comprises:
generating a corresponding cache miss request for the first partition and the second partition based on the corresponding generated cache miss indication for the first partition and the second partition.

### Claim 21 (depends on 20)

The method of claim 20, wherein pre-fetching the two adjacent cache memory lines using the single data cache memory execution slot further comprises:
translating a linear address of the data to the physical address of the data.

### Claim 22 (depends on 16)

The method of claim 16, wherein the data cache memory is one of a level one (L1), a level two (L2), and a level three (L3), data cache memory.
