# US 2021/0173781 A1 · Cache pre-loading in a data processing system

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

- Number: US 2021/0173781 A1
- Document ID: US20210173781A1
- Status: Published application
- Kind: A1
- Application number: 16/703,156
- Filed: 2019-12-04
- Published: 2021-06-10
- Earliest claimed: 2019-12-04
- Assignees: NXP USA, Inc.
- Applicants: NXP USA, Inc.
- Inventors: Paul Kimelman; Brian Christopher Kahne
- Web page: https://patentgrep.com/patent/US20210173781A1

## CPC

- G06F 12/0862: with prefetch
- G06F 2212/1021: Hit rate improvement
- G06F 2212/602: Details relating to cache prefetching
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A data processing system includes a processor, a memory, and a cache. The cache includes a cache array, cache control circuitry coupled to receive an access address corresponding to a read access request from the processor and configured to determine whether the received access address hits or misses in the cache array, pre-load control storage circuitry outside the cache array and configured to store a pre-load cache line address and a corresponding stride value, and pre-load control circuitry coupled to the cache control circuit rand the pre-load control storage circuitry. The pre-load control circuitry is configured to receive the access address corresponding to the read access request from the processor and selectively initiating a pre-load from the memory to the cache based on whether a cache line address portion of the access address matches the stored pre-load cache line address.

## Claims

### Claim 1

A data processing system, comprising:
a processor;
a memory coupled to the processor; and
a cache coupled to the processor, the cache having:
a cache array configured to store a plurality of cache lines each having a corresponding tag address field and a data field;
cache control circuitry coupled to the cache array and coupled to receive an access address corresponding to a read access request from the processor and configured to determine whether the received access address hits or misses in the cache array;
pre-load control storage circuitry, outside the cache array, configured to store a pre-load cache line address and a corresponding stride value; and
pre-load control circuitry coupled to the cache control circuitry and the pre-load control storage circuitry, and configured to receive the access address corresponding to the read access request from the processor and selectively initiating a pre-load from the memory to the cache based on whether a cache line address portion of the access address matches the stored pre-load cache line address.

### Claim 2 (depends on 1)

The data processing system of claim 1, wherein the pre-load control circuitry is configured to initiate the pre-load when the cache line address portion of the access address matches the stored pre-load cache line address.

### Claim 3 (depends on 2)

The data processing system of claim 2, wherein when the cache line address portion of the access address matches the stored pre-load cache line address, the initiated pre-load loads a cache line into the cache array from a calculated address location of the memory, wherein the calculated address location is calculated using the stored cache line address and the corresponding stride.

### Claim 4 (depends on 3)

The data processing system claim 3, wherein when the cache line address portion of the access address matches the stored pre-load cache line address, updating the preload cache line address stored in the pre-load control storage circuitry with the calculated address location.

### Claim 5 (depends on 2)

The data processing system of claim 2, wherein when the cache line address portion of the access address matches the stored pre-load cache line address, the pre-load is initiated regardless of whether the access address hits or misses in the cache array.

### Claim 6 (depends on 2)

The data processing system claim 2, wherein the pre-load control storage circuitry further comprises a counter and is configured to store a second stride value and a counter reload value, wherein the counter is configured to update its corresponding count value each time a cache line address portion of a read access address received from the processor matches the stored pre-load cache line address.

### Claim 7 (depends on 6)

The data processing system of claim 6, wherein when the cache line address portion of the access address matches the stored pre-load cache line address and the counter has reached a predetermined value:
the initiated pre-load loads a cache line into the cache array from a calculated address location of the memory which is calculated using the stored cache line address and the second stride value,
the preload cache line address stored in the pre-load control storage circuitry is updated with the calculated address location, and
the counter is reset to the counter reload value.

### Claim 8 (depends on 6)

The data processing system of claim 6, wherein the pre-load cache control storage circuitry is configured to store an initial address corresponding to the second stride value, wherein when the cache line address portion of the access address matches the stored pre-load cache line address and the counter has reached a predetermined value:
the initiated pre-load loads a cache line into the cache array from a calculated address location of the memory which is calculated using the initial address and the second stride value,
the initial address is updated with the calculated address location, and
the counter is reset to the counter reload value.

### Claim 9 (depends on 6)

The data processing system of claim 6, wherein when the cache line address portion of the access address matches the stored pre-load cache line address and the counter has not reached a predetermined value:
the initiated pre-load loads a cache line into the cache array from an address location in the memory calculated using the stored cache line address and the corresponding stride.

### Claim 10 (depends on 1)

The data processing system of claim 1, wherein the cache control circuitry and the pre-load control circuitry receive the access address corresponding to the read access request from the processor in parallel with each other.

### Claim 11

In a data processing system having a cache array and a memory, a method comprises:
storing a pre-load cache line address and a corresponding stride value into pre-load control storage circuitry which is independent of the cache array;
receiving a read address request for the memory, wherein the read request has a corresponding access address; and
when the received access address matches the pre-load cache line address:
initiating a pre-load of a cache line into the cache from a calculated address location of the memory which is calculated using the pre-load cache line address and the corresponding stride, and
updating the pre-load cache line address in the pre-load control storage circuitry with the calculated address location while maintaining the corresponding stride value unchanged.

### Claim 12 (depends on 11)

The method of claim 11, further comprising:
when the received address does not match the pre-load cache line address, not initiating the pre-load of the cache line from the calculated address location and not updating the stored pre-load cache line address with the calculated address location.

### Claim 13 (depends on 11)

The method of claim 11, wherein after initiating the pre-load of the cache line into the cache array from a calculated address location and updating the stored pre-load cache line with the calculated address location, the method further comprises:
receiving a second access address request for the memory, wherein the second read request has a corresponding second access address;
if the received second access address matches the updated pre-load cache line address:
initiating a pre-load of a cache line into the cache array from a second calculated address location of the memory which is calculated using the updated pre-load cache line address and the corresponding stride, and
updating the pre-load cache line address in the pre-load control storage circuitry with the second calculated address location; and
if the received second access address does not match the updated pre-load cache line address, not performing a cache line pre-load from the memory into the cache array in response to the received second access address.

### Claim 14 (depends on 11)

The method of claim 11, further comprising:
in response to receiving the read address request for the memory and the corresponding access address, determining whether the access address results in a hit or a miss in the cache array.

### Claim 15 (depends on 11)

The method of claim 11, wherein the updating is performed simultaneously with or prior to the initiating.

### Claim 16

In a data processing system having a cache array and a memory, a method comprises:
storing a pre-load cache line address, a first stride value which corresponds to the pre-load cache line address, and a second stride value into pre-load control storage circuitry which is independent of the cache array;
resetting a counter to a first count value;
after the storing and the resetting, receiving a read address request for the memory, wherein the read request has a corresponding access address; and
when the received access address matches the pre-load cache line address and the counter has not expired:
initiating a pre-load of a cache line into the cache from a first calculated address location of the memory which is calculated using the pre-load cache line address and the first stride value,
updating the pre-load cache line address in the pre-load control storage circuitry with the first calculated address location while maintaining the first stride value unchanged, and
performing one of incrementing or decrementing the first count value; and
when the received access address matches the pre-load cache line address and the counter has expired:
initiating a pre-load of a cache line into the cache from a second calculated address location of the memory which is calculated using at least the second stride value,
updating the pre-load cache line address in the pre-load control storage circuitry with the second calculated address location while maintaining the second stride value unchanged, and
resetting the counter to the first count value.

### Claim 17 (depends on 16)

The method of claim 16, further comprising:
in response to receiving the read address request for the memory and the corresponding access address, determining whether the access address results in a hit or a miss in the cache array.

### Claim 18 (depends on 16)

The method of claim 16, wherein when the counter has expired, the counter equals a second count value, and when the counter has not expired, the counter does not equal the second count value.

### Claim 19 (depends on 16)

The method of claim 16, wherein when the received access address matches the pre-load cache line address and the counter has expired, the second calculated address location of the memory is calculated using the using the pre-load cache line address and the second stride value.

### Claim 20 (depends on 16)

The method of claim 16, further comprising:
storing an initial pre-load cache line address corresponding to the second stride value into the pre-load control storage circuitry;
wherein when the received access address matches the pre-load cache line address and the counter has expired, the second calculated address location of the memory is calculated using the using the initial pre-load cache line address and the second stride value.
